From 9d8831c8fe31ce26777274af68054c55342f48dc Mon Sep 17 00:00:00 2001 From: Greg Price Date: Sun, 29 Mar 2020 15:32:53 -0700 Subject: [PATCH] cpython: Drop unrecognized --with-threads configure flag. The ./configure script prints a warning when passed this flag, starting with 3.7: configure: WARNING: unrecognized options: --with-threads The reason is that there's no longer such a thing as a build without threads. Eliminate the warning, by only passing the flag on the older releases that accept it. Upstream change and discussion: https://github.com/python/cpython/commit/a6a4dc816 https://bugs.python.org/issue31370 --- pkgs/development/interpreters/python/cpython/default.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/development/interpreters/python/cpython/default.nix b/pkgs/development/interpreters/python/cpython/default.nix index b778b62f908..1df70fb99cc 100644 --- a/pkgs/development/interpreters/python/cpython/default.nix +++ b/pkgs/development/interpreters/python/cpython/default.nix @@ -136,10 +136,12 @@ in with passthru; stdenv.mkDerivation { configureFlags = [ "--enable-shared" - "--with-threads" "--without-ensurepip" "--with-system-expat" "--with-system-ffi" + ] ++ optionals (pythonOlder "3.7") [ + # This is unconditionally true starting in CPython 3.7. + "--with-threads" ] ++ optionals (sqlite != null && isPy3k) [ "--enable-loadable-sqlite-extensions" ] ++ optionals (openssl != null) [