-
Notifications
You must be signed in to change notification settings - Fork 49
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
pip/_vendor/pep517 is in sys.path when executing setup.py #104
Comments
I can confirm that the process is being spawned by the following code: |
hexagonrecursion
changed the title
pip/_vendor/pep517 is in the path when executing setup.py
pip/_vendor/pep517 is in sys.path when executing setup.py
Jan 31, 2021
Possible solutions:
|
This comment has been minimized.
This comment has been minimized.
hexagonrecursion
added a commit
to hexagonrecursion/pep517
that referenced
this issue
Jan 31, 2021
_in_process.py is executed as a subprocess. This causes its parent directory to become sys.path[0]. Any extra files in the same directory shadow pypi libraries eg colorlog. Solution: put _in_process.py in its own special subdirectory. Note: the directory has to be a module because importlib.resources.path does not support resources with directory separators in their name: https://docs.python.org/3/library/importlib.html#importlib.resources.path : > resource is the name of the resource to open within package; > it may not contain path separators and it may not have sub-resources > (i.e. it cannot be a directory).
hexagonrecursion
added a commit
to hexagonrecursion/pep517
that referenced
this issue
Jan 31, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This causes issues when importing certain libraries in setup.py eg colorlog
pyproject.toml
setup.py
Relevant part of the output:
I want to fix this. I was instructed to open an issue in this repo.
The text was updated successfully, but these errors were encountered: