python.pkgs.buildPythonPackage: some comments

wip/yesman
Frederik Rietdijk 7 years ago
parent 7c3c2a0dca
commit 80329e7123
  1. 6
      pkgs/development/interpreters/python/build-python-package.nix
  2. 14
      pkgs/development/interpreters/python/mk-python-derivation.nix

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

@ -1,4 +1,4 @@
/* Generic builder for Python packages that come without a setup.py. */
# Generic builder.
{ lib
, python
@ -60,13 +60,15 @@ python.stdenv.mkDerivation (builtins.removeAttrs attrs [
name = namePrefix + name;
buildInputs = [ wrapPython ] ++ buildInputs ++ pythonPath
++ [ (ensureNewerSourcesHook { year = "1980"; }) ]
buildInputs = ([ wrapPython (ensureNewerSourcesHook { year = "1980"; }) ]
++ (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 ];
# Python packages don't have a checkPhase, only an installCheckPhase

Loading…
Cancel
Save