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

pipenv: add virualenv to propagatedBuildInputs. #60045

Merged
merged 3 commits into from Apr 26, 2019

Conversation

dgarzon
Copy link
Contributor

@dgarzon dgarzon commented Apr 22, 2019

Motivation for this change
Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • [] Tested compilation of all pkgs that depend on this change using nix-shell -p nix-review --run "nix-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Assured whether relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@dgarzon dgarzon changed the title pipenv: missing virualenv in propagatedBuildInputs. (pipenv): add virualenv to propagatedBuildInputs. Apr 22, 2019
@dgarzon
Copy link
Contributor Author

dgarzon commented Apr 22, 2019

Even though pew has virtualenv as a propagatedBuildInputs, virtualenv is not being propagated to pipenv. This leads to: No module named virtualenv when running the following commands on nixos-19.03 (sha256:164g1qg2yp9w5a8klfxpw29xjslbxxz6q4v5d0zsxx6rsf04dzgy):

pipenv --python 3.7.3
pipenv lock
pypenv sync

@dgarzon
Copy link
Contributor Author

dgarzon commented Apr 24, 2019

Furthermore, after testing this against a real project, I found that the PYTHONPATH being set is not correct, as it does not take into consideration the current working directory for a given project. I added a new commit to this PR to reflect the needed changes to make it work. Can we get this merged soon? @zimbatm @flokli . Thanks!

@zimbatm zimbatm requested a review from FRidh April 25, 2019 13:56
@zimbatm
Copy link
Member

zimbatm commented Apr 25, 2019

/cc @berdario as the pipenv maintainer and @FRidh as he is maintaining python in general.

@dgarzon the commit should be formatted like: pipenv: <reason>. Other than that it looks ok to me.

Copy link
Contributor

@flokli flokli left a comment

Choose a reason for hiding this comment

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

LGTM in general too (apart from the commit message) - but we should await some feedback from @berdario or @FRidh.

@berdario
Copy link
Contributor

berdario commented Apr 25, 2019

I suspect that part of the issue is that pipenv doesn't depend on pew anymore

pypa/pipenv@a5a9583#diff-2eeaed663bd0d25b7e608891384b7298

So, the code that now creates virtualenvs and activates them is different than when it was first packaged (it requires direct access to virtualenv and it otherwise requires other fixes like the PYTHONPATH one)

pipenv usage of pew was also one of the reasons that I cared about it working properly and why I packaged it in the first place. As you can see, I haven't touched it since and in fact I'm not even using it personally anymore.

Sorry for being an absent maintainer.

After unbreaking the tool, we might want to address the above?

@flokli
Copy link
Contributor

flokli commented Apr 25, 2019

Thanks @berdario for the heads-up!

I guess in that case, we should drop pew from propagatedBuildInputs entirely. I grepped through pipenvs source code (master), and it doesn't seem to be used.

@dgarzon dgarzon changed the title (pipenv): add virualenv to propagatedBuildInputs. pipenv: add virualenv to propagatedBuildInputs. Apr 26, 2019
@dgarzon
Copy link
Contributor Author

dgarzon commented Apr 26, 2019

Thank you @berdario @zimbatm @flokli I have addressed the commit message structure, and also removed pew from the propagatedBuildInputs 👍

Copy link
Contributor

@flokli flokli left a comment

Choose a reason for hiding this comment

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

LGTM.

@FRidh FRidh merged commit a082529 into NixOS:master Apr 26, 2019
@dgarzon dgarzon deleted the pipenv-missing-virtualenv branch April 26, 2019 16:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants