python2.{buildPythonPackage,buildPythonApplication}: extract into its own file
As we continue iterating on Python infrastructure for Python 3, some code is starting to diverge for Python 2. If we copy the current state of mk-python-derivation.nix and freeze it for Python 2, we can iterate on it for Python 3 with more freedom.
This commit is contained in:
committed by
Frederik Rietdijk
parent
93d25dda84
commit
e8cca499a8
@@ -32,12 +32,17 @@ let
|
||||
}
|
||||
else result;
|
||||
|
||||
buildPythonPackage = makeOverridablePythonPackage (lib.makeOverridable (callPackage ./mk-python-derivation.nix {
|
||||
mkPythonDerivation = if python.isPy3k then
|
||||
./mk-python-derivation.nix
|
||||
else
|
||||
./python2/mk-python-derivation.nix;
|
||||
|
||||
buildPythonPackage = makeOverridablePythonPackage (lib.makeOverridable (callPackage mkPythonDerivation {
|
||||
inherit namePrefix; # We want Python libraries to be named like e.g. "python3.6-${name}"
|
||||
inherit toPythonModule; # Libraries provide modules
|
||||
}));
|
||||
|
||||
buildPythonApplication = makeOverridablePythonPackage (lib.makeOverridable (callPackage ./mk-python-derivation.nix {
|
||||
buildPythonApplication = makeOverridablePythonPackage (lib.makeOverridable (callPackage mkPythonDerivation {
|
||||
namePrefix = ""; # Python applications should not have any prefix
|
||||
toPythonModule = x: x; # Application does not provide modules.
|
||||
}));
|
||||
|
||||
Reference in New Issue
Block a user