mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-23 07:23:20 +00:00
Revert "Revert "buildPython*: store dist (wheel/sdist) in dist output""
Most packages were fixed on python-unstable.
This reverts commit 0a4898c21a
.
This commit is contained in:
parent
8895944c57
commit
86ab83260f
@ -114,6 +114,11 @@ in rec {
|
||||
};
|
||||
} ./python-namespaces-hook.sh) {};
|
||||
|
||||
pythonOutputDistHook = callPackage ({ }:
|
||||
makeSetupHook {
|
||||
name = "python-output-dist-hook";
|
||||
} ./python-output-dist-hook.sh ) {};
|
||||
|
||||
pythonRecompileBytecodeHook = callPackage ({ }:
|
||||
makeSetupHook {
|
||||
name = "python-recompile-bytecode-hook";
|
||||
|
@ -0,0 +1,10 @@
|
||||
# Setup hook for storing dist folder (wheels/sdists) in a separate output
|
||||
echo "Sourcing python-catch-conflicts-hook.sh"
|
||||
|
||||
pythonOutputDistPhase() {
|
||||
echo "Executing pythonOutputDistPhase"
|
||||
mv "dist" "$dist"
|
||||
echo "Finished executing pythonOutputDistPhase"
|
||||
}
|
||||
|
||||
preFixupPhases+=" pythonOutputDistPhase"
|
@ -17,6 +17,7 @@
|
||||
, pythonCatchConflictsHook
|
||||
, pythonImportsCheckHook
|
||||
, pythonNamespacesHook
|
||||
, pythonOutputDistHook
|
||||
, pythonRemoveBinBytecodeHook
|
||||
, pythonRemoveTestsDirHook
|
||||
, setuptoolsBuildHook
|
||||
@ -49,6 +50,8 @@
|
||||
# Enabled to detect some (native)BuildInputs mistakes
|
||||
, strictDeps ? true
|
||||
|
||||
, outputs ? [ "out" ]
|
||||
|
||||
# used to disable derivation, useful for specific python versions
|
||||
, disabled ? false
|
||||
|
||||
@ -106,11 +109,13 @@ else
|
||||
let
|
||||
inherit (python) stdenv;
|
||||
|
||||
withDistOutput = lib.elem format ["pyproject" "setuptools" "flit"];
|
||||
|
||||
name_ = name;
|
||||
|
||||
self = toPythonModule (stdenv.mkDerivation ((builtins.removeAttrs attrs [
|
||||
"disabled" "checkPhase" "checkInputs" "doCheck" "doInstallCheck" "dontWrapPythonPrograms" "catchConflicts" "format"
|
||||
"disabledTestPaths"
|
||||
"disabledTestPaths" "outputs"
|
||||
]) // {
|
||||
|
||||
name = namePrefix + name_;
|
||||
@ -144,6 +149,8 @@ let
|
||||
] ++ lib.optionals (python.pythonAtLeast "3.3") [
|
||||
# Optionally enforce PEP420 for python3
|
||||
pythonNamespacesHook
|
||||
] ++ lib.optionals withDistOutput [
|
||||
pythonOutputDistHook
|
||||
] ++ nativeBuildInputs;
|
||||
|
||||
buildInputs = buildInputs ++ pythonPath;
|
||||
@ -177,6 +184,8 @@ let
|
||||
# Python packages built through cross-compilation are always for the host platform.
|
||||
disallowedReferences = lib.optionals (python.stdenv.hostPlatform != python.stdenv.buildPlatform) [ python.pythonForBuild ];
|
||||
|
||||
outputs = outputs ++ lib.optional withDistOutput "dist";
|
||||
|
||||
meta = {
|
||||
# default to python's platforms
|
||||
platforms = python.meta.platforms;
|
||||
|
@ -119,6 +119,7 @@ in {
|
||||
pythonCatchConflictsHook
|
||||
pythonImportsCheckHook
|
||||
pythonNamespacesHook
|
||||
pythonOutputDistHook
|
||||
pythonRecompileBytecodeHook
|
||||
pythonRelaxDepsHook
|
||||
pythonRemoveBinBytecodeHook
|
||||
|
Loading…
Reference in New Issue
Block a user