mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-16 23:03:40 +01:00
python38: fix build on macOS
Python 3.8 fails to build on macOS for two reasons: * python-3.x-distutils-C++.patch fails to apply cleanly. * An #include for <util.h> is missing, causing a build failure: ./Modules/posixmodule.c:6586:9: error: implicit declaration of function 'openpty' is invalid in C99 if (openpty(&master_fd, &slave_fd, NULL, NULL, NULL) != 0) ^ Use the correct version of python-3.x-distutils-C++.patch, and add a patch to #include <util.h>.
This commit is contained in:
parent
1f4295927f
commit
81d15948cc
2 changed files with 3 additions and 2 deletions
|
@ -100,7 +100,7 @@ in with passthru; stdenv.mkDerivation {
|
|||
] ++ optionals isPy35 [
|
||||
# Backports support for LD_LIBRARY_PATH from 3.6
|
||||
./3.5/ld_library_path.patch
|
||||
] ++ optionals isPy37 [
|
||||
] ++ optionals (isPy37 || isPy38) [
|
||||
# Fix darwin build https://bugs.python.org/issue34027
|
||||
(fetchpatch {
|
||||
url = https://bugs.python.org/file47666/darwin-libutil.patch;
|
||||
|
@ -114,7 +114,7 @@ in with passthru; stdenv.mkDerivation {
|
|||
(
|
||||
if isPy35 then
|
||||
./3.5/python-3.x-distutils-C++.patch
|
||||
else if isPy37 then
|
||||
else if isPy37 || isPy38 then
|
||||
./3.7/python-3.x-distutils-C++.patch
|
||||
else
|
||||
fetchpatch {
|
||||
|
|
|
@ -28,6 +28,7 @@ with pkgs;
|
|||
isPy35 = pythonVersion == "3.5";
|
||||
isPy36 = pythonVersion == "3.6";
|
||||
isPy37 = pythonVersion == "3.7";
|
||||
isPy38 = pythonVersion == "3.8";
|
||||
isPy2 = lib.strings.substring 0 1 pythonVersion == "2";
|
||||
isPy3 = lib.strings.substring 0 1 pythonVersion == "3";
|
||||
isPy3k = isPy3;
|
||||
|
|
Loading…
Reference in a new issue