Skip to content
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

Fix editable --user installs with build isolation #3151

Merged
merged 7 commits into from
Apr 3, 2022

Conversation

hexagonrecursion
Copy link
Contributor

@hexagonrecursion hexagonrecursion commented Mar 5, 2022

Summary of changes

Make setup.py develop --user install to the user site packages directory even if it is disabled in the current interpreter.

Closes #3019

Pull Request Checklist

Add a new test and confirm that it
fails in the expected manner
@hexagonrecursion hexagonrecursion marked this pull request as ready for review March 6, 2022 06:34
According to https://pypi.org/project/py/, this library is in
maintenance mode and should not be used in new code.
@abravalheri
Copy link
Contributor

Thank you very much for investigating this @hexagonrecursion and providing a fix!

I changed a little bit your test code to avoid using directly the py library (according to their warning on https://pypi.org/project/py/, this library should not be used in new code). I hope you don't mind the changes (I just found it easy to do it directly instead of going back and forth requesting changes in the review).

@abravalheri
Copy link
Contributor

This approach seems reasonable to me, if the user is explicitly asking for installing in the home, we should honour that.

Question: if I understood it correctly we are still keeping the isolation in terms of not allowing libraries installed in the user home to be used during the build, right? (The only thing that changes is that we "break the isolation" just when it is time to install the .pth file)

@hexagonrecursion
Copy link
Contributor Author

hexagonrecursion commented Mar 9, 2022

if I understood it correctly we are still keeping the isolation in terms of not allowing libraries installed in the user home to be used during the build, right? (The only thing that changes is that we "break the isolation" just when it is time to install the .pth file)

correct

Copy link
Contributor

@abravalheri abravalheri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you very much @hexagonrecursion, this looks good!

@hexagonrecursion
Copy link
Contributor Author

@jaraco ping

Copy link
Member

@jaraco jaraco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jaraco jaraco merged commit fd632df into pypa:main Apr 3, 2022
@hexagonrecursion hexagonrecursion deleted the fix-editable branch April 4, 2022 03:12
@kynan
Copy link

kynan commented Oct 2, 2022

FTR: the first setuptools release to include this fix is 62.0.0 from 2022-04-04

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Permission denied error to install pkg editable and user mode
4 participants