Merge staging-next into staging

This commit is contained in:
github-actions[bot]
2024-10-14 12:06:08 +00:00
committed by GitHub
106 changed files with 2530 additions and 661 deletions
@@ -215,23 +215,6 @@ let
isSetuptoolsDependency = isSetuptoolsDependency' (attrs.pname or null);
passthru =
attrs.passthru or { }
// {
updateScript = let
filename = head (splitString ":" self.meta.position);
in attrs.passthru.updateScript or [ update-python-libraries filename ];
}
// optionalAttrs (dependencies != []) {
inherit dependencies;
}
// optionalAttrs (optional-dependencies != {}) {
inherit optional-dependencies;
}
// optionalAttrs (build-system != []) {
inherit build-system;
};
# Keep extra attributes from `attrs`, e.g., `patchPhase', etc.
self = toPythonModule (stdenv.mkDerivation ((cleanAttrs attrs) // {
@@ -324,7 +307,21 @@ let
outputs = outputs ++ optional withDistOutput "dist";
inherit passthru;
passthru = attrs.passthru or { }
// {
updateScript = let
filename = head (splitString ":" self.meta.position);
in attrs.passthru.updateScript or [ update-python-libraries filename ];
}
// optionalAttrs (dependencies != []) {
inherit dependencies;
}
// optionalAttrs (optional-dependencies != {}) {
inherit optional-dependencies;
}
// optionalAttrs (build-system != []) {
inherit build-system;
};
meta = {
# default to python's platforms
@@ -351,5 +348,5 @@ let
in extendDerivation
(disabled -> throw "${name} not supported for interpreter ${python.executable}")
passthru
{ }
self
@@ -37,15 +37,15 @@ let
else
./python2/mk-python-derivation.nix;
buildPythonPackage = makeOverridablePythonPackage (lib.makeOverridable (callPackage mkPythonDerivation {
buildPythonPackage = makeOverridablePythonPackage (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 mkPythonDerivation {
buildPythonApplication = makeOverridablePythonPackage (callPackage mkPythonDerivation {
namePrefix = ""; # Python applications should not have any prefix
toPythonModule = x: x; # Application does not provide modules.
}));
});
# Check whether a derivation provides a Python module.
hasPythonModule = drv: drv?pythonModule && drv.pythonModule == python;
+19 -17
View File
@@ -75,7 +75,7 @@ let
is_virtualenv = "False";
};
} // lib.optionalAttrs (python.pythonAtLeast "3.8") {
} // {
# Venv built using Python Nix environment (python.buildEnv)
# TODO: Cannot create venv from a nix env
# Error: Command '['/nix/store/ddc8nqx73pda86ibvhzdmvdsqmwnbjf7-python3-3.7.6-venv/bin/python3.7', '-Im', 'ensurepip', '--upgrade', '--default-pip']' returned non-zero exit status 1.
@@ -105,22 +105,24 @@ let
# Integration tests involving the package set.
# All PyPy package builds are broken at the moment
integrationTests = lib.optionalAttrs (!python.isPyPy) (
lib.optionalAttrs (python.isPy3k && !stdenv.hostPlatform.isDarwin) { # darwin has no split-debug
cpython-gdb = callPackage ./tests/test_cpython_gdb {
interpreter = python;
};
} // lib.optionalAttrs (python.pythonAtLeast "3.7") {
# Before the addition of NIX_PYTHONPREFIX mypy was broken with typed packages
nix-pythonprefix-mypy = callPackage ./tests/test_nix_pythonprefix {
interpreter = python;
};
# Make sure tkinter is importable. See https://github.com/NixOS/nixpkgs/issues/238990
tkinter = callPackage ./tests/test_tkinter {
interpreter = python;
};
}
);
integrationTests = lib.optionalAttrs (!python.isPyPy) ({
# Make sure tkinter is importable. See https://github.com/NixOS/nixpkgs/issues/238990
tkinter = callPackage ./tests/test_tkinter {
interpreter = python;
};
} // lib.optionalAttrs (python.isPy3k && python.pythonOlder "3.13" && !stdenv.hostPlatform.isDarwin) { # darwin has no split-debug
# fails on python3.13
cpython-gdb = callPackage ./tests/test_cpython_gdb {
interpreter = python;
};
} // lib.optionalAttrs (python.isPy3k && python.pythonOlder "3.13") {
# Before the addition of NIX_PYTHONPREFIX mypy was broken with typed packages
# mypy does not yet support python3.13
# https://github.com/python/mypy/issues/17264
nix-pythonprefix-mypy = callPackage ./tests/test_nix_pythonprefix {
interpreter = python;
};
});
# Test editable package support
editableTests = let