python: add pythonNamespacesHook

This commit is contained in:
Jonathan Ringer
2020-03-17 14:29:47 -07:00
committed by Jon
parent 16516cec82
commit a9c994ad0b
4 changed files with 68 additions and 1 deletions

View File

@@ -16,6 +16,7 @@
, pipInstallHook
, pythonCatchConflictsHook
, pythonImportsCheckHook
, pythonNamespacesHook
, pythonRemoveBinBytecodeHook
, pythonRemoveTestsDirHook
, setuptoolsBuildHook
@@ -131,6 +132,9 @@ let
] ++ lib.optionals (stdenv.buildPlatform == stdenv.hostPlatform) [
# This is a test, however, it should be ran independent of the checkPhase and checkInputs
pythonImportsCheckHook
] ++ lib.optionals (python.pythonAtLeast "3.3") [
# Optionally enforce PEP420 for python3
pythonNamespacesHook
] ++ nativeBuildInputs;
buildInputs = buildInputs ++ pythonPath;