python.pkgs.buildPythonPackage: some comments

This commit is contained in:
Frederik Rietdijk 2017-11-11 16:24:38 +01:00
parent 7c3c2a0dca
commit 80329e7123
2 changed files with 10 additions and 10 deletions

View File

@ -1,7 +1,5 @@
/* This function provides a generic Python package builder. It is # This function provides a generic Python package builder,
intended to work with packages that use `distutils/setuptools' # and can build packages that use distutils, setuptools or flit.
(http://pypi.python.org/pypi/setuptools/), which represents a large
number of Python packages nowadays. */
{ lib { lib
, python , python

View File

@ -1,4 +1,4 @@
/* Generic builder for Python packages that come without a setup.py. */ # Generic builder.
{ lib { lib
, python , python
@ -60,13 +60,15 @@ python.stdenv.mkDerivation (builtins.removeAttrs attrs [
name = namePrefix + name; name = namePrefix + name;
buildInputs = ([ wrapPython (ensureNewerSourcesHook { year = "1980"; }) ]
buildInputs = [ wrapPython ] ++ buildInputs ++ pythonPath
++ [ (ensureNewerSourcesHook { year = "1980"; }) ]
++ (lib.optional (lib.hasSuffix "zip" attrs.src.name or "") unzip) ++ (lib.optional (lib.hasSuffix "zip" attrs.src.name or "") unzip)
++ lib.optionals doCheck checkInputs; ++ lib.optionals doCheck checkInputs
++ lib.optional catchConflicts setuptools # If we nog longer propagate setuptools
++ buildInputs
++ pythonPath
);
# propagate python/setuptools to active setup-hook in nix-shell # Propagate python and setuptools. We should stop propagating setuptools.
propagatedBuildInputs = propagatedBuildInputs ++ [ python setuptools ]; propagatedBuildInputs = propagatedBuildInputs ++ [ python setuptools ];
# Python packages don't have a checkPhase, only an installCheckPhase # Python packages don't have a checkPhase, only an installCheckPhase