mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-25 18:46:32 +03:00
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:
parent
a30fa6d9a2
commit
40851a4d26
9 changed files with 67 additions and 21 deletions
|
@ -201,7 +201,7 @@ in stdenv.mkDerivation {
|
|||
in rec {
|
||||
inherit libPrefix sitePackages x11Support hasDistutilsCxxPatch;
|
||||
executable = libPrefix;
|
||||
buildEnv = callPackage ../../wrapper.nix { python = self; };
|
||||
buildEnv = callPackage ../../wrapper.nix { python = self; inherit (pythonPackages) requiredPythonModules; };
|
||||
withPackages = import ../../with-packages.nix { inherit buildEnv pythonPackages;};
|
||||
pkgs = pythonPackages;
|
||||
isPy2 = true;
|
||||
|
|
|
@ -160,7 +160,7 @@ in stdenv.mkDerivation {
|
|||
in rec {
|
||||
inherit libPrefix sitePackages x11Support;
|
||||
executable = "${libPrefix}m";
|
||||
buildEnv = callPackage ../../wrapper.nix { python = self; };
|
||||
buildEnv = callPackage ../../wrapper.nix { python = self; inherit (pythonPackages) requiredPythonModules; };
|
||||
withPackages = import ../../with-packages.nix { inherit buildEnv pythonPackages;};
|
||||
pkgs = pythonPackages;
|
||||
isPy3 = true;
|
||||
|
|
|
@ -154,7 +154,7 @@ in stdenv.mkDerivation {
|
|||
in rec {
|
||||
inherit libPrefix sitePackages x11Support;
|
||||
executable = "${libPrefix}m";
|
||||
buildEnv = callPackage ../../wrapper.nix { python = self; };
|
||||
buildEnv = callPackage ../../wrapper.nix { python = self; inherit (pythonPackages) requiredPythonModules; };
|
||||
withPackages = import ../../with-packages.nix { inherit buildEnv pythonPackages;};
|
||||
pkgs = pythonPackages;
|
||||
isPy3 = true;
|
||||
|
|
|
@ -153,7 +153,7 @@ in stdenv.mkDerivation {
|
|||
in rec {
|
||||
inherit libPrefix sitePackages x11Support;
|
||||
executable = "${libPrefix}m";
|
||||
buildEnv = callPackage ../../wrapper.nix { python = self; };
|
||||
buildEnv = callPackage ../../wrapper.nix { python = self; inherit (pythonPackages) requiredPythonModules; };
|
||||
withPackages = import ../../with-packages.nix { inherit buildEnv pythonPackages;};
|
||||
pkgs = pythonPackages;
|
||||
isPy3 = true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue