From 4ef8e67ca02dd6256287f0a43624ec3d8997a7a9 Mon Sep 17 00:00:00 2001 From: Josef Kemetmueller Date: Tue, 25 Jul 2017 20:47:25 +0200 Subject: [PATCH 1/3] python34: Make distutils call C++ compiler when needed --- .../interpreters/python/cpython/3.4/default.nix | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/pkgs/development/interpreters/python/cpython/3.4/default.nix b/pkgs/development/interpreters/python/cpython/3.4/default.nix index e188e7ff48a46..304d3cc33bc64 100644 --- a/pkgs/development/interpreters/python/cpython/3.4/default.nix +++ b/pkgs/development/interpreters/python/cpython/3.4/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl +{ stdenv, fetchurl, fetchpatch , bzip2 , expat , libffi @@ -63,7 +63,13 @@ in stdenv.mkDerivation { substituteInPlace configure --replace '`/usr/bin/arch`' '"i386"' substituteInPlace configure --replace '-Wl,-stack_size,1000000' ' ' ''; - + patches = [ + (fetchpatch { # Make distutils choose CXX to compile C++, see https://bugs.python.org/issue1222585 + url = "https://bugs.python.org/file47046/python-3.x-distutils-C++.patch"; + sha256 = "0dgdn9k2kmw4wh90vdnjcrnn97ylxgx7mbn9l87fwz6j501jqvk8"; + addPrefixes = true; + }) + ]; postPatch = '' # Determinism substituteInPlace "Lib/py_compile.py" --replace "source_stats['mtime']" "(1 if 'DETERMINISTIC_BUILD' in os.environ else source_stats['mtime'])" From 2b177e2304761df6430ce684473cd2a8b285d1bc Mon Sep 17 00:00:00 2001 From: Josef Kemetmueller Date: Tue, 25 Jul 2017 20:48:06 +0200 Subject: [PATCH 2/3] python35: Make distutils call C++ compiler when needed --- pkgs/development/interpreters/python/cpython/3.5/default.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkgs/development/interpreters/python/cpython/3.5/default.nix b/pkgs/development/interpreters/python/cpython/3.5/default.nix index 32bc0e22d1dae..cd3ea4d24707e 100644 --- a/pkgs/development/interpreters/python/cpython/3.5/default.nix +++ b/pkgs/development/interpreters/python/cpython/3.5/default.nix @@ -65,6 +65,11 @@ in stdenv.mkDerivation { ''; patches = [ + (fetchpatch { # Make distutils choose CXX to compile C++, see https://bugs.python.org/issue1222585 + url = "https://bugs.python.org/file47046/python-3.x-distutils-C++.patch"; + sha256 = "0dgdn9k2kmw4wh90vdnjcrnn97ylxgx7mbn9l87fwz6j501jqvk8"; + addPrefixes = true; + }) ./no-ldconfig.patch ]; From 2bf1d0afd22ef43b23909b3436bfd32f1d04460a Mon Sep 17 00:00:00 2001 From: Josef Kemetmueller Date: Tue, 25 Jul 2017 20:49:51 +0200 Subject: [PATCH 3/3] python36: Make distutils call C++ compiler when needed --- pkgs/development/interpreters/python/cpython/3.6/default.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkgs/development/interpreters/python/cpython/3.6/default.nix b/pkgs/development/interpreters/python/cpython/3.6/default.nix index 7e05a0ce61c9f..9fb52bf7a6816 100644 --- a/pkgs/development/interpreters/python/cpython/3.6/default.nix +++ b/pkgs/development/interpreters/python/cpython/3.6/default.nix @@ -65,6 +65,11 @@ in stdenv.mkDerivation { ''; patches = [ + (fetchpatch { # Make distutils choose CXX to compile C++, see https://bugs.python.org/issue1222585 + url = "https://bugs.python.org/file47046/python-3.x-distutils-C++.patch"; + sha256 = "0dgdn9k2kmw4wh90vdnjcrnn97ylxgx7mbn9l87fwz6j501jqvk8"; + addPrefixes = true; + }) ./no-ldconfig.patch ];