From 7bf27e562a7847831d45e2f1045b6d9cc44cd998 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Mon, 28 Nov 2022 02:24:37 +0100 Subject: [PATCH 01/13] python3Packages.rig: drop Broken, unsupported, unmaintained. Constrained to EOL python versions. --- .../python-modules/rig/default.nix | 29 ------------------- pkgs/top-level/python-aliases.nix | 1 + pkgs/top-level/python-packages.nix | 2 -- 3 files changed, 1 insertion(+), 31 deletions(-) delete mode 100644 pkgs/development/python-modules/rig/default.nix diff --git a/pkgs/development/python-modules/rig/default.nix b/pkgs/development/python-modules/rig/default.nix deleted file mode 100644 index bc43aac3551a..000000000000 --- a/pkgs/development/python-modules/rig/default.nix +++ /dev/null @@ -1,29 +0,0 @@ -{ lib, buildPythonPackage, fetchPypi -, isPy35, isPy27 -, numpy, pytz, six, enum-compat, sentinel -}: - -buildPythonPackage rec { - pname = "rig"; - version = "2.4.1"; - - src = fetchPypi { - inherit pname version; - sha256 = "5a3896dbde3f291c5dd34769e7329ef5d5e4da34fee53479bd13dc5e5d540b8a"; - }; - - propagatedBuildInputs = [ numpy pytz six sentinel enum-compat ]; - - # This is the list of officially supported versions. Other versions may work - # as well. - disabled = !(isPy27 || isPy35); - - # Test Phase is only supported in development sources. - doCheck = false; - - meta = with lib; { - description = "A collection of tools for developing SpiNNaker applications"; - homepage = "https://github.com/project-rig/rig"; - license = licenses.gpl2; - }; -} diff --git a/pkgs/top-level/python-aliases.nix b/pkgs/top-level/python-aliases.nix index 157a0cd4815d..14dcac6cbe27 100644 --- a/pkgs/top-level/python-aliases.nix +++ b/pkgs/top-level/python-aliases.nix @@ -186,6 +186,7 @@ mapAliases ({ repeated_test = repeated-test; # added 2022-11-15 requests_oauthlib = requests-oauthlib; # added 2022-02-12 requests_toolbelt = requests-toolbelt; # added 2017-09-26 + rig = throw "rig has been removed because it was pinned to python 2.7 and 3.5, failed to build and is otherwise unmaintained"; # added 2022-11-28 roboschool = throw "roboschool is deprecated in favor of PyBullet and has been removed"; # added 2022-01-15 ROPGadget = ropgadget; # added 2021-07-06 rotate-backups = throw "rotate-backups was removed in favor of the top-level rotate-backups"; # added 2021-07-01 diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index de974a06fedd..45f99ffc0357 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -9794,8 +9794,6 @@ self: super: with self; { rich-rst = callPackage ../development/python-modules/rich-rst { }; - rig = callPackage ../development/python-modules/rig { }; - ring-doorbell = callPackage ../development/python-modules/ring-doorbell { }; ripe-atlas-cousteau = callPackage ../development/python-modules/ripe-atlas-cousteau { }; From df2d130ee0f9f32ac43a36c40535b731d8b4bf03 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Mon, 28 Nov 2022 02:26:00 +0100 Subject: [PATCH 02/13] python3Packages.dataclasses: drop Only required on python36, which was dropped a while ago. --- .../science/engineering/strictdoc/default.nix | 4 ---- .../python-modules/apache-airflow/default.nix | 5 +---- .../python-modules/bellows/default.nix | 3 --- .../python-modules/betterproto/default.nix | 5 +---- .../python-modules/bpython/default.nix | 5 +---- .../python-modules/dataclasses/default.nix | 21 ------------------- .../python-modules/eyed3/default.nix | 8 +++---- .../python-modules/gruut/default.nix | 4 ---- .../python-modules/ircrobots/default.nix | 5 +---- .../python-modules/labelbox/default.nix | 4 +--- .../python-modules/pathy/default.nix | 5 +---- .../python-modules/pixcat/default.nix | 3 +-- .../python-modules/poetry/default.nix | 1 - .../python-modules/pudb/default.nix | 5 +---- .../python-modules/reqif/default.nix | 4 ---- .../python-modules/rich/default.nix | 5 +---- .../python-modules/screeninfo/default.nix | 7 +------ .../python-modules/simple-di/default.nix | 3 --- .../spacy-transformers/default.nix | 5 +---- .../python-modules/thinc/default.nix | 2 -- .../python-modules/werkzeug/default.nix | 3 --- .../tools/database/sqlfluff/default.nix | 2 -- pkgs/top-level/python-packages.nix | 2 -- 23 files changed, 15 insertions(+), 96 deletions(-) delete mode 100644 pkgs/development/python-modules/dataclasses/default.nix diff --git a/pkgs/applications/science/engineering/strictdoc/default.nix b/pkgs/applications/science/engineering/strictdoc/default.nix index 3fc61b845156..ce834f7d576b 100644 --- a/pkgs/applications/science/engineering/strictdoc/default.nix +++ b/pkgs/applications/science/engineering/strictdoc/default.nix @@ -3,14 +3,12 @@ , buildPythonApplication , fetchFromGitHub , python3 -, pythonOlder , html5lib , invoke , openpyxl , poetry-core , tidylib , beautifulsoup4 -, dataclasses , datauri , docutils , jinja2 @@ -73,8 +71,6 @@ buildPythonApplication rec { textx xlrd XlsxWriter - ] ++ lib.optionals (pythonOlder "3.7") [ - dataclasses ]; checkInputs = [ diff --git a/pkgs/development/python-modules/apache-airflow/default.nix b/pkgs/development/python-modules/apache-airflow/default.nix index d3911f370160..a916ac01144b 100644 --- a/pkgs/development/python-modules/apache-airflow/default.nix +++ b/pkgs/development/python-modules/apache-airflow/default.nix @@ -16,7 +16,6 @@ , cron-descriptor , croniter , cryptography -, dataclasses , deprecated , dill , flask @@ -137,7 +136,7 @@ buildPythonPackage rec { inherit version; src = airflow-src; - disabled = pythonOlder "3.6"; + disabled = pythonOlder "3.7"; propagatedBuildInputs = [ alembic @@ -203,8 +202,6 @@ buildPythonPackage rec { typing-extensions unicodecsv werkzeug - ] ++ lib.optionals (pythonOlder "3.7") [ - dataclasses ] ++ lib.optionals (pythonOlder "3.9") [ importlib-metadata ] ++ providerDependencies; diff --git a/pkgs/development/python-modules/bellows/default.nix b/pkgs/development/python-modules/bellows/default.nix index dde3a12480ca..54f5a1b0f16c 100644 --- a/pkgs/development/python-modules/bellows/default.nix +++ b/pkgs/development/python-modules/bellows/default.nix @@ -3,7 +3,6 @@ , fetchFromGitHub , click , click-log -, dataclasses , pure-pcapy3 , pyserial-asyncio , voluptuous @@ -34,8 +33,6 @@ buildPythonPackage rec { pyserial-asyncio voluptuous zigpy - ] ++ lib.optionals (pythonOlder "3.7") [ - dataclasses ]; checkInputs = [ diff --git a/pkgs/development/python-modules/betterproto/default.nix b/pkgs/development/python-modules/betterproto/default.nix index b49204ee8c44..e8b49dd839ae 100644 --- a/pkgs/development/python-modules/betterproto/default.nix +++ b/pkgs/development/python-modules/betterproto/default.nix @@ -5,7 +5,6 @@ , poetry-core , grpclib , python-dateutil -, dataclasses , black , jinja2 , isort @@ -21,7 +20,7 @@ buildPythonPackage rec { pname = "betterproto"; version = "2.0.0b5"; format = "pyproject"; - disabled = pythonOlder "3.6"; + disabled = pythonOlder "3.7"; src = fetchFromGitHub { owner = "danielgtaylor"; @@ -35,8 +34,6 @@ buildPythonPackage rec { propagatedBuildInputs = [ grpclib python-dateutil - ] ++ lib.optionals (pythonOlder "3.7") [ - dataclasses ]; passthru.optional-dependencies.compiler = [ diff --git a/pkgs/development/python-modules/bpython/default.nix b/pkgs/development/python-modules/bpython/default.nix index f919d5cabe29..56c30df15eec 100644 --- a/pkgs/development/python-modules/bpython/default.nix +++ b/pkgs/development/python-modules/bpython/default.nix @@ -3,7 +3,6 @@ , fetchPypi , curtsies , cwcwidth -, dataclasses , greenlet , jedi , pygments @@ -23,7 +22,7 @@ buildPythonPackage rec { version = "0.23"; format = "setuptools"; - disabled = pythonOlder "3.6"; + disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; @@ -42,8 +41,6 @@ buildPythonPackage rec { typing-extensions urwid watchdog - ] ++ lib.optionals (pythonOlder "3.7") [ - dataclasses ]; postInstall = '' diff --git a/pkgs/development/python-modules/dataclasses/default.nix b/pkgs/development/python-modules/dataclasses/default.nix deleted file mode 100644 index c276e9d000b2..000000000000 --- a/pkgs/development/python-modules/dataclasses/default.nix +++ /dev/null @@ -1,21 +0,0 @@ -{ lib, buildPythonPackage, fetchPypi, isPy36 }: - -buildPythonPackage rec { - pname = "dataclasses"; - version = "0.8"; - - # backport only works on Python 3.6, and is in the standard library in Python 3.7 - disabled = !isPy36; - - src = fetchPypi { - inherit pname version; - sha256 = "8479067f342acf957dc82ec415d355ab5edb7e7646b90dc6e2fd1d96ad084c97"; - }; - - meta = with lib; { - description = "An implementation of PEP 557: Data Classes"; - homepage = "https://github.com/ericvsmith/dataclasses"; - license = licenses.asl20; - maintainers = with maintainers; [ catern ]; - }; -} diff --git a/pkgs/development/python-modules/eyed3/default.nix b/pkgs/development/python-modules/eyed3/default.nix index 7adbba522e9b..2b5cc5afba75 100644 --- a/pkgs/development/python-modules/eyed3/default.nix +++ b/pkgs/development/python-modules/eyed3/default.nix @@ -1,13 +1,11 @@ { lib , buildPythonPackage , fetchPypi -, pythonOlder , python , isPyPy , six , filetype , deprecation -, dataclasses }: buildPythonPackage rec { @@ -25,8 +23,10 @@ buildPythonPackage rec { doCheck = false; propagatedBuildInputs = [ - six filetype deprecation - ] ++ lib.optional (pythonOlder "3.7") dataclasses; + deprecation + filetype + six + ]; postInstall = '' for prog in "$out/bin/"*; do diff --git a/pkgs/development/python-modules/gruut/default.nix b/pkgs/development/python-modules/gruut/default.nix index f36c9daa12d8..f9c042582335 100644 --- a/pkgs/development/python-modules/gruut/default.nix +++ b/pkgs/development/python-modules/gruut/default.nix @@ -1,7 +1,6 @@ { lib , buildPythonPackage , callPackage -, pythonOlder , fetchFromGitHub , babel , gruut-ipa @@ -9,7 +8,6 @@ , jsonlines , num2words , python-crfsuite -, dataclasses , python , networkx , glibcLocales @@ -61,8 +59,6 @@ buildPythonPackage rec { python-crfsuite dateparser networkx - ] ++ lib.optionals (pythonOlder "3.7") [ - dataclasses ] ++ (map (lang: callPackage ./language-pack.nix { inherit lang version format src; }) langPkgs); diff --git a/pkgs/development/python-modules/ircrobots/default.nix b/pkgs/development/python-modules/ircrobots/default.nix index e16ac2449a7d..8351ff3d86be 100644 --- a/pkgs/development/python-modules/ircrobots/default.nix +++ b/pkgs/development/python-modules/ircrobots/default.nix @@ -5,7 +5,6 @@ , anyio , asyncio-rlock , asyncio-throttle -, dataclasses , ircstates , async_stagger , async-timeout @@ -15,7 +14,7 @@ buildPythonPackage rec { pname = "ircrobots"; version = "0.4.6"; - disabled = pythonOlder "3.6"; + disabled = pythonOlder "3.7"; src = fetchFromGitHub { owner = "jesopo"; @@ -38,8 +37,6 @@ buildPythonPackage rec { ircstates async_stagger async-timeout - ] ++ lib.optionals (pythonOlder "3.7") [ - dataclasses ]; checkPhase = '' diff --git a/pkgs/development/python-modules/labelbox/default.nix b/pkgs/development/python-modules/labelbox/default.nix index 9b0b241c5ed1..08a1fa5ca5ea 100644 --- a/pkgs/development/python-modules/labelbox/default.nix +++ b/pkgs/development/python-modules/labelbox/default.nix @@ -2,7 +2,6 @@ , backoff , backports-datetime-fromisoformat , buildPythonPackage -, dataclasses , fetchFromGitHub , google-api-core , jinja2 @@ -20,7 +19,7 @@ buildPythonPackage rec { pname = "labelbox"; version = "3.24.1"; - disabled = pythonOlder "3.6"; + disabled = pythonOlder "3.7"; src = fetchFromGitHub { owner = "Labelbox"; @@ -32,7 +31,6 @@ buildPythonPackage rec { propagatedBuildInputs = [ backoff backports-datetime-fromisoformat - dataclasses google-api-core jinja2 ndjson diff --git a/pkgs/development/python-modules/pathy/default.nix b/pkgs/development/python-modules/pathy/default.nix index 30cdd782df2e..d937c0a43128 100644 --- a/pkgs/development/python-modules/pathy/default.nix +++ b/pkgs/development/python-modules/pathy/default.nix @@ -1,6 +1,5 @@ { lib , buildPythonPackage -, dataclasses , fetchPypi , fetchpatch , google-cloud-storage @@ -16,7 +15,7 @@ buildPythonPackage rec { version = "0.6.1"; format = "setuptools"; - disabled = pythonOlder "3.6"; + disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; @@ -27,8 +26,6 @@ buildPythonPackage rec { smart-open typer google-cloud-storage - ] ++ lib.optionals (pythonOlder "3.7") [ - dataclasses ]; checkInputs = [ diff --git a/pkgs/development/python-modules/pixcat/default.nix b/pkgs/development/python-modules/pixcat/default.nix index 026685cd6341..90fdae5dcf03 100644 --- a/pkgs/development/python-modules/pixcat/default.nix +++ b/pkgs/development/python-modules/pixcat/default.nix @@ -5,7 +5,6 @@ , docopt , pillow , requests -, dataclasses , pythonOlder }: @@ -13,7 +12,7 @@ buildPythonPackage rec { pname = "pixcat"; version = "0.1.4"; - disabled = pythonOlder "3.6"; + disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; diff --git a/pkgs/development/python-modules/poetry/default.nix b/pkgs/development/python-modules/poetry/default.nix index 8f62c3e6eb16..2e81f7e55312 100644 --- a/pkgs/development/python-modules/poetry/default.nix +++ b/pkgs/development/python-modules/poetry/default.nix @@ -5,7 +5,6 @@ , cachy , cleo , crashtest -, dataclasses , deepdiff , dulwich , fetchFromGitHub diff --git a/pkgs/development/python-modules/pudb/default.nix b/pkgs/development/python-modules/pudb/default.nix index c135b0b5ccf2..9976d6024917 100644 --- a/pkgs/development/python-modules/pudb/default.nix +++ b/pkgs/development/python-modules/pudb/default.nix @@ -1,6 +1,5 @@ { lib , buildPythonPackage -, dataclasses , fetchPypi , jedi , pygments @@ -16,7 +15,7 @@ buildPythonPackage rec { version = "2022.1.2"; format = "setuptools"; - disabled = pythonOlder "3.6"; + disabled = pythonOlder "3.8"; src = fetchPypi { inherit pname version; @@ -28,8 +27,6 @@ buildPythonPackage rec { pygments urwid urwid-readline - ] ++ lib.optionals (pythonOlder "3.7") [ - dataclasses ]; checkInputs = [ diff --git a/pkgs/development/python-modules/reqif/default.nix b/pkgs/development/python-modules/reqif/default.nix index ace3052e5a9c..1e5ecc718d9d 100644 --- a/pkgs/development/python-modules/reqif/default.nix +++ b/pkgs/development/python-modules/reqif/default.nix @@ -1,13 +1,11 @@ { lib , buildPythonPackage , python -, pythonOlder , fetchFromGitHub , poetry-core , beautifulsoup4 , lxml , jinja2 -, dataclasses , pytestCheckHook }: @@ -39,8 +37,6 @@ buildPythonPackage rec { beautifulsoup4 lxml jinja2 - ] ++ lib.optionals (pythonOlder "3.7") [ - dataclasses ]; pythonImportsCheck = [ diff --git a/pkgs/development/python-modules/rich/default.nix b/pkgs/development/python-modules/rich/default.nix index 4f87364cfe20..5d9c1f45c3b3 100644 --- a/pkgs/development/python-modules/rich/default.nix +++ b/pkgs/development/python-modules/rich/default.nix @@ -3,7 +3,6 @@ , fetchFromGitHub , pythonOlder , CommonMark -, dataclasses , poetry-core , pygments , typing-extensions @@ -20,7 +19,7 @@ buildPythonPackage rec { pname = "rich"; version = "12.6.0"; format = "pyproject"; - disabled = pythonOlder "3.6"; + disabled = pythonOlder "3.7"; src = fetchFromGitHub { owner = "Textualize"; @@ -34,8 +33,6 @@ buildPythonPackage rec { propagatedBuildInputs = [ CommonMark pygments - ] ++ lib.optionals (pythonOlder "3.7") [ - dataclasses ] ++ lib.optionals (pythonOlder "3.9") [ typing-extensions ]; diff --git a/pkgs/development/python-modules/screeninfo/default.nix b/pkgs/development/python-modules/screeninfo/default.nix index 574d3159494a..6789c6b76c45 100644 --- a/pkgs/development/python-modules/screeninfo/default.nix +++ b/pkgs/development/python-modules/screeninfo/default.nix @@ -1,7 +1,6 @@ { stdenv , lib , buildPythonPackage -, dataclasses , fetchFromGitHub , libX11 , libXinerama @@ -16,7 +15,7 @@ buildPythonPackage rec { version = "0.8.1"; format = "pyproject"; - disabled = pythonOlder "3.6"; + disabled = pythonOlder "3.7"; src = fetchFromGitHub { owner = "rr-"; @@ -29,10 +28,6 @@ buildPythonPackage rec { poetry-core ]; - propagatedBuildInputs = lib.optionals (pythonOlder "3.7") [ - dataclasses - ]; - postPatch = '' substituteInPlace screeninfo/enumerators/xinerama.py \ --replace 'load_library("X11")' 'ctypes.cdll.LoadLibrary("${libX11}/lib/libX11.so")' \ diff --git a/pkgs/development/python-modules/simple-di/default.nix b/pkgs/development/python-modules/simple-di/default.nix index 150eb52f8d4e..79437c4a0b34 100644 --- a/pkgs/development/python-modules/simple-di/default.nix +++ b/pkgs/development/python-modules/simple-di/default.nix @@ -4,7 +4,6 @@ , fetchPypi , setuptools , typing-extensions -, dataclasses }: buildPythonPackage rec { @@ -23,8 +22,6 @@ buildPythonPackage rec { propagatedBuildInputs = [ setuptools typing-extensions - ] ++ lib.optionals (pythonOlder "3.7") [ - dataclasses ]; pythonImportsCheck = [ diff --git a/pkgs/development/python-modules/spacy-transformers/default.nix b/pkgs/development/python-modules/spacy-transformers/default.nix index 914e2cb5153e..14969a61b102 100644 --- a/pkgs/development/python-modules/spacy-transformers/default.nix +++ b/pkgs/development/python-modules/spacy-transformers/default.nix @@ -2,7 +2,6 @@ , callPackage , fetchPypi , buildPythonPackage -, dataclasses , torch , pythonOlder , spacy @@ -16,7 +15,7 @@ buildPythonPackage rec { version = "1.1.8"; format = "setuptools"; - disabled = pythonOlder "3.6"; + disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; @@ -29,8 +28,6 @@ buildPythonPackage rec { spacy-alignments srsly transformers - ] ++ lib.optionals (pythonOlder "3.7") [ - dataclasses ]; postPatch = '' diff --git a/pkgs/development/python-modules/thinc/default.nix b/pkgs/development/python-modules/thinc/default.nix index 334411fe26c9..2ef4fe86c2fe 100644 --- a/pkgs/development/python-modules/thinc/default.nix +++ b/pkgs/development/python-modules/thinc/default.nix @@ -11,7 +11,6 @@ , CoreVideo , cymem , cython -, dataclasses , fetchPypi , hypothesis , mock @@ -67,7 +66,6 @@ buildPythonPackage rec { typing-extensions ] ++ lib.optionals (pythonOlder "3.7") [ contextvars - dataclasses ]; checkInputs = [ diff --git a/pkgs/development/python-modules/werkzeug/default.nix b/pkgs/development/python-modules/werkzeug/default.nix index 8d3e0769786b..5562fd13b979 100644 --- a/pkgs/development/python-modules/werkzeug/default.nix +++ b/pkgs/development/python-modules/werkzeug/default.nix @@ -4,7 +4,6 @@ , pythonOlder , fetchPypi , watchdog -, dataclasses , ephemeral-port-reserve , pytest-timeout , pytest-xprocess @@ -32,8 +31,6 @@ buildPythonPackage rec { ] ++ lib.optionals (!stdenv.isDarwin) [ # watchdog requires macos-sdk 10.13+ watchdog - ] ++ lib.optionals (pythonOlder "3.7") [ - dataclasses ]; checkInputs = [ diff --git a/pkgs/development/tools/database/sqlfluff/default.nix b/pkgs/development/tools/database/sqlfluff/default.nix index 340c471c2727..7015050e2d6f 100644 --- a/pkgs/development/tools/database/sqlfluff/default.nix +++ b/pkgs/development/tools/database/sqlfluff/default.nix @@ -31,8 +31,6 @@ python3.pkgs.buildPythonApplication rec { toml tqdm typing-extensions - ] ++ lib.optionals (pythonOlder "3.7") [ - dataclasses ] ++ lib.optionals (pythonOlder "3.8") [ backports.cached-property importlib_metadata diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 45f99ffc0357..58ed1ce99999 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -2173,8 +2173,6 @@ self: super: with self; { databricks-sql-connector = callPackage ../development/python-modules/databricks-sql-connector { }; - dataclasses = callPackage ../development/python-modules/dataclasses { }; - dataclasses-json = callPackage ../development/python-modules/dataclasses-json { }; dataclasses-serialization = callPackage ../development/python-modules/dataclasses-serialization { }; From 380af694c2803f7bbdb695651646f2fb15371560 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Tue, 29 Nov 2022 01:07:17 +0100 Subject: [PATCH 03/13] python3Packages.contextvars: drop Only required on python36, which was dropped a while ago. --- .../python-modules/aiocontextvars/default.nix | 3 --- .../python-modules/contextvars/default.nix | 21 ------------------- .../python-modules/sniffio/default.nix | 4 +--- .../python-modules/thinc/default.nix | 5 +---- .../python-modules/trio/default.nix | 5 ++--- .../python-modules/twisted/default.nix | 2 -- pkgs/top-level/python-packages.nix | 2 -- 7 files changed, 4 insertions(+), 38 deletions(-) delete mode 100644 pkgs/development/python-modules/contextvars/default.nix diff --git a/pkgs/development/python-modules/aiocontextvars/default.nix b/pkgs/development/python-modules/aiocontextvars/default.nix index dc70baab9e5c..0ae4349afb4f 100644 --- a/pkgs/development/python-modules/aiocontextvars/default.nix +++ b/pkgs/development/python-modules/aiocontextvars/default.nix @@ -4,10 +4,8 @@ , pytest-runner , pytest , pytest-asyncio -, contextvars , sqlalchemy , isPy27 -, pythonOlder }: buildPythonPackage rec { @@ -33,7 +31,6 @@ buildPythonPackage rec { propagatedBuildInputs = [ sqlalchemy - ] ++ lib.optionals (pythonOlder "3.7") [ contextvars ]; checkPhase = '' pytest diff --git a/pkgs/development/python-modules/contextvars/default.nix b/pkgs/development/python-modules/contextvars/default.nix deleted file mode 100644 index 1eda85a6ffe2..000000000000 --- a/pkgs/development/python-modules/contextvars/default.nix +++ /dev/null @@ -1,21 +0,0 @@ -{ lib, buildPythonPackage, fetchPypi, isPy36, immutables }: - -buildPythonPackage rec { - pname = "contextvars"; - version = "2.4"; - disabled = !isPy36; - - src = fetchPypi { - inherit pname version; - sha256 = "f38c908aaa59c14335eeea12abea5f443646216c4e29380d7bf34d2018e2c39e"; - }; - - propagatedBuildInputs = [ immutables ]; - - meta = { - description = "A backport of the Python 3.7 contextvars module for Python 3.6"; - homepage = "https://github.com/MagicStack/contextvars"; - license = with lib.licenses; [ asl20 ]; - maintainers = with lib.maintainers; [ catern ]; - }; -} diff --git a/pkgs/development/python-modules/sniffio/default.nix b/pkgs/development/python-modules/sniffio/default.nix index 86e37168c899..bc2cd66b0a33 100644 --- a/pkgs/development/python-modules/sniffio/default.nix +++ b/pkgs/development/python-modules/sniffio/default.nix @@ -1,4 +1,4 @@ -{ buildPythonPackage, lib, fetchPypi, glibcLocales, isPy3k, contextvars +{ buildPythonPackage, lib, fetchPypi, glibcLocales, isPy3k , pythonOlder, pytest, curio }: @@ -15,8 +15,6 @@ buildPythonPackage rec { buildInputs = [ glibcLocales ]; - propagatedBuildInputs = lib.optionals (pythonOlder "3.7") [ contextvars ]; - checkInputs = [ pytest curio ]; checkPhase = '' diff --git a/pkgs/development/python-modules/thinc/default.nix b/pkgs/development/python-modules/thinc/default.nix index 2ef4fe86c2fe..1a43bcbbc4ed 100644 --- a/pkgs/development/python-modules/thinc/default.nix +++ b/pkgs/development/python-modules/thinc/default.nix @@ -5,7 +5,6 @@ , buildPythonPackage , catalogue , confection -, contextvars , CoreFoundation , CoreGraphics , CoreVideo @@ -33,7 +32,7 @@ buildPythonPackage rec { version = "8.1.1"; format = "setuptools"; - disabled = pythonOlder "3.6"; + disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; @@ -64,8 +63,6 @@ buildPythonPackage rec { wasabi ] ++ lib.optionals (pythonOlder "3.8") [ typing-extensions - ] ++ lib.optionals (pythonOlder "3.7") [ - contextvars ]; checkInputs = [ diff --git a/pkgs/development/python-modules/trio/default.nix b/pkgs/development/python-modules/trio/default.nix index dde139103454..7bbfb6f2ca9c 100644 --- a/pkgs/development/python-modules/trio/default.nix +++ b/pkgs/development/python-modules/trio/default.nix @@ -4,7 +4,6 @@ , async_generator , idna , outcome -, contextvars , pytestCheckHook , pyopenssl , trustme @@ -19,7 +18,7 @@ buildPythonPackage rec { pname = "trio"; version = "0.21.0"; - disabled = pythonOlder "3.6"; + disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; @@ -33,7 +32,7 @@ buildPythonPackage rec { idna outcome sniffio - ] ++ lib.optionals (pythonOlder "3.7") [ contextvars ]; + ]; # tests are failing on Darwin doCheck = !stdenv.isDarwin; diff --git a/pkgs/development/python-modules/twisted/default.nix b/pkgs/development/python-modules/twisted/default.nix index 9b0f39e050e2..f77dcc001089 100644 --- a/pkgs/development/python-modules/twisted/default.nix +++ b/pkgs/development/python-modules/twisted/default.nix @@ -10,7 +10,6 @@ , automat , bcrypt , constantly -, contextvars , cryptography , git , glibcLocales @@ -139,7 +138,6 @@ buildPythonPackage rec { optional-dependencies = rec { conch = [ appdirs bcrypt cryptography pyasn1 ]; conch_nacl = conch ++ [ pynacl ]; - contextvars = lib.optionals (pythonOlder "3.7") [ contextvars ]; http2 = [ h2 priority ]; serial = [ pyserial ]; tls = [ idna pyopenssl service-identity ]; diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 58ed1ce99999..1d4279cc6646 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -1956,8 +1956,6 @@ self: super: with self; { contextlib2 = callPackage ../development/python-modules/contextlib2 { }; - contextvars = callPackage ../development/python-modules/contextvars { }; - contexttimer = callPackage ../development/python-modules/contexttimer { }; convertdate = callPackage ../development/python-modules/convertdate { }; From 8d9ba3f121793977416e06a90ee95f86cb760e98 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Mon, 28 Nov 2022 02:38:10 +0100 Subject: [PATCH 04/13] python3Packages.mailman-fix: drop isPy36 reference Python 3.6 was dropped a while ago. --- pkgs/development/python-modules/mailcap-fix/default.nix | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/mailcap-fix/default.nix b/pkgs/development/python-modules/mailcap-fix/default.nix index da735d9d048d..3d644bec3a93 100644 --- a/pkgs/development/python-modules/mailcap-fix/default.nix +++ b/pkgs/development/python-modules/mailcap-fix/default.nix @@ -1,13 +1,12 @@ { lib , buildPythonPackage , fetchPypi -, isPy36 }: buildPythonPackage rec { pname = "mailcap-fix"; version = "1.0.1"; - disabled = isPy36; # this fix is merged into python 3.6 + format = "setuptools"; src = fetchPypi { inherit pname version; From 5143e438e27194d929859d4e248f4dd227f3cd38 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Mon, 28 Nov 2022 02:39:03 +0100 Subject: [PATCH 05/13] python3Packages.clickclick: drop isPy36 reference Python 3.6 was dropped a while ago. --- pkgs/development/python-modules/clickclick/default.nix | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pkgs/development/python-modules/clickclick/default.nix b/pkgs/development/python-modules/clickclick/default.nix index 8aeb73bb25b2..00bf8aba4709 100644 --- a/pkgs/development/python-modules/clickclick/default.nix +++ b/pkgs/development/python-modules/clickclick/default.nix @@ -1,4 +1,4 @@ -{ lib, buildPythonPackage, fetchFromGitHub, isPy36, flake8, click, pyyaml, six, pytestCheckHook, pytest-cov }: +{ lib, buildPythonPackage, fetchFromGitHub, flake8, click, pyyaml, six, pytestCheckHook, pytest-cov }: buildPythonPackage rec { pname = "clickclick"; @@ -17,8 +17,6 @@ buildPythonPackage rec { # test_cli asserts on exact quoting style of output disabledTests = [ "test_cli" - ] ++ lib.optionals isPy36 [ - "test_choice_default" ]; meta = with lib; { From b5a4d7760ddcf0ea8cf25c0c4fbd067763c15377 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Mon, 28 Nov 2022 02:13:21 +0100 Subject: [PATCH 06/13] cpython: drop leftover 3.5/3.6 logic and patches --- .../3.5/force_bytecode_determinism.patch | 17 -- .../python/cpython/3.5/ld_library_path.patch | 51 ---- .../python/cpython/3.5/no-ldconfig.patch | 164 ------------ .../python/cpython/3.5/profile-task.patch | 21 -- .../3.5/python-3.x-distutils-C++.patch | 237 ------------------ .../3.5/use-correct-tcl-tk-on-darwin.patch | 48 ---- .../python/cpython/3.6/find_library.patch | 105 -------- ...finding-headers-when-cross-compiling.patch | 54 ---- .../python/cpython/3.6/no-ldconfig.patch | 163 ------------ .../3.6/use-correct-tcl-tk-on-darwin.patch | 48 ---- .../cpython/{3.6 => 3.7}/profile-task.patch | 0 .../interpreters/python/cpython/default.nix | 31 +-- .../interpreters/python/default.nix | 2 - .../python/python-packages-base.nix | 4 +- 14 files changed, 7 insertions(+), 938 deletions(-) delete mode 100644 pkgs/development/interpreters/python/cpython/3.5/force_bytecode_determinism.patch delete mode 100644 pkgs/development/interpreters/python/cpython/3.5/ld_library_path.patch delete mode 100644 pkgs/development/interpreters/python/cpython/3.5/no-ldconfig.patch delete mode 100644 pkgs/development/interpreters/python/cpython/3.5/profile-task.patch delete mode 100644 pkgs/development/interpreters/python/cpython/3.5/python-3.x-distutils-C++.patch delete mode 100644 pkgs/development/interpreters/python/cpython/3.5/use-correct-tcl-tk-on-darwin.patch delete mode 100644 pkgs/development/interpreters/python/cpython/3.6/find_library.patch delete mode 100644 pkgs/development/interpreters/python/cpython/3.6/fix-finding-headers-when-cross-compiling.patch delete mode 100644 pkgs/development/interpreters/python/cpython/3.6/no-ldconfig.patch delete mode 100644 pkgs/development/interpreters/python/cpython/3.6/use-correct-tcl-tk-on-darwin.patch rename pkgs/development/interpreters/python/cpython/{3.6 => 3.7}/profile-task.patch (100%) diff --git a/pkgs/development/interpreters/python/cpython/3.5/force_bytecode_determinism.patch b/pkgs/development/interpreters/python/cpython/3.5/force_bytecode_determinism.patch deleted file mode 100644 index c263cdbff4db..000000000000 --- a/pkgs/development/interpreters/python/cpython/3.5/force_bytecode_determinism.patch +++ /dev/null @@ -1,17 +0,0 @@ ---- a/Lib/py_compile.py -+++ b/Lib/py_compile.py -@@ -139,3 +139,4 @@ - source_stats = loader.path_stats(file) -+ source_mtime = 1 if 'DETERMINISTIC_BUILD' in os.environ else source_stats['mtime'] - bytecode = importlib._bootstrap_external._code_to_bytecode( -- code, source_stats['mtime'], source_stats['size']) -+ code, source_mtime, source_stats['size']) ---- a/Lib/importlib/_bootstrap_external.py -+++ b/Lib/importlib/_bootstrap_external.py -@@ -485,5 +485,5 @@ - if source_stats is not None: - try: -- source_mtime = int(source_stats['mtime']) -+ source_mtime = 1 - except KeyError: - pass diff --git a/pkgs/development/interpreters/python/cpython/3.5/ld_library_path.patch b/pkgs/development/interpreters/python/cpython/3.5/ld_library_path.patch deleted file mode 100644 index 013c2d266eff..000000000000 --- a/pkgs/development/interpreters/python/cpython/3.5/ld_library_path.patch +++ /dev/null @@ -1,51 +0,0 @@ -From 918201682127ed8a270a4bd1a448b490019e4ada Mon Sep 17 00:00:00 2001 -From: Frederik Rietdijk -Date: Thu, 14 Sep 2017 10:00:31 +0200 -Subject: [PATCH] ctypes.util: support LD_LIBRARY_PATH - -Backports support for LD_LIBRARY_PATH from 3.6 ---- - Lib/ctypes/util.py | 26 +++++++++++++++++++++++++- - 1 file changed, 25 insertions(+), 1 deletion(-) - -diff --git a/Lib/ctypes/util.py b/Lib/ctypes/util.py -index e9957d7951..9926f6c881 100644 ---- a/Lib/ctypes/util.py -+++ b/Lib/ctypes/util.py -@@ -219,8 +219,32 @@ elif os.name == "posix": - def _findSoname_ldconfig(name): - return None - -+ def _findLib_ld(name): -+ # See issue #9998 for why this is needed -+ expr = r'[^\(\)\s]*lib%s\.[^\(\)\s]*' % re.escape(name) -+ cmd = ['ld', '-t'] -+ libpath = os.environ.get('LD_LIBRARY_PATH') -+ if libpath: -+ for d in libpath.split(':'): -+ cmd.extend(['-L', d]) -+ cmd.extend(['-o', os.devnull, '-l%s' % name]) -+ result = None -+ try: -+ p = subprocess.Popen(cmd, stdout=subprocess.PIPE, -+ stderr=subprocess.PIPE, -+ universal_newlines=True) -+ out, _ = p.communicate() -+ res = re.search(expr, os.fsdecode(out)) -+ if res: -+ result = res.group(0) -+ except Exception as e: -+ pass # result will be None -+ return result -+ - def find_library(name): -- return _findSoname_ldconfig(name) or _get_soname(_findLib_gcc(name)) -+ # See issue #9998 -+ return _findSoname_ldconfig(name) or \ -+ _get_soname(_findLib_gcc(name) or _findLib_ld(name)) - - ################################################################ - # test code --- -2.14.1 - diff --git a/pkgs/development/interpreters/python/cpython/3.5/no-ldconfig.patch b/pkgs/development/interpreters/python/cpython/3.5/no-ldconfig.patch deleted file mode 100644 index 9718b1d8dceb..000000000000 --- a/pkgs/development/interpreters/python/cpython/3.5/no-ldconfig.patch +++ /dev/null @@ -1,164 +0,0 @@ -From 590c46bb04f79ab611b2f8fd682dd7e43a01f268 Mon Sep 17 00:00:00 2001 -From: Frederik Rietdijk -Date: Mon, 28 Aug 2017 09:24:06 +0200 -Subject: [PATCH] Don't use ldconfig and speed up uuid load - ---- - Lib/ctypes/util.py | 70 ++---------------------------------------------------- - Lib/uuid.py | 49 -------------------------------------- - 2 files changed, 2 insertions(+), 117 deletions(-) - -diff --git a/Lib/ctypes/util.py b/Lib/ctypes/util.py -index 7684eab81d..e9957d7951 100644 ---- a/Lib/ctypes/util.py -+++ b/Lib/ctypes/util.py -@@ -95,46 +95,7 @@ elif os.name == "posix": - import re, tempfile - - def _findLib_gcc(name): -- # Run GCC's linker with the -t (aka --trace) option and examine the -- # library name it prints out. The GCC command will fail because we -- # haven't supplied a proper program with main(), but that does not -- # matter. -- expr = os.fsencode(r'[^\(\)\s]*lib%s\.[^\(\)\s]*' % re.escape(name)) -- -- c_compiler = shutil.which('gcc') -- if not c_compiler: -- c_compiler = shutil.which('cc') -- if not c_compiler: -- # No C compiler available, give up -- return None -- -- temp = tempfile.NamedTemporaryFile() -- try: -- args = [c_compiler, '-Wl,-t', '-o', temp.name, '-l' + name] -- -- env = dict(os.environ) -- env['LC_ALL'] = 'C' -- env['LANG'] = 'C' -- try: -- proc = subprocess.Popen(args, -- stdout=subprocess.PIPE, -- stderr=subprocess.STDOUT, -- env=env) -- except OSError: # E.g. bad executable -- return None -- with proc: -- trace = proc.stdout.read() -- finally: -- try: -- temp.close() -- except FileNotFoundError: -- # Raised if the file was already removed, which is the normal -- # behaviour of GCC if linking fails -- pass -- res = re.search(expr, trace) -- if not res: -- return None -- return os.fsdecode(res.group(0)) -+ return None - - - if sys.platform == "sunos5": -@@ -256,34 +217,7 @@ elif os.name == "posix": - else: - - def _findSoname_ldconfig(name): -- import struct -- if struct.calcsize('l') == 4: -- machine = os.uname().machine + '-32' -- else: -- machine = os.uname().machine + '-64' -- mach_map = { -- 'x86_64-64': 'libc6,x86-64', -- 'ppc64-64': 'libc6,64bit', -- 'sparc64-64': 'libc6,64bit', -- 's390x-64': 'libc6,64bit', -- 'ia64-64': 'libc6,IA-64', -- } -- abi_type = mach_map.get(machine, 'libc6') -- -- # XXX assuming GLIBC's ldconfig (with option -p) -- regex = os.fsencode( -- '\s+(lib%s\.[^\s]+)\s+\(%s' % (re.escape(name), abi_type)) -- try: -- with subprocess.Popen(['/sbin/ldconfig', '-p'], -- stdin=subprocess.DEVNULL, -- stderr=subprocess.DEVNULL, -- stdout=subprocess.PIPE, -- env={'LC_ALL': 'C', 'LANG': 'C'}) as p: -- res = re.search(regex, p.stdout.read()) -- if res: -- return os.fsdecode(res.group(1)) -- except OSError: -- pass -+ return None - - def find_library(name): - return _findSoname_ldconfig(name) or _get_soname(_findLib_gcc(name)) -diff --git a/Lib/uuid.py b/Lib/uuid.py -index e96e7e034c..31160ace95 100644 ---- a/Lib/uuid.py -+++ b/Lib/uuid.py -@@ -455,58 +455,9 @@ def _netbios_getnode(): - continue - return int.from_bytes(bytes, 'big') - --# Thanks to Thomas Heller for ctypes and for his help with its use here. - --# If ctypes is available, use it to find system routines for UUID generation. --# XXX This makes the module non-thread-safe! - _uuid_generate_time = _UuidCreate = None --try: -- import ctypes, ctypes.util -- import sys - -- # The uuid_generate_* routines are provided by libuuid on at least -- # Linux and FreeBSD, and provided by libc on Mac OS X. -- _libnames = ['uuid'] -- if not sys.platform.startswith('win'): -- _libnames.append('c') -- for libname in _libnames: -- try: -- lib = ctypes.CDLL(ctypes.util.find_library(libname)) -- except Exception: -- continue -- if hasattr(lib, 'uuid_generate_time'): -- _uuid_generate_time = lib.uuid_generate_time -- break -- del _libnames -- -- # The uuid_generate_* functions are broken on MacOS X 10.5, as noted -- # in issue #8621 the function generates the same sequence of values -- # in the parent process and all children created using fork (unless -- # those children use exec as well). -- # -- # Assume that the uuid_generate functions are broken from 10.5 onward, -- # the test can be adjusted when a later version is fixed. -- if sys.platform == 'darwin': -- import os -- if int(os.uname().release.split('.')[0]) >= 9: -- _uuid_generate_time = None -- -- # On Windows prior to 2000, UuidCreate gives a UUID containing the -- # hardware address. On Windows 2000 and later, UuidCreate makes a -- # random UUID and UuidCreateSequential gives a UUID containing the -- # hardware address. These routines are provided by the RPC runtime. -- # NOTE: at least on Tim's WinXP Pro SP2 desktop box, while the last -- # 6 bytes returned by UuidCreateSequential are fixed, they don't appear -- # to bear any relationship to the MAC address of any network device -- # on the box. -- try: -- lib = ctypes.windll.rpcrt4 -- except: -- lib = None -- _UuidCreate = getattr(lib, 'UuidCreateSequential', -- getattr(lib, 'UuidCreate', None)) --except: -- pass - - def _unixdll_getnode(): - """Get the hardware address on Unix using ctypes.""" --- -2.14.1 - diff --git a/pkgs/development/interpreters/python/cpython/3.5/profile-task.patch b/pkgs/development/interpreters/python/cpython/3.5/profile-task.patch deleted file mode 100644 index 39d5587379ca..000000000000 --- a/pkgs/development/interpreters/python/cpython/3.5/profile-task.patch +++ /dev/null @@ -1,21 +0,0 @@ -Backport from CPython 3.8 of a good list of tests to run for PGO. - -Upstream commit: - https://github.com/python/cpython/commit/4e16a4a31 - -Upstream discussion: - https://bugs.python.org/issue36044 - -diff --git a/Makefile.pre.in b/Makefile.pre.in -index 00fdd21ce..713dc1e53 100644 ---- a/Makefile.pre.in -+++ b/Makefile.pre.in -@@ -259,7 +259,7 @@ TCLTK_LIBS= - # The task to run while instrumented when building the profile-opt target. - # We exclude unittests with -x that take a rediculious amount of time to - # run in the instrumented training build or do not provide much value. --PROFILE_TASK=-m test.regrtest --pgo -x test_asyncore test_gdb test_multiprocessing_fork test_multiprocessing_forkserver test_multiprocessing_main_handling test_multiprocessing_spawn test_subprocess -+PROFILE_TASK=-m test.regrtest --pgo test_array test_base64 test_binascii test_binop test_bisect test_bytes test_bz2 test_cmath test_codecs test_collections test_complex test_dataclasses test_datetime test_decimal test_difflib test_embed test_float test_fstring test_functools test_generators test_hashlib test_heapq test_int test_itertools test_json test_long test_lzma test_math test_memoryview test_operator test_ordered_dict test_pickle test_pprint test_re test_set test_sqlite test_statistics test_struct test_tabnanny test_time test_unicode test_xml_etree test_xml_etree_c - - # report files for gcov / lcov coverage report - COVERAGE_INFO= $(abs_builddir)/coverage.info diff --git a/pkgs/development/interpreters/python/cpython/3.5/python-3.x-distutils-C++.patch b/pkgs/development/interpreters/python/cpython/3.5/python-3.x-distutils-C++.patch deleted file mode 100644 index 01356020b394..000000000000 --- a/pkgs/development/interpreters/python/cpython/3.5/python-3.x-distutils-C++.patch +++ /dev/null @@ -1,237 +0,0 @@ -Source: https://bugs.python.org/file47046/python-3.x-distutils-C++.patch ---- a/Lib/distutils/cygwinccompiler.py -+++ b/Lib/distutils/cygwinccompiler.py -@@ -125,8 +125,10 @@ - # dllwrap 2.10.90 is buggy - if self.ld_version >= "2.10.90": - self.linker_dll = "gcc" -+ self.linker_dll_cxx = "g++" - else: - self.linker_dll = "dllwrap" -+ self.linker_dll_cxx = "dllwrap" - - # ld_version >= "2.13" support -shared so use it instead of - # -mdll -static -@@ -140,9 +142,13 @@ - self.set_executables(compiler='gcc -mcygwin -O -Wall', - compiler_so='gcc -mcygwin -mdll -O -Wall', - compiler_cxx='g++ -mcygwin -O -Wall', -+ compiler_so_cxx='g++ -mcygwin -mdll -O -Wall', - linker_exe='gcc -mcygwin', - linker_so=('%s -mcygwin %s' % -- (self.linker_dll, shared_option))) -+ (self.linker_dll, shared_option)), -+ linker_exe_cxx='g++ -mcygwin', -+ linker_so_cxx=('%s -mcygwin %s' % -+ (self.linker_dll_cxx, shared_option))) - - # cygwin and mingw32 need different sets of libraries - if self.gcc_version == "2.91.57": -@@ -166,8 +172,12 @@ - raise CompileError(msg) - else: # for other files use the C-compiler - try: -- self.spawn(self.compiler_so + cc_args + [src, '-o', obj] + -- extra_postargs) -+ if self.detect_language(src) == 'c++': -+ self.spawn(self.compiler_so_cxx + cc_args + [src, '-o', obj] + -+ extra_postargs) -+ else: -+ self.spawn(self.compiler_so + cc_args + [src, '-o', obj] + -+ extra_postargs) - except DistutilsExecError as msg: - raise CompileError(msg) - -@@ -302,9 +312,14 @@ - self.set_executables(compiler='gcc -O -Wall', - compiler_so='gcc -mdll -O -Wall', - compiler_cxx='g++ -O -Wall', -+ compiler_so_cxx='g++ -mdll -O -Wall', - linker_exe='gcc', - linker_so='%s %s %s' - % (self.linker_dll, shared_option, -+ entry_point), -+ linker_exe_cxx='g++', -+ linker_so_cxx='%s %s %s' -+ % (self.linker_dll_cxx, shared_option, - entry_point)) - # Maybe we should also append -mthreads, but then the finished - # dlls need another dll (mingwm10.dll see Mingw32 docs) ---- a/Lib/distutils/sysconfig.py -+++ b/Lib/distutils/sysconfig.py -@@ -184,9 +184,11 @@ - _osx_support.customize_compiler(_config_vars) - _config_vars['CUSTOMIZED_OSX_COMPILER'] = 'True' - -- (cc, cxx, opt, cflags, ccshared, ldshared, shlib_suffix, ar, ar_flags) = \ -- get_config_vars('CC', 'CXX', 'OPT', 'CFLAGS', -- 'CCSHARED', 'LDSHARED', 'SHLIB_SUFFIX', 'AR', 'ARFLAGS') -+ (cc, cxx, cflags, ccshared, ldshared, ldcxxshared, shlib_suffix, ar, ar_flags) = \ -+ get_config_vars('CC', 'CXX', 'CFLAGS', 'CCSHARED', 'LDSHARED', 'LDCXXSHARED', -+ 'SHLIB_SUFFIX', 'AR', 'ARFLAGS') -+ -+ cxxflags = cflags - - if 'CC' in os.environ: - newcc = os.environ['CC'] -@@ -201,19 +204,27 @@ - cxx = os.environ['CXX'] - if 'LDSHARED' in os.environ: - ldshared = os.environ['LDSHARED'] -+ if 'LDCXXSHARED' in os.environ: -+ ldcxxshared = os.environ['LDCXXSHARED'] - if 'CPP' in os.environ: - cpp = os.environ['CPP'] - else: - cpp = cc + " -E" # not always - if 'LDFLAGS' in os.environ: - ldshared = ldshared + ' ' + os.environ['LDFLAGS'] -+ ldcxxshared = ldcxxshared + ' ' + os.environ['LDFLAGS'] - if 'CFLAGS' in os.environ: -- cflags = opt + ' ' + os.environ['CFLAGS'] -+ cflags = os.environ['CFLAGS'] - ldshared = ldshared + ' ' + os.environ['CFLAGS'] -+ if 'CXXFLAGS' in os.environ: -+ cxxflags = os.environ['CXXFLAGS'] -+ ldcxxshared = ldcxxshared + ' ' + os.environ['CXXFLAGS'] - if 'CPPFLAGS' in os.environ: - cpp = cpp + ' ' + os.environ['CPPFLAGS'] - cflags = cflags + ' ' + os.environ['CPPFLAGS'] -+ cxxflags = cxxflags + ' ' + os.environ['CPPFLAGS'] - ldshared = ldshared + ' ' + os.environ['CPPFLAGS'] -+ ldcxxshared = ldcxxshared + ' ' + os.environ['CPPFLAGS'] - if 'AR' in os.environ: - ar = os.environ['AR'] - if 'ARFLAGS' in os.environ: -@@ -222,13 +233,17 @@ - archiver = ar + ' ' + ar_flags - - cc_cmd = cc + ' ' + cflags -+ cxx_cmd = cxx + ' ' + cxxflags - compiler.set_executables( - preprocessor=cpp, - compiler=cc_cmd, - compiler_so=cc_cmd + ' ' + ccshared, -- compiler_cxx=cxx, -+ compiler_cxx=cxx_cmd, -+ compiler_so_cxx=cxx_cmd + ' ' + ccshared, - linker_so=ldshared, - linker_exe=cc, -+ linker_so_cxx=ldcxxshared, -+ linker_exe_cxx=cxx, - archiver=archiver) - - compiler.shared_lib_extension = shlib_suffix ---- a/Lib/distutils/unixccompiler.py -+++ b/Lib/distutils/unixccompiler.py -@@ -52,14 +52,17 @@ - # are pretty generic; they will probably have to be set by an outsider - # (eg. using information discovered by the sysconfig about building - # Python extensions). -- executables = {'preprocessor' : None, -- 'compiler' : ["cc"], -- 'compiler_so' : ["cc"], -- 'compiler_cxx' : ["cc"], -- 'linker_so' : ["cc", "-shared"], -- 'linker_exe' : ["cc"], -- 'archiver' : ["ar", "-cr"], -- 'ranlib' : None, -+ executables = {'preprocessor' : None, -+ 'compiler' : ["cc"], -+ 'compiler_so' : ["cc"], -+ 'compiler_cxx' : ["c++"], -+ 'compiler_so_cxx' : ["c++"], -+ 'linker_so' : ["cc", "-shared"], -+ 'linker_exe' : ["cc"], -+ 'linker_so_cxx' : ["c++", "-shared"], -+ 'linker_exe_cxx' : ["c++"], -+ 'archiver' : ["ar", "-cr"], -+ 'ranlib' : None, - } - - if sys.platform[:6] == "darwin": -@@ -108,12 +111,19 @@ - - def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): - compiler_so = self.compiler_so -+ compiler_so_cxx = self.compiler_so_cxx - if sys.platform == 'darwin': - compiler_so = _osx_support.compiler_fixup(compiler_so, - cc_args + extra_postargs) -+ compiler_so_cxx = _osx_support.compiler_fixup(compiler_so_cxx, -+ cc_args + extra_postargs) - try: -- self.spawn(compiler_so + cc_args + [src, '-o', obj] + -- extra_postargs) -+ if self.detect_language(src) == 'c++': -+ self.spawn(compiler_so_cxx + cc_args + [src, '-o', obj] + -+ extra_postargs) -+ else: -+ self.spawn(compiler_so + cc_args + [src, '-o', obj] + -+ extra_postargs) - except DistutilsExecError as msg: - raise CompileError(msg) - -@@ -171,22 +181,16 @@ - ld_args.extend(extra_postargs) - self.mkpath(os.path.dirname(output_filename)) - try: -- if target_desc == CCompiler.EXECUTABLE: -- linker = self.linker_exe[:] -+ if target_lang == "c++": -+ if target_desc == CCompiler.EXECUTABLE: -+ linker = self.linker_exe_cxx[:] -+ else: -+ linker = self.linker_so_cxx[:] - else: -- linker = self.linker_so[:] -- if target_lang == "c++" and self.compiler_cxx: -- # skip over environment variable settings if /usr/bin/env -- # is used to set up the linker's environment. -- # This is needed on OSX. Note: this assumes that the -- # normal and C++ compiler have the same environment -- # settings. -- i = 0 -- if os.path.basename(linker[0]) == "env": -- i = 1 -- while '=' in linker[i]: -- i += 1 -- linker[i] = self.compiler_cxx[i] -+ if target_desc == CCompiler.EXECUTABLE: -+ linker = self.linker_exe[:] -+ else: -+ linker = self.linker_so[:] - - if sys.platform == 'darwin': - linker = _osx_support.compiler_fixup(linker, ld_args) ---- a/Lib/_osx_support.py -+++ b/Lib/_osx_support.py -@@ -14,13 +14,13 @@ - # configuration variables that may contain universal build flags, - # like "-arch" or "-isdkroot", that may need customization for - # the user environment --_UNIVERSAL_CONFIG_VARS = ('CFLAGS', 'LDFLAGS', 'CPPFLAGS', 'BASECFLAGS', -- 'BLDSHARED', 'LDSHARED', 'CC', 'CXX', -- 'PY_CFLAGS', 'PY_LDFLAGS', 'PY_CPPFLAGS', -- 'PY_CORE_CFLAGS') -+_UNIVERSAL_CONFIG_VARS = ('CFLAGS', 'CXXFLAGS', 'LDFLAGS', 'CPPFLAGS', -+ 'BASECFLAGS', 'BLDSHARED', 'LDSHARED', 'LDCXXSHARED', -+ 'CC', 'CXX', 'PY_CFLAGS', 'PY_LDFLAGS', -+ 'PY_CPPFLAGS', 'PY_CORE_CFLAGS') - - # configuration variables that may contain compiler calls --_COMPILER_CONFIG_VARS = ('BLDSHARED', 'LDSHARED', 'CC', 'CXX') -+_COMPILER_CONFIG_VARS = ('BLDSHARED', 'LDSHARED', 'LDCXXSHARED', 'CC', 'CXX') - - # prefix added to original configuration variable names - _INITPRE = '_OSX_SUPPORT_INITIAL_' ---- a/Makefile.pre.in -+++ b/Makefile.pre.in -@@ -538,7 +538,7 @@ - *\ -s*|s*) quiet="-q";; \ - *) quiet="";; \ - esac; \ -- $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' \ -+ $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' CFLAGS='$(PY_CFLAGS)' \ - _TCLTK_INCLUDES='$(TCLTK_INCLUDES)' _TCLTK_LIBS='$(TCLTK_LIBS)' \ - $(PYTHON_FOR_BUILD) $(srcdir)/setup.py $$quiet build diff --git a/pkgs/development/interpreters/python/cpython/3.5/use-correct-tcl-tk-on-darwin.patch b/pkgs/development/interpreters/python/cpython/3.5/use-correct-tcl-tk-on-darwin.patch deleted file mode 100644 index b73f62b97ec5..000000000000 --- a/pkgs/development/interpreters/python/cpython/3.5/use-correct-tcl-tk-on-darwin.patch +++ /dev/null @@ -1,48 +0,0 @@ -diff --git a/setup.py b/setup.py -index 2779658..902d0eb 100644 ---- a/setup.py -+++ b/setup.py -@@ -1699,9 +1699,6 @@ class PyBuildExt(build_ext): - # Rather than complicate the code below, detecting and building - # AquaTk is a separate method. Only one Tkinter will be built on - # Darwin - either AquaTk, if it is found, or X11 based Tk. -- if (host_platform == 'darwin' and -- self.detect_tkinter_darwin(inc_dirs, lib_dirs)): -- return - - # Assume we haven't found any of the libraries or include files - # The versions with dots are used on Unix, and the versions without -@@ -1747,22 +1744,6 @@ class PyBuildExt(build_ext): - if dir not in include_dirs: - include_dirs.append(dir) - -- # Check for various platform-specific directories -- if host_platform == 'sunos5': -- include_dirs.append('/usr/openwin/include') -- added_lib_dirs.append('/usr/openwin/lib') -- elif os.path.exists('/usr/X11R6/include'): -- include_dirs.append('/usr/X11R6/include') -- added_lib_dirs.append('/usr/X11R6/lib64') -- added_lib_dirs.append('/usr/X11R6/lib') -- elif os.path.exists('/usr/X11R5/include'): -- include_dirs.append('/usr/X11R5/include') -- added_lib_dirs.append('/usr/X11R5/lib') -- else: -- # Assume default location for X11 -- include_dirs.append('/usr/X11/include') -- added_lib_dirs.append('/usr/X11/lib') -- - # If Cygwin, then verify that X is installed before proceeding - if host_platform == 'cygwin': - x11_inc = find_file('X11/Xlib.h', [], include_dirs) -@@ -1786,10 +1767,6 @@ class PyBuildExt(build_ext): - if host_platform in ['aix3', 'aix4']: - libs.append('ld') - -- # Finally, link with the X11 libraries (not appropriate on cygwin) -- if host_platform != "cygwin": -- libs.append('X11') -- - ext = Extension('_tkinter', ['_tkinter.c', 'tkappinit.c'], - define_macros=[('WITH_APPINIT', 1)] + defs, - include_dirs = include_dirs, diff --git a/pkgs/development/interpreters/python/cpython/3.6/find_library.patch b/pkgs/development/interpreters/python/cpython/3.6/find_library.patch deleted file mode 100644 index 97fb66662d03..000000000000 --- a/pkgs/development/interpreters/python/cpython/3.6/find_library.patch +++ /dev/null @@ -1,105 +0,0 @@ -From 9b5a023a5dc3127da15253f7acad71019395ebe1 Mon Sep 17 00:00:00 2001 -From: Pablo Galindo -Date: Thu, 8 Oct 2020 19:50:37 +0100 -Subject: [PATCH] [3.7] bpo-41976: Fix the fallback to gcc of - ctypes.util.find_library when using gcc>9 (GH-22598). (GH-22601) - -(cherry picked from commit 27ac19cca2c639caaf6fedf3632fe6beb265f24f) - -Co-authored-by: Pablo Galindo ---- - Lib/ctypes/test/test_find.py | 12 ++++++- - Lib/ctypes/util.py | 32 +++++++++++++++---- - .../2020-10-08-18-22-28.bpo-41976.Svm0wb.rst | 3 ++ - 3 files changed, 39 insertions(+), 8 deletions(-) - create mode 100644 Misc/NEWS.d/next/Library/2020-10-08-18-22-28.bpo-41976.Svm0wb.rst - -diff --git a/Lib/ctypes/test/test_find.py b/Lib/ctypes/test/test_find.py -index b99fdcba7b28f..92ac1840ad7d4 100644 ---- a/Lib/ctypes/test/test_find.py -+++ b/Lib/ctypes/test/test_find.py -@@ -1,4 +1,5 @@ - import unittest -+import unittest.mock - import os.path - import sys - import test.support -@@ -72,7 +73,7 @@ def test_shell_injection(self): - - @unittest.skipUnless(sys.platform.startswith('linux'), - 'Test only valid for Linux') --class LibPathFindTest(unittest.TestCase): -+class FindLibraryLinux(unittest.TestCase): - def test_find_on_libpath(self): - import subprocess - import tempfile -@@ -111,6 +112,15 @@ def test_find_on_libpath(self): - # LD_LIBRARY_PATH) - self.assertEqual(find_library(libname), 'lib%s.so' % libname) - -+ def test_find_library_with_gcc(self): -+ with unittest.mock.patch("ctypes.util._findSoname_ldconfig", lambda *args: None): -+ self.assertNotEqual(find_library('c'), None) -+ -+ def test_find_library_with_ld(self): -+ with unittest.mock.patch("ctypes.util._findSoname_ldconfig", lambda *args: None), \ -+ unittest.mock.patch("ctypes.util._findLib_gcc", lambda *args: None): -+ self.assertNotEqual(find_library('c'), None) -+ - - if __name__ == "__main__": - unittest.main() -diff --git a/Lib/ctypes/util.py b/Lib/ctypes/util.py -index 97973bce001d9..0c2510e1619c8 100644 ---- a/Lib/ctypes/util.py -+++ b/Lib/ctypes/util.py -@@ -93,6 +93,12 @@ def find_library(name): - # Andreas Degert's find functions, using gcc, /sbin/ldconfig, objdump - import re, tempfile - -+ def _is_elf(filename): -+ "Return True if the given file is an ELF file" -+ elf_header = b'\x7fELF' -+ with open(filename, 'br') as thefile: -+ return thefile.read(4) == elf_header -+ - def _findLib_gcc(name): - # Run GCC's linker with the -t (aka --trace) option and examine the - # library name it prints out. The GCC command will fail because we -@@ -299,17 +312,22 @@ def _findLib_ld(name): - stderr=subprocess.PIPE, - universal_newlines=True) - out, _ = p.communicate() -- res = re.search(expr, os.fsdecode(out)) -- if res: -- result = res.group(0) -- except Exception as e: -+ res = re.findall(expr, os.fsdecode(out)) -+ for file in res: -+ # Check if the given file is an elf file: gcc can report -+ # some files that are linker scripts and not actual -+ # shared objects. See bpo-41976 for more details -+ if not _is_elf(file): -+ continue -+ return os.fsdecode(file) -+ except Exception: - pass # result will be None - return result - - def find_library(name): - # See issue #9998 - return _findSoname_ldconfig(name) or \ -- _get_soname(_findLib_gcc(name) or _findLib_ld(name)) -+ _get_soname(_findLib_gcc(name)) or _get_soname(_findLib_ld(name)) - - ################################################################ - # test code -diff --git a/Misc/NEWS.d/next/Library/2020-10-08-18-22-28.bpo-41976.Svm0wb.rst b/Misc/NEWS.d/next/Library/2020-10-08-18-22-28.bpo-41976.Svm0wb.rst -new file mode 100644 -index 0000000000000..c8b3fc771845e ---- /dev/null -+++ b/Misc/NEWS.d/next/Library/2020-10-08-18-22-28.bpo-41976.Svm0wb.rst -@@ -0,0 +1,3 @@ -+Fixed a bug that was causing :func:`ctypes.util.find_library` to return -+``None`` when triying to locate a library in an environment when gcc>=9 is -+available and ``ldconfig`` is not. Patch by Pablo Galindo diff --git a/pkgs/development/interpreters/python/cpython/3.6/fix-finding-headers-when-cross-compiling.patch b/pkgs/development/interpreters/python/cpython/3.6/fix-finding-headers-when-cross-compiling.patch deleted file mode 100644 index d324d10b39fc..000000000000 --- a/pkgs/development/interpreters/python/cpython/3.6/fix-finding-headers-when-cross-compiling.patch +++ /dev/null @@ -1,54 +0,0 @@ -From 45dfbbb4f5b67ab83e4365564ea569334e979f8e Mon Sep 17 00:00:00 2001 -From: Ben Wolsieffer -Date: Fri, 25 Sep 2020 16:49:16 -0400 -Subject: [PATCH] Fix finding headers when cross compiling - -When cross-compiling third-party extensions, get_python_inc() may be called to -return the path to Python's headers. However, it uses the sys.prefix or -sys.exec_prefix of the build Python, which returns incorrect paths when -cross-compiling (paths pointing to build system headers). - -To fix this, we use the INCLUDEPY and CONFINCLUDEPY conf variables, which can -be configured to point at host Python by setting _PYTHON_SYSCONFIGDATA_NAME. -The existing behavior is maintained on non-POSIX platforms or if a prefix is -manually specified. ---- - Lib/distutils/sysconfig.py | 14 ++++++++++---- - 1 file changed, 10 insertions(+), 4 deletions(-) - -diff --git a/Lib/distutils/sysconfig.py b/Lib/distutils/sysconfig.py -index 2bcd1dd288..567375e488 100644 ---- a/Lib/distutils/sysconfig.py -+++ b/Lib/distutils/sysconfig.py -@@ -84,8 +84,6 @@ def get_python_inc(plat_specific=0, prefix=None): - If 'prefix' is supplied, use it instead of sys.base_prefix or - sys.base_exec_prefix -- i.e., ignore 'plat_specific'. - """ -- if prefix is None: -- prefix = plat_specific and BASE_EXEC_PREFIX or BASE_PREFIX - if os.name == "posix": - if python_build: - # Assume the executable is in the build directory. The -@@ -98,9 +96,17 @@ def get_python_inc(plat_specific=0, prefix=None): - else: - incdir = os.path.join(get_config_var('srcdir'), 'Include') - return os.path.normpath(incdir) -- python_dir = 'python' + get_python_version() + build_flags -- return os.path.join(prefix, "include", python_dir) -+ if prefix is None: -+ if plat_specific: -+ return get_config_var('CONFINCLUDEPY') -+ else: -+ return get_config_var('INCLUDEPY') -+ else: -+ python_dir = 'python' + get_python_version() + build_flags -+ return os.path.join(prefix, "include", python_dir) - elif os.name == "nt": -+ if prefix is None: -+ prefix = plat_specific and BASE_EXEC_PREFIX or BASE_PREFIX - return os.path.join(prefix, "include") - else: - raise DistutilsPlatformError( --- -2.28.0 - diff --git a/pkgs/development/interpreters/python/cpython/3.6/no-ldconfig.patch b/pkgs/development/interpreters/python/cpython/3.6/no-ldconfig.patch deleted file mode 100644 index 0f829860a5b7..000000000000 --- a/pkgs/development/interpreters/python/cpython/3.6/no-ldconfig.patch +++ /dev/null @@ -1,163 +0,0 @@ -From 105621b99cc30615c79b5aa3d12d6732e14b0d59 Mon Sep 17 00:00:00 2001 -From: Frederik Rietdijk -Date: Mon, 28 Aug 2017 09:24:06 +0200 -Subject: [PATCH] Don't use ldconfig and speed up uuid load - ---- - Lib/ctypes/util.py | 70 ++---------------------------------------------------- - Lib/uuid.py | 48 ------------------------------------- - 2 files changed, 2 insertions(+), 116 deletions(-) - -diff --git a/Lib/ctypes/util.py b/Lib/ctypes/util.py -index 339ae8aa8a..2944985c30 100644 ---- a/Lib/ctypes/util.py -+++ b/Lib/ctypes/util.py -@@ -85,46 +85,7 @@ elif os.name == "posix": - import re, tempfile - - def _findLib_gcc(name): -- # Run GCC's linker with the -t (aka --trace) option and examine the -- # library name it prints out. The GCC command will fail because we -- # haven't supplied a proper program with main(), but that does not -- # matter. -- expr = os.fsencode(r'[^\(\)\s]*lib%s\.[^\(\)\s]*' % re.escape(name)) -- -- c_compiler = shutil.which('gcc') -- if not c_compiler: -- c_compiler = shutil.which('cc') -- if not c_compiler: -- # No C compiler available, give up -- return None -- -- temp = tempfile.NamedTemporaryFile() -- try: -- args = [c_compiler, '-Wl,-t', '-o', temp.name, '-l' + name] -- -- env = dict(os.environ) -- env['LC_ALL'] = 'C' -- env['LANG'] = 'C' -- try: -- proc = subprocess.Popen(args, -- stdout=subprocess.PIPE, -- stderr=subprocess.STDOUT, -- env=env) -- except OSError: # E.g. bad executable -- return None -- with proc: -- trace = proc.stdout.read() -- finally: -- try: -- temp.close() -- except FileNotFoundError: -- # Raised if the file was already removed, which is the normal -- # behaviour of GCC if linking fails -- pass -- res = re.search(expr, trace) -- if not res: -- return None -- return os.fsdecode(res.group(0)) -+ return None - - - if sys.platform == "sunos5": -@@ -246,34 +207,7 @@ elif os.name == "posix": - else: - - def _findSoname_ldconfig(name): -- import struct -- if struct.calcsize('l') == 4: -- machine = os.uname().machine + '-32' -- else: -- machine = os.uname().machine + '-64' -- mach_map = { -- 'x86_64-64': 'libc6,x86-64', -- 'ppc64-64': 'libc6,64bit', -- 'sparc64-64': 'libc6,64bit', -- 's390x-64': 'libc6,64bit', -- 'ia64-64': 'libc6,IA-64', -- } -- abi_type = mach_map.get(machine, 'libc6') -- -- # XXX assuming GLIBC's ldconfig (with option -p) -- regex = r'\s+(lib%s\.[^\s]+)\s+\(%s' -- regex = os.fsencode(regex % (re.escape(name), abi_type)) -- try: -- with subprocess.Popen(['/sbin/ldconfig', '-p'], -- stdin=subprocess.DEVNULL, -- stderr=subprocess.DEVNULL, -- stdout=subprocess.PIPE, -- env={'LC_ALL': 'C', 'LANG': 'C'}) as p: -- res = re.search(regex, p.stdout.read()) -- if res: -- return os.fsdecode(res.group(1)) -- except OSError: -- pass -+ return None - - def _findLib_ld(name): - # See issue #9998 for why this is needed -diff --git a/Lib/uuid.py b/Lib/uuid.py -index 200c800b34..31160ace95 100644 ---- a/Lib/uuid.py -+++ b/Lib/uuid.py -@@ -455,57 +455,9 @@ def _netbios_getnode(): - continue - return int.from_bytes(bytes, 'big') - --# Thanks to Thomas Heller for ctypes and for his help with its use here. - --# If ctypes is available, use it to find system routines for UUID generation. --# XXX This makes the module non-thread-safe! - _uuid_generate_time = _UuidCreate = None --try: -- import ctypes, ctypes.util -- import sys - -- # The uuid_generate_* routines are provided by libuuid on at least -- # Linux and FreeBSD, and provided by libc on Mac OS X. -- _libnames = ['uuid'] -- if not sys.platform.startswith('win'): -- _libnames.append('c') -- for libname in _libnames: -- try: -- lib = ctypes.CDLL(ctypes.util.find_library(libname)) -- except Exception: -- continue -- if hasattr(lib, 'uuid_generate_time'): -- _uuid_generate_time = lib.uuid_generate_time -- break -- del _libnames -- -- # The uuid_generate_* functions are broken on MacOS X 10.5, as noted -- # in issue #8621 the function generates the same sequence of values -- # in the parent process and all children created using fork (unless -- # those children use exec as well). -- # -- # Assume that the uuid_generate functions are broken from 10.5 onward, -- # the test can be adjusted when a later version is fixed. -- if sys.platform == 'darwin': -- if int(os.uname().release.split('.')[0]) >= 9: -- _uuid_generate_time = None -- -- # On Windows prior to 2000, UuidCreate gives a UUID containing the -- # hardware address. On Windows 2000 and later, UuidCreate makes a -- # random UUID and UuidCreateSequential gives a UUID containing the -- # hardware address. These routines are provided by the RPC runtime. -- # NOTE: at least on Tim's WinXP Pro SP2 desktop box, while the last -- # 6 bytes returned by UuidCreateSequential are fixed, they don't appear -- # to bear any relationship to the MAC address of any network device -- # on the box. -- try: -- lib = ctypes.windll.rpcrt4 -- except: -- lib = None -- _UuidCreate = getattr(lib, 'UuidCreateSequential', -- getattr(lib, 'UuidCreate', None)) --except: -- pass - - def _unixdll_getnode(): - """Get the hardware address on Unix using ctypes.""" --- -2.14.1 - diff --git a/pkgs/development/interpreters/python/cpython/3.6/use-correct-tcl-tk-on-darwin.patch b/pkgs/development/interpreters/python/cpython/3.6/use-correct-tcl-tk-on-darwin.patch deleted file mode 100644 index b73f62b97ec5..000000000000 --- a/pkgs/development/interpreters/python/cpython/3.6/use-correct-tcl-tk-on-darwin.patch +++ /dev/null @@ -1,48 +0,0 @@ -diff --git a/setup.py b/setup.py -index 2779658..902d0eb 100644 ---- a/setup.py -+++ b/setup.py -@@ -1699,9 +1699,6 @@ class PyBuildExt(build_ext): - # Rather than complicate the code below, detecting and building - # AquaTk is a separate method. Only one Tkinter will be built on - # Darwin - either AquaTk, if it is found, or X11 based Tk. -- if (host_platform == 'darwin' and -- self.detect_tkinter_darwin(inc_dirs, lib_dirs)): -- return - - # Assume we haven't found any of the libraries or include files - # The versions with dots are used on Unix, and the versions without -@@ -1747,22 +1744,6 @@ class PyBuildExt(build_ext): - if dir not in include_dirs: - include_dirs.append(dir) - -- # Check for various platform-specific directories -- if host_platform == 'sunos5': -- include_dirs.append('/usr/openwin/include') -- added_lib_dirs.append('/usr/openwin/lib') -- elif os.path.exists('/usr/X11R6/include'): -- include_dirs.append('/usr/X11R6/include') -- added_lib_dirs.append('/usr/X11R6/lib64') -- added_lib_dirs.append('/usr/X11R6/lib') -- elif os.path.exists('/usr/X11R5/include'): -- include_dirs.append('/usr/X11R5/include') -- added_lib_dirs.append('/usr/X11R5/lib') -- else: -- # Assume default location for X11 -- include_dirs.append('/usr/X11/include') -- added_lib_dirs.append('/usr/X11/lib') -- - # If Cygwin, then verify that X is installed before proceeding - if host_platform == 'cygwin': - x11_inc = find_file('X11/Xlib.h', [], include_dirs) -@@ -1786,10 +1767,6 @@ class PyBuildExt(build_ext): - if host_platform in ['aix3', 'aix4']: - libs.append('ld') - -- # Finally, link with the X11 libraries (not appropriate on cygwin) -- if host_platform != "cygwin": -- libs.append('X11') -- - ext = Extension('_tkinter', ['_tkinter.c', 'tkappinit.c'], - define_macros=[('WITH_APPINIT', 1)] + defs, - include_dirs = include_dirs, diff --git a/pkgs/development/interpreters/python/cpython/3.6/profile-task.patch b/pkgs/development/interpreters/python/cpython/3.7/profile-task.patch similarity index 100% rename from pkgs/development/interpreters/python/cpython/3.6/profile-task.patch rename to pkgs/development/interpreters/python/cpython/3.7/profile-task.patch diff --git a/pkgs/development/interpreters/python/cpython/default.nix b/pkgs/development/interpreters/python/cpython/default.nix index 8fbcd7027ae9..2a19c363aa4b 100644 --- a/pkgs/development/interpreters/python/cpython/default.nix +++ b/pkgs/development/interpreters/python/cpython/default.nix @@ -180,7 +180,7 @@ let if isDarwin then "darwin" else "${multiarchCpu}-${parsed.kernel.name}-${pythonAbiName}"; - abiFlags = optionalString (isPy36 || isPy37) "m"; + abiFlags = optionalString isPy37 "m"; # https://github.com/python/cpython/blob/e488e300f5c01289c10906c2e53a8e43d6de32d8/configure.ac#L78 pythonSysconfigdataName = "_sysconfigdata_${abiFlags}_${parsed.kernel.name}_${multiarch}"; @@ -228,13 +228,7 @@ in with passthru; stdenv.mkDerivation { ] ++ optionals mimetypesSupport [ # Make the mimetypes module refer to the right file ./mimetypes.patch - ] ++ optionals (isPy35 || isPy36) [ - # Determinism: Write null timestamps when compiling python files. - ./3.5/force_bytecode_determinism.patch - ] ++ optionals isPy35 [ - # Backports support for LD_LIBRARY_PATH from 3.6 - ./3.5/ld_library_path.patch - ] ++ optionals (isPy35 || isPy36 || isPy37) [ + ] ++ optionals isPy37 [ # Backport a fix for discovering `rpmbuild` command when doing `python setup.py bdist_rpm` to 3.5, 3.6, 3.7. # See: https://bugs.python.org/issue11122 ./3.7/fix-hardcoded-path-checking-for-rpmbuild.patch @@ -250,12 +244,7 @@ in with passthru; stdenv.mkDerivation { ./3.11/darwin-libutil.patch ] ++ optionals (pythonOlder "3.8") [ # Backport from CPython 3.8 of a good list of tests to run for PGO. - ( - if isPy36 || isPy37 then - ./3.6/profile-task.patch - else - ./3.5/profile-task.patch - ) + ./3.7/profile-task.patch ] ++ optionals (pythonAtLeast "3.9" && pythonOlder "3.11" && stdenv.isDarwin) [ # Stop checking for TCL/TK in global macOS locations ./3.9/darwin-tcl-tk.patch @@ -265,9 +254,7 @@ in with passthru; stdenv.mkDerivation { # only works for GCC and Apple Clang. This makes distutils to call C++ # compiler when needed. ( - if isPy35 then - ./3.5/python-3.x-distutils-C++.patch - else if pythonAtLeast "3.7" && pythonOlder "3.11" then + if pythonAtLeast "3.7" && pythonOlder "3.11" then ./3.7/python-3.x-distutils-C++.patch else if pythonAtLeast "3.11" then ./3.11/python-3.x-distutils-C++.patch @@ -281,15 +268,7 @@ in with passthru; stdenv.mkDerivation { # LDSHARED now uses $CC instead of gcc. Fixes cross-compilation of extension modules. ./3.8/0001-On-all-posix-systems-not-just-Darwin-set-LDSHARED-if.patch # Use sysconfigdata to find headers. Fixes cross-compilation of extension modules. - ( - if isPy36 then - ./3.6/fix-finding-headers-when-cross-compiling.patch - else - ./3.7/fix-finding-headers-when-cross-compiling.patch - ) - ] ++ optionals (isPy36) [ - # Backport a fix for ctypes.util.find_library. - ./3.6/find_library.patch + ./3.7/fix-finding-headers-when-cross-compiling.patch ]; postPatch = '' diff --git a/pkgs/development/interpreters/python/default.nix b/pkgs/development/interpreters/python/default.nix index 903dae38ac12..31e7272cdcc0 100644 --- a/pkgs/development/interpreters/python/default.nix +++ b/pkgs/development/interpreters/python/default.nix @@ -84,8 +84,6 @@ }); in rec { isPy27 = pythonVersion == "2.7"; - isPy35 = pythonVersion == "3.5"; - isPy36 = pythonVersion == "3.6"; isPy37 = pythonVersion == "3.7"; isPy38 = pythonVersion == "3.8"; isPy39 = pythonVersion == "3.9"; diff --git a/pkgs/development/interpreters/python/python-packages-base.nix b/pkgs/development/interpreters/python/python-packages-base.nix index a63ece3c2369..81ad194a25c7 100644 --- a/pkgs/development/interpreters/python/python-packages-base.nix +++ b/pkgs/development/interpreters/python/python-packages-base.nix @@ -8,7 +8,7 @@ self: let inherit (self) callPackage; - inherit (python.passthru) isPy27 isPy35 isPy36 isPy37 isPy38 isPy39 isPy310 isPy311 isPy3k isPyPy pythonAtLeast pythonOlder; + inherit (python.passthru) isPy27 isPy37 isPy38 isPy39 isPy310 isPy311 isPy3k isPyPy pythonAtLeast pythonOlder; namePrefix = python.libPrefix + "-"; @@ -87,7 +87,7 @@ let in { inherit lib pkgs stdenv; - inherit (python.passthru) isPy27 isPy35 isPy36 isPy37 isPy38 isPy39 isPy310 isPy311 isPy3k isPyPy pythonAtLeast pythonOlder; + inherit (python.passthru) isPy27 isPy37 isPy38 isPy39 isPy310 isPy311 isPy3k isPyPy pythonAtLeast pythonOlder; inherit buildPythonPackage buildPythonApplication; inherit fetchPypi; inherit hasPythonModule requiredPythonModules makePythonPath disabled disabledIf; From b56650507918e7f217060fe7f348770b346f98ca Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Mon, 28 Nov 2022 14:02:48 +0100 Subject: [PATCH 07/13] python3Packages.easysnmp: drop Leaf package that doesn't build on supported python versions. --- .../python-modules/easysnmp/default.nix | 55 ------------------- pkgs/top-level/python-packages.nix | 2 - 2 files changed, 57 deletions(-) delete mode 100644 pkgs/development/python-modules/easysnmp/default.nix diff --git a/pkgs/development/python-modules/easysnmp/default.nix b/pkgs/development/python-modules/easysnmp/default.nix deleted file mode 100644 index c55bf52a6643..000000000000 --- a/pkgs/development/python-modules/easysnmp/default.nix +++ /dev/null @@ -1,55 +0,0 @@ -{ lib -, buildPythonPackage -, pythonAtLeast -, fetchFromGitHub -, net-snmp -, openssl -, pytest -, pytest-cov -, pytest-flake8 -, pytest-sugar -, termcolor -}: - -buildPythonPackage rec { - pname = "easysnmp"; - version = "0.2.5"; - - # See https://github.com/kamakazikamikaze/easysnmp/issues/108 - disabled = pythonAtLeast "3.7"; - - src = fetchFromGitHub { - owner = "kamakazikamikaze"; - repo = pname; - rev = version; - sha256 = "1si9iyxqj6z22jzn6m93lwpinsqn20lix2py3jm3g3fmwawkd735"; - }; - - checkInputs = [ - pytest - pytest-cov - pytest-flake8 - pytest-sugar - termcolor - ]; - - buildInputs = [ - net-snmp - openssl - ]; - - buildPhase = '' - python setup.py build bdist_wheel --basedir=${lib.getBin net-snmp}/bin - ''; - - # Unable to get tests to pass, even running by hand. The pytest tests have - # become stale. - doCheck = false; - - meta = with lib; { - description = "A blazingly fast and Pythonic SNMP library based on the official Net-SNMP bindings"; - homepage = "https://easysnmp.readthedocs.io/en/latest/"; - license = licenses.bsd3; - maintainers = with maintainers; [ WhittlesJr ]; - }; -} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 1d4279cc6646..643b99011b8c 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -2832,8 +2832,6 @@ self: super: with self; { EasyProcess = callPackage ../development/python-modules/easyprocess { }; - easysnmp = callPackage ../development/python-modules/easysnmp { }; - easy-thumbnails = callPackage ../development/python-modules/easy-thumbnails { }; easywatch = callPackage ../development/python-modules/easywatch { }; From d6940e54e9f8aa3fce41ce2fae2cd0d731c57e4d Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Mon, 28 Nov 2022 14:46:56 +0100 Subject: [PATCH 08/13] python3Packages.backports_abc: drop Backport of collections.abc additions from one EOL version to another. --- .../python-modules/backports_abc/default.nix | 23 ------------------- pkgs/servers/calibre-web/default.nix | 3 ++- pkgs/top-level/python-packages.nix | 2 -- 3 files changed, 2 insertions(+), 26 deletions(-) delete mode 100644 pkgs/development/python-modules/backports_abc/default.nix diff --git a/pkgs/development/python-modules/backports_abc/default.nix b/pkgs/development/python-modules/backports_abc/default.nix deleted file mode 100644 index 684626c0780f..000000000000 --- a/pkgs/development/python-modules/backports_abc/default.nix +++ /dev/null @@ -1,23 +0,0 @@ -{ lib -, buildPythonPackage -, fetchPypi -, unittestCheckHook -}: - -buildPythonPackage rec { - pname = "backports_abc"; - version = "0.5"; - - src = fetchPypi { - inherit pname version; - sha256 = "033be54514a03e255df75c5aee8f9e672f663f93abb723444caec8fe43437bde"; - }; - - checkInputs = [ unittestCheckHook ]; - - meta = { - homepage = "https://github.com/cython/backports_abc"; - license = lib.licenses.psfl; - description = "A backport of recent additions to the 'collections.abc' module"; - }; -} diff --git a/pkgs/servers/calibre-web/default.nix b/pkgs/servers/calibre-web/default.nix index 6047eae3c962..14c4822f3fb4 100644 --- a/pkgs/servers/calibre-web/default.nix +++ b/pkgs/servers/calibre-web/default.nix @@ -18,7 +18,6 @@ python3.pkgs.buildPythonApplication rec { propagatedBuildInputs = with python3.pkgs; [ APScheduler advocate - backports_abc chardet flask-babel flask-login @@ -54,6 +53,8 @@ python3.pkgs.buildPythonApplication rec { mv cps.py src/calibreweb/__init__.py mv cps src/calibreweb + sed -i "/backports_abc/d" setup.cfg + substituteInPlace setup.cfg \ --replace "cps = calibreweb:main" "calibre-web = calibreweb:main" \ --replace "chardet>=3.0.0,<4.1.0" "chardet>=3.0.0,<6" \ diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 643b99011b8c..c195b70de664 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -1098,8 +1098,6 @@ self: super: with self; { backports-cached-property = callPackage ../development/python-modules/backports-cached-property { }; - backports_abc = callPackage ../development/python-modules/backports_abc { }; - backports_csv = callPackage ../development/python-modules/backports_csv { }; backports-datetime-fromisoformat = callPackage ../development/python-modules/backports-datetime-fromisoformat { }; From ec0029965cb9274eb69d5bb1f67a253db48b28d7 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Mon, 28 Nov 2022 15:10:49 +0100 Subject: [PATCH 09/13] python3Packages.backports-datetime-fromisoformat: 1.0.0 -> 2.0.0 https://github.com/movermeyer/backports.datetime_fromisoformat/releases/tag/v2.0.0 --- .../default.nix | 31 +++++++++++++------ 1 file changed, 22 insertions(+), 9 deletions(-) diff --git a/pkgs/development/python-modules/backports-datetime-fromisoformat/default.nix b/pkgs/development/python-modules/backports-datetime-fromisoformat/default.nix index 7db161b86110..40014adb9088 100644 --- a/pkgs/development/python-modules/backports-datetime-fromisoformat/default.nix +++ b/pkgs/development/python-modules/backports-datetime-fromisoformat/default.nix @@ -1,21 +1,34 @@ -{ lib, buildPythonPackage, fetchPypi }: +{ lib +, buildPythonPackage +, fetchFromGitHub +, pytz +, unittestCheckHook +}: buildPythonPackage rec { pname = "backports-datetime-fromisoformat"; - version = "1.0.0"; + version = "2.0.0"; + format = "setuptools"; - src = fetchPypi { - inherit pname version; - sha256 = "0p0gyhfqq6gssf3prsy0pcfq5w0wx2w3pcjqbwx3imvc92ls4xwm"; + src = fetchFromGitHub { + owner = "movermeyer"; + repo = "backports.datetime_fromisoformat"; + rev = "refs/tags/v${version}"; + hash = "sha256-aHF3E/fLN+j/T4W9lvuVSMy6iRSEn+ARWmL01rY+ixs="; }; - # no tests in pypi package - doCheck = false; + checkInputs = [ + pytz + unittestCheckHook + ]; - pythonImportsCheck = [ "backports.datetime_fromisoformat" ]; + pythonImportsCheck = [ + "backports.datetime_fromisoformat" + ]; meta = with lib; { - description = "Backport of Python 3.7's datetime.fromisoformat"; + changelog = "https://github.com/movermeyer/backports.datetime_fromisoformat/releases/tag/v${version}"; + description = "Backport of Python 3.11's datetime.fromisoformat"; homepage = "https://github.com/movermeyer/backports.datetime_fromisoformat"; license = licenses.mit; maintainers = with maintainers; [ SuperSandro2000 ]; From f9d1ea261f276f956003cd29d59c7fe3781086c5 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Mon, 28 Nov 2022 15:17:40 +0100 Subject: [PATCH 10/13] python3Packages.backports-entry-points-selectable: 1.1.1 -> 1.2.0 https://github.com/jaraco/backports.entry_points_selectable/blob/v1.2.0/CHANGES.rst --- .../default.nix | 20 +++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/pkgs/development/python-modules/backports-entry-points-selectable/default.nix b/pkgs/development/python-modules/backports-entry-points-selectable/default.nix index 84618e8da1d8..9ff04e0e5038 100644 --- a/pkgs/development/python-modules/backports-entry-points-selectable/default.nix +++ b/pkgs/development/python-modules/backports-entry-points-selectable/default.nix @@ -1,16 +1,27 @@ -{ lib, buildPythonPackage, fetchPypi, pythonOlder, setuptools-scm, importlib-metadata }: +{ lib +, buildPythonPackage +, fetchPypi +, pythonOlder +, setuptools-scm +, importlib-metadata +}: buildPythonPackage rec { pname = "backports-entry-points-selectable"; - version = "1.1.1"; + version = "1.2.0"; + format = "pyproject"; + + disabled = pythonOlder "3.7"; src = fetchPypi { pname = "backports.entry_points_selectable"; inherit version; - sha256 = "914b21a479fde881635f7af5adc7f6e38d6b274be32269070c53b698c60d5386"; + hash = "sha256-Rwb1kXllfKfB0yWlQ+4TcPj0YzH0MrysYvqyQv3wr6U="; }; - nativeBuildInputs = [ setuptools-scm ]; + nativeBuildInputs = [ + setuptools-scm + ]; propagatedBuildInputs = lib.optionals (pythonOlder "3.8") [ importlib-metadata @@ -24,6 +35,7 @@ buildPythonPackage rec { pythonNamespaces = [ "backports" ]; meta = with lib; { + changelog = "https://github.com/jaraco/backports.entry_points_selectable/blob/v${version}/CHANGES.rst"; description = "Compatibility shim providing selectable entry points for older implementations"; homepage = "https://github.com/jaraco/backports.entry_points_selectable"; license = licenses.mit; From 243defc46a1fa7c5e908867b2e2a6638839a8f2e Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Mon, 28 Nov 2022 15:34:27 +0100 Subject: [PATCH 11/13] python3Packages.backports_ssl_match_hostname: drop Backport from one EOL release to another. --- .../virtualization/docker/compose_1.nix | 4 ++-- .../backports_ssl_match_hostname/default.nix | 18 ------------------ pkgs/top-level/python-packages.nix | 2 -- 3 files changed, 2 insertions(+), 22 deletions(-) delete mode 100644 pkgs/development/python-modules/backports_ssl_match_hostname/default.nix diff --git a/pkgs/applications/virtualization/docker/compose_1.nix b/pkgs/applications/virtualization/docker/compose_1.nix index 1299d6f69ec7..425363e2b73b 100644 --- a/pkgs/applications/virtualization/docker/compose_1.nix +++ b/pkgs/applications/virtualization/docker/compose_1.nix @@ -1,7 +1,7 @@ { lib, buildPythonApplication, fetchPypi, pythonOlder , installShellFiles , mock, pytest, nose -, pyyaml, backports_ssl_match_hostname, colorama, docopt +, pyyaml, colorama, docopt , dockerpty, docker, jsonschema, requests , six, texttable, websocket-client, cached-property , enum34, functools32, paramiko, distro, python-dotenv @@ -24,7 +24,7 @@ buildPythonApplication rec { pyyaml colorama dockerpty docker jsonschema requests six texttable websocket-client docopt cached-property paramiko distro python-dotenv - ] ++ lib.optional (pythonOlder "3.7") backports_ssl_match_hostname + ] ++ lib.optional (pythonOlder "3.4") enum34 ++ lib.optional (pythonOlder "3.2") functools32; diff --git a/pkgs/development/python-modules/backports_ssl_match_hostname/default.nix b/pkgs/development/python-modules/backports_ssl_match_hostname/default.nix deleted file mode 100644 index a7403e16123a..000000000000 --- a/pkgs/development/python-modules/backports_ssl_match_hostname/default.nix +++ /dev/null @@ -1,18 +0,0 @@ -{ lib, buildPythonPackage, fetchPypi, pythonAtLeast }: - -buildPythonPackage rec { - pname = "backports.ssl_match_hostname"; - version = "3.7.0.1"; - disabled = pythonAtLeast "3.7"; - - src = fetchPypi { - inherit pname version; - sha256 = "bb82e60f9fbf4c080eabd957c39f0641f0fc247d9a16e31e26d594d8f42b9fd2"; - }; - - meta = with lib; { - description = "The Secure Sockets layer is only actually *secure*"; - homepage = "https://bitbucket.org/brandon/backports.ssl_match_hostname"; - license = licenses.psfl; - }; -} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index c195b70de664..454b83aa1a94 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -1110,8 +1110,6 @@ self: super: with self; { backports-shutil-which = callPackage ../development/python-modules/backports-shutil-which { }; - backports_ssl_match_hostname = callPackage ../development/python-modules/backports_ssl_match_hostname { }; - backports_tempfile = callPackage ../development/python-modules/backports_tempfile { }; backports_unittest-mock = callPackage ../development/python-modules/backports_unittest-mock { }; From df500fa527cc384f2f1802e700ecee5616e539d8 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Tue, 29 Nov 2022 01:08:31 +0100 Subject: [PATCH 12/13] python3Packages.aiocontextvars: use pytestCheckHook and specify format. --- .../python-modules/aiocontextvars/default.nix | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/pkgs/development/python-modules/aiocontextvars/default.nix b/pkgs/development/python-modules/aiocontextvars/default.nix index 0ae4349afb4f..f673e86bbacc 100644 --- a/pkgs/development/python-modules/aiocontextvars/default.nix +++ b/pkgs/development/python-modules/aiocontextvars/default.nix @@ -2,7 +2,7 @@ , buildPythonPackage , fetchFromGitHub , pytest-runner -, pytest +, pytestCheckHook , pytest-asyncio , sqlalchemy , isPy27 @@ -11,6 +11,7 @@ buildPythonPackage rec { pname = "aiocontextvars"; version = "0.2.2"; + format = "setuptools"; disabled = isPy27; src = fetchFromGitHub { @@ -24,17 +25,14 @@ buildPythonPackage rec { pytest-runner ]; - checkInputs = [ - pytest - pytest-asyncio - ]; - propagatedBuildInputs = [ sqlalchemy + ]; - checkPhase = '' - pytest - ''; + checkInputs = [ + pytestCheckHook + pytest-asyncio + ]; meta = with lib; { description = "Asyncio support for PEP-567 contextvars backport"; From 19e6e26e8a43a830e123449f376d1604f163d262 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Tue, 29 Nov 2022 01:18:18 +0100 Subject: [PATCH 13/13] python3Packages.sniffio: Use pytestCheckHook and set format. Reformat. --- .../python-modules/sniffio/default.nix | 26 ++++++++++++------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/pkgs/development/python-modules/sniffio/default.nix b/pkgs/development/python-modules/sniffio/default.nix index bc2cd66b0a33..0a8dc4aef4e5 100644 --- a/pkgs/development/python-modules/sniffio/default.nix +++ b/pkgs/development/python-modules/sniffio/default.nix @@ -1,25 +1,33 @@ -{ buildPythonPackage, lib, fetchPypi, glibcLocales, isPy3k -, pythonOlder, pytest, curio +{ buildPythonPackage +, lib +, fetchPypi +, glibcLocales +, isPy3k +, pythonOlder +, pytestCheckHook +, curio }: buildPythonPackage rec { pname = "sniffio"; version = "1.3.0"; + format = "setuptools"; src = fetchPypi { inherit pname version; - sha256 = "sha256-5gMFxeXTFPU4klm38iqqM9j33uSXYxGSNK83VcVbkQE="; + hash = "sha256-5gMFxeXTFPU4klm38iqqM9j33uSXYxGSNK83VcVbkQE="; }; disabled = !isPy3k; - buildInputs = [ glibcLocales ]; + buildInputs = [ + glibcLocales + ]; - checkInputs = [ pytest curio ]; - - checkPhase = '' - pytest - ''; + checkInputs = [ + curio + pytestCheckHook + ]; meta = with lib; { homepage = "https://github.com/python-trio/sniffio";