Merge pull request #245475 from Artturin/splicepython1

This commit is contained in:
Artturi 2023-07-26 22:43:37 +03:00 committed by GitHub
commit 906f999a2f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 6 deletions

View File

@ -1,9 +1,9 @@
self: super: with self;
self: dontUse: with self;
let
pythonInterpreter = super.python.pythonForBuild.interpreter;
pythonSitePackages = super.python.sitePackages;
pythonCheckInterpreter = super.python.interpreter;
pythonInterpreter = python.pythonForBuild.interpreter;
pythonSitePackages = python.sitePackages;
pythonCheckInterpreter = python.interpreter;
setuppy = ../run_setup.py;
in {
makePythonHook = args: pkgs.makeSetupHook ({passthru.provides.setupHook = true; } // args);

View File

@ -47,12 +47,13 @@
selfTargetTarget = pythonOnTargetForTarget.pkgs or {}; # There is no Python TargetTarget.
};
hooks = import ./hooks/default.nix;
keep = lib.extends hooks pythonPackagesFun;
keep = self: hooks self {};
extra = _: {};
optionalExtensions = cond: as: lib.optionals cond as;
pythonExtension = import ../../../top-level/python-packages.nix;
python2Extension = import ../../../top-level/python2-packages.nix;
extensions = lib.composeManyExtensions ([
hooks
pythonExtension
] ++ (optionalExtensions (!self.isPy3k) [
python2Extension
@ -64,7 +65,7 @@
otherSplices
keep
extra
(lib.extends (lib.composeExtensions aliases extensions) keep))
(lib.extends (lib.composeExtensions aliases extensions) pythonPackagesFun))
{
overrides = packageOverrides;
python = self;