Python: the pythonModule attribute
Python libraries or modules now have an attribute `pythonModule = interpreter;` to indicate they provide Python modules for the specified `interpreter`. The package set provides the following helper functions: - hasPythonModule: Check whether a derivation provides a Python module. - requiredPythonModules: Recurse into a list of Python modules, returning all Python modules that are required. - makePythonPath: Create a PYTHONPATH from a list of Python modules. Also included in this commit is: - disabledIf: Helper function for disabling non-buildPythonPackage functions.
This commit is contained in:
@@ -5,7 +5,12 @@
|
||||
|
||||
{ lib
|
||||
, python
|
||||
, mkPythonDerivation
|
||||
, wrapPython
|
||||
, setuptools
|
||||
, unzip
|
||||
, ensureNewerSourcesHook
|
||||
, pythonModule
|
||||
, namePrefix
|
||||
, bootstrapped-pip
|
||||
, flit
|
||||
}:
|
||||
@@ -15,6 +20,9 @@ let
|
||||
flit-specific = import ./build-python-package-flit.nix { inherit python flit; };
|
||||
wheel-specific = import ./build-python-package-wheel.nix { };
|
||||
common = import ./build-python-package-common.nix { inherit python bootstrapped-pip; };
|
||||
mkPythonDerivation = import ./mk-python-derivation.nix {
|
||||
inherit lib python wrapPython setuptools unzip ensureNewerSourcesHook pythonModule namePrefix;
|
||||
};
|
||||
in
|
||||
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user