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
[BUG] [easy_install] bug on checking the path of the distribution location #4088
Comments
Hi @spxd, I can see that you already did a very in-depth investigation. Thank you very much for that. Would you like to provide a PR as well?
Note however that the latest versions of If you want to opt-in for the "new behaviour" you can use |
Hi @abravalheri, Thanks for the response, I tried to upload the code updated but it seems I don't have permission.
Can I have permission ? |
Hi @spxd please have a look on: The process should not require especial permissions. |
Thanks @abravalheri ! |
setuptools version
setuptools===68.2.2
Python version
Python 3.10
OS
Windows 11
Additional environment information
No response
Description
I can see if the package source path is already added to the PYTHONPATH then it's failing add the package source directory to the easy-install.pth when I run the "pip install -e ."
easy_install.py
In def add(self, dist) function in easy_install.py
This code will return False, because the dist.location is already normcased during finalize_options in develop.py
This target is passed as the location in Distribution
For example, if the dist.location and os.getcwd() is
dist.location = 'c:\users\abc\work\helloworld'
os.getcwd() = 'C:\Users\abc\work\helloworld'
The result is False, even though they are pointing same path.
it should be updated to
easy_install.py
Expected behavior
The path of source code should be added to the easy-install.pth file when it's installed as editable.
How to Reproduce
Add "." (current path) to the PYTHONPATH then run the "pip install -e ."
Output
If the easy-install.pth is not exist. it will not dump any error.
But if there is easy-install.pth file exist, it will show this erro.
The text was updated successfully, but these errors were encountered: