-
-
Notifications
You must be signed in to change notification settings - Fork 307
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
1423 - Better PyApp integration #1547
base: master
Are you sure you want to change the base?
1423 - Better PyApp integration #1547
Conversation
Alright, implementation should be done. Doing docs now ;) |
Forgot to say, I'm done with my changes. |
Gentle reminder that this PR is done from my side and needs review. |
this will be in the next release, thank you! |
Awesome, thanks. Looking forward to it :) |
Looking through the code and the discussion on #1423, I would like to propose change Proposed Changes
Reasoning
|
|
||
on_windows = sys.platform == 'win32' | ||
base_env = dict(os.environ) | ||
base_env['PYAPP_PROJECT_NAME'] = self.metadata.name |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have tested the proposed changes and this does not fix the issue defined in #1436. The project is not actually installed within the PyApp binary, resulting in a No matching distribution
error.
According to the PyApp Docs there are 3 ways to define the project path. Here, PYAPP_PROJECT_NAME
and PYAPP_PROJECT_VERSION
are defined, meaning you are using the Identifier configuration which means "the package will be installed from a package index like PyPI". This is not what we want, as the package is local and not necessarily on PyPi.
Rather than defining these two variables here, the builder should utilize the Embedding config method:
- Build an
sdist
orwheel
in a temporary directory - Set
PYAPP_PROJECT_PATH
to point to this file- Name and version are automatically derived from the sdist/wheel metadata.
See my comment on the related issue for how I got around this issue by building and pointing to an sdist.
Hey, sorry for the delay... You are right, this is a bit ambiguous, but i wanted to keep backward compatibility. |
This is a first draft for #1423.
The usage can be seen in the added unit test.
If the implementation is ok, i would continue with documentation updates.