diff --git a/pkgs/development/interpreters/python/cpython/2.7/default.nix b/pkgs/development/interpreters/python/cpython/2.7/default.nix index 505929df8ef0..894a9b084c68 100644 --- a/pkgs/development/interpreters/python/cpython/2.7/default.nix +++ b/pkgs/development/interpreters/python/cpython/2.7/default.nix @@ -42,7 +42,7 @@ let executable = libPrefix; pythonVersion = with sourceVersion; "${major}.${minor}"; sitePackages = "lib/${libPrefix}/site-packages"; - inherit pythonForBuild; + inherit hasDistutilsCxxPatch pythonForBuild; } // { inherit ucsEncoding; }; diff --git a/pkgs/development/interpreters/python/cpython/default.nix b/pkgs/development/interpreters/python/cpython/default.nix index 7d90e201d192..60ea3bdf4c7f 100644 --- a/pkgs/development/interpreters/python/cpython/default.nix +++ b/pkgs/development/interpreters/python/cpython/default.nix @@ -39,7 +39,7 @@ let executable = libPrefix; pythonVersion = with sourceVersion; "${major}.${minor}"; sitePackages = "lib/${libPrefix}/site-packages"; - inherit pythonForBuild; + inherit hasDistutilsCxxPatch pythonForBuild; }; version = with sourceVersion; "${major}.${minor}.${patch}${suffix}"; diff --git a/pkgs/development/interpreters/python/default.nix b/pkgs/development/interpreters/python/default.nix index ef4cab350211..119c0a2728b4 100644 --- a/pkgs/development/interpreters/python/default.nix +++ b/pkgs/development/interpreters/python/default.nix @@ -13,6 +13,7 @@ with pkgs; , pythonVersion , packageOverrides , sitePackages + , hasDistutilsCxxPatch , pythonForBuild , self }: let @@ -40,7 +41,7 @@ with pkgs; inherit sourceVersion; pythonAtLeast = lib.versionAtLeast pythonVersion; pythonOlder = lib.versionOlder pythonVersion; - inherit pythonForBuild; + inherit hasDistutilsCxxPatch pythonForBuild; }; in { diff --git a/pkgs/development/interpreters/python/pypy/default.nix b/pkgs/development/interpreters/python/pypy/default.nix index 46cf0475de45..3cdc30b92340 100644 --- a/pkgs/development/interpreters/python/pypy/default.nix +++ b/pkgs/development/interpreters/python/pypy/default.nix @@ -24,6 +24,7 @@ let executable = "pypy${if isPy3k then "3" else ""}"; pythonForBuild = self; # No cross-compiling for now. sitePackages = "site-packages"; + hasDistutilsCxxPatch = false; }; pname = passthru.executable; version = with sourceVersion; "${major}.${minor}.${patch}"; diff --git a/pkgs/development/interpreters/python/pypy/prebuilt.nix b/pkgs/development/interpreters/python/pypy/prebuilt.nix index ee556ba05bf5..552f230ee712 100644 --- a/pkgs/development/interpreters/python/pypy/prebuilt.nix +++ b/pkgs/development/interpreters/python/pypy/prebuilt.nix @@ -34,6 +34,7 @@ let executable = "pypy${if isPy3k then "3" else ""}"; pythonForBuild = self; # Not possible to cross-compile with. sitePackages = "site-packages"; + hasDistutilsCxxPatch = false; }; pname = "${passthru.executable}_prebuilt"; version = with sourceVersion; "${major}.${minor}.${patch}"; diff --git a/pkgs/development/python-modules/numpy/default.nix b/pkgs/development/python-modules/numpy/default.nix index 8a7deb934ae7..171496584ef2 100644 --- a/pkgs/development/python-modules/numpy/default.nix +++ b/pkgs/development/python-modules/numpy/default.nix @@ -27,7 +27,7 @@ in buildPythonPackage rec { nativeBuildInputs = [ gfortran pytest ]; buildInputs = [ blas ]; - patches = lib.optionals (python.hasDistutilsCxxPatch or false) [ + patches = lib.optionals python.hasDistutilsCxxPatch [ # We patch cpython/distutils to fix https://bugs.python.org/issue1222585 # Patching of numpy.distutils is needed to prevent it from undoing the # patch to distutils.