From 22f2052ca1e7b7cfb4b090faa2d924c3e27e4742 Mon Sep 17 00:00:00 2001 From: Emily Date: Tue, 5 Nov 2024 23:11:31 +0000 Subject: [PATCH] python{27,39,310,311,312,313,314}: drop Darwin `libutil` patch --- .../python/cpython/2.7/default.nix | 4 ---- .../python/cpython/3.11/darwin-libutil.patch | 13 ----------- .../python/cpython/3.7/darwin-libutil.patch | 23 ------------------- .../interpreters/python/cpython/default.nix | 5 ---- 4 files changed, 45 deletions(-) delete mode 100644 pkgs/development/interpreters/python/cpython/3.11/darwin-libutil.patch delete mode 100644 pkgs/development/interpreters/python/cpython/3.7/darwin-libutil.patch diff --git a/pkgs/development/interpreters/python/cpython/2.7/default.nix b/pkgs/development/interpreters/python/cpython/2.7/default.nix index 0d2ebd009731..7e926d682810 100644 --- a/pkgs/development/interpreters/python/cpython/2.7/default.nix +++ b/pkgs/development/interpreters/python/cpython/2.7/default.nix @@ -140,10 +140,6 @@ let ] ++ lib.optionals (x11Support && stdenv.hostPlatform.isDarwin) [ ./use-correct-tcl-tk-on-darwin.patch - ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ - # Fix darwin build https://bugs.python.org/issue34027 - ../3.7/darwin-libutil.patch - ] ++ lib.optionals stdenv.hostPlatform.isLinux [ # Disable the use of ldconfig in ctypes.util.find_library (since diff --git a/pkgs/development/interpreters/python/cpython/3.11/darwin-libutil.patch b/pkgs/development/interpreters/python/cpython/3.11/darwin-libutil.patch deleted file mode 100644 index 92b846be0002..000000000000 --- a/pkgs/development/interpreters/python/cpython/3.11/darwin-libutil.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c -index 40229bce0f..3cc604930e 100644 ---- a/Modules/posixmodule.c -+++ b/Modules/posixmodule.c -@@ -7258,7 +7258,7 @@ os_sched_getaffinity_impl(PyObject *module, pid_t pid) - #ifdef HAVE_UTMP_H - #include - #endif /* HAVE_UTMP_H */ --#elif defined(HAVE_LIBUTIL_H) -+#elif defined(HAVE_LIBUTIL_H) && !defined(__APPLE__) - #include - #elif defined(HAVE_UTIL_H) - #include diff --git a/pkgs/development/interpreters/python/cpython/3.7/darwin-libutil.patch b/pkgs/development/interpreters/python/cpython/3.7/darwin-libutil.patch deleted file mode 100644 index 51e3cb6d7f11..000000000000 --- a/pkgs/development/interpreters/python/cpython/3.7/darwin-libutil.patch +++ /dev/null @@ -1,23 +0,0 @@ -diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c -index c3682b4..16826c6 100644 ---- a/Modules/posixmodule.c -+++ b/Modules/posixmodule.c -@@ -5880,15 +5880,13 @@ error: - #if defined(HAVE_OPENPTY) || defined(HAVE_FORKPTY) || defined(HAVE_DEV_PTMX) - #ifdef HAVE_PTY_H - #include --#else -+#endif - #ifdef HAVE_LIBUTIL_H - #include --#else -+#endif - #ifdef HAVE_UTIL_H - #include --#endif /* HAVE_UTIL_H */ --#endif /* HAVE_LIBUTIL_H */ --#endif /* HAVE_PTY_H */ -+#endif - #ifdef HAVE_STROPTS_H - #include - #endif diff --git a/pkgs/development/interpreters/python/cpython/default.nix b/pkgs/development/interpreters/python/cpython/default.nix index f9da42de0b1c..20c7c0c145ef 100644 --- a/pkgs/development/interpreters/python/cpython/default.nix +++ b/pkgs/development/interpreters/python/cpython/default.nix @@ -271,11 +271,6 @@ in with passthru; stdenv.mkDerivation (finalAttrs: { ] ++ optionals mimetypesSupport [ # Make the mimetypes module refer to the right file ./mimetypes.patch - ] ++ optionals (pythonAtLeast "3.7" && pythonOlder "3.11") [ - # Fix darwin build https://bugs.python.org/issue34027 - ./3.7/darwin-libutil.patch - ] ++ optionals (pythonAtLeast "3.11") [ - ./3.11/darwin-libutil.patch ] ++ optionals (pythonAtLeast "3.9" && pythonOlder "3.11" && stdenv.hostPlatform.isDarwin) [ # Stop checking for TCL/TK in global macOS locations ./3.9/darwin-tcl-tk.patch