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

Add Pipenv, update pew #30442

Closed
wants to merge 3 commits into from
Closed

Add Pipenv, update pew #30442

wants to merge 3 commits into from

Conversation

berdario
Copy link
Contributor

Motivation for this change

Add pipenv, bump pew (it's a dependency, and it was broken)

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-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 nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

Pew was actually broken, due to a SHELL PATH check that had been added
in the previous release (though this shouldn't have hampered users with
bash as their shell)
@berdario berdario requested a review from FRidh as a code owner October 15, 2017 16:28
@@ -15567,6 +15578,27 @@ in {
};
};

pipenv = buildPythonPackage rec {
Copy link
Member

Choose a reason for hiding this comment

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

Please move this expression to python-modules as described in the header of this file.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@Mic92 this is not a library, but a cli tool. The header says to keep cli tools in this file

Copy link
Member

Choose a reason for hiding this comment

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

It says:

Python packages that do not need to be available for each interpreter version do not belong in this packages set.

which means not in python-packages.nix at all.

For example gpodder is a podcast client written in python and we put it not into python-packages.nix since we only need one version of it build against one python version.
Looking at the documentation https://github.com/kennethreitz/pipenv#basic-concepts it seems we also only need one version of pipenv for both python2/python3. In that case please add it to top-level/all-packages.nix

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Uhm, I think that the text in the header should be updated then, since it says

Expressions for Python libraries are supposed to be in pkgs/development/python-modules/<name>/default.nix.

If libraries aren't supposed to be in python-packages.nix at all, that leaves only cli application...

I presume that if neither cli applications nor libraries are supposed to live in python-packages.nix, then this file still exists only for legacy reasons?

Copy link
Member

Choose a reason for hiding this comment

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

We still add python libraries there, but are using callPackage, where the expression is written to
python-modules, i.e: email_validator = callPackage ../development/python-modules/email-validator { };

pipenv = buildPythonPackage rec {
name = "pipenv-8.2.7";

src = pkgs.fetchurl {
Copy link
Member

Choose a reason for hiding this comment

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

we have a fetchPypi function for that.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok, changed

meta = {
description = "Python Development Workflow for Humans";
license = licenses.mit;
platforms = platforms.all;
Copy link
Member

Choose a reason for hiding this comment

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

Do you want to maintain this package?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok, I added myself as maintainer

@berdario
Copy link
Contributor Author

@Mic92 I moved the apps out to their own files, and applied the other changes

@Mic92 Mic92 closed this in e55b99e Oct 16, 2017
@berdario
Copy link
Contributor Author

berdario commented Oct 16, 2017 via email

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.

None yet

2 participants