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

Development environments using nix-shell no longer work #2612

Closed
jaraco opened this issue Mar 20, 2021 · 4 comments · Fixed by #2613
Closed

Development environments using nix-shell no longer work #2612

jaraco opened this issue Mar 20, 2021 · 4 comments · Fixed by #2613
Labels

Comments

@jaraco
Copy link
Member

jaraco commented Mar 20, 2021

The change in #2165 broke development environments using nix-shell, which offers a feature similar to running setup.py develop. If I manually copy the site.py generated by older versions of setuptools into the new environment I can fix it, but this is clearly a hack.

I'm not sure how to proceed to properly fix this issue when using nix-shell. @jaraco would you be able to help recommending workarounds to solve this problem?

Originally posted by @cript0nauta in #2165 (comment)

@jaraco
Copy link
Member Author

jaraco commented Mar 21, 2021

In the referenced commit, I've created a test that captures the reported failure. I'm still not certain it's a use-case that Setuptools should support, but it at least provides a means to evaluate more easily.

jaraco added a commit that referenced this issue Mar 21, 2021
@jaraco
Copy link
Member Author

jaraco commented Mar 21, 2021

In this latest commit, in the test, I illustrate how it's possible to inject a sitecustomize.py into the target site-packages directory (a much simpler solution than the site.py hack from before).

My instinct here is it would be best for nix to own this behavior, rather than Setuptools.

@limeytexan or @cript0nauta, would you comment on how feasible it would be for nix to adopt the technique in the illustrative test? Such a workaround would provide compatibility for existing builds of Setuptools as well.

@cript0nauta
Copy link

Thanks for proposing a solution! I made a proof of concept that adds a similar sitecustomize.py file in Nix Python environments and it seems to work ok now. I'll check it and open a PR in nixpkgs (so there would be no need to update setuptools).

@jaraco
Copy link
Member Author

jaraco commented Mar 22, 2021

That’s great news. In that case, I’ll merge the related Setuptools PR with the test. Keep us apprised here with the response in Nix.

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

Successfully merging a pull request may close this issue.

2 participants