From b6654d9d6cad615835d6d60b9a8da8f41bfdcc77 Mon Sep 17 00:00:00 2001 From: Jonathan Ringer Date: Tue, 16 Jun 2020 12:55:33 -0700 Subject: [PATCH 01/27] python2Packages: default to dontUsePythonRecompileBytecode = true; --- .../development/interpreters/python/mk-python-derivation.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkgs/development/interpreters/python/mk-python-derivation.nix b/pkgs/development/interpreters/python/mk-python-derivation.nix index 41efddbb3e0..59510252409 100644 --- a/pkgs/development/interpreters/python/mk-python-derivation.nix +++ b/pkgs/development/interpreters/python/mk-python-derivation.nix @@ -165,6 +165,11 @@ let # Python packages built through cross-compilation are always for the host platform. disallowedReferences = lib.optionals (python.stdenv.hostPlatform != python.stdenv.buildPlatform) [ python.pythonForBuild ]; + # many packages that support python2, may include code + # which python2 is not able to compile + # mkDerivation hash will not change when passed null attrs + dontUsePythonRecompileBytecode = attrs.dontUsePythonRecompileBytecode or (if python.isPy27 then true else null); + meta = { # default to python's platforms platforms = python.meta.platforms; From 393f5fc5f192cd665c6131c1def87166a9eab228 Mon Sep 17 00:00:00 2001 From: Jonathan Ringer Date: Tue, 16 Jun 2020 12:56:22 -0700 Subject: [PATCH 02/27] python2Packages.freezegun: disable tests for python2 Contains python3 exclusive code --- pkgs/development/python-modules/freezegun/default.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkgs/development/python-modules/freezegun/default.nix b/pkgs/development/python-modules/freezegun/default.nix index 3a45e0942f8..92254b94dee 100644 --- a/pkgs/development/python-modules/freezegun/default.nix +++ b/pkgs/development/python-modules/freezegun/default.nix @@ -1,6 +1,7 @@ { stdenv , buildPythonPackage , fetchPypi +, isPy27 , dateutil , six , mock @@ -19,6 +20,8 @@ buildPythonPackage rec { propagatedBuildInputs = [ dateutil six ]; checkInputs = [ mock nose pytest ]; + # contains python3 specific code + doCheck = !isPy27; meta = with stdenv.lib; { description = "FreezeGun: Let your Python tests travel through time"; From 9ef6349dcdd33c41ef4a4fb6423f0abb6c918f52 Mon Sep 17 00:00:00 2001 From: Jonathan Ringer Date: Tue, 16 Jun 2020 13:28:57 -0700 Subject: [PATCH 03/27] pythonPackages.JPype: disable for python2 setup.py is no longer python2 compatible --- pkgs/development/python-modules/JPype1/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/development/python-modules/JPype1/default.nix b/pkgs/development/python-modules/JPype1/default.nix index b70879952f4..ca30631a68e 100644 --- a/pkgs/development/python-modules/JPype1/default.nix +++ b/pkgs/development/python-modules/JPype1/default.nix @@ -1,12 +1,14 @@ { lib , buildPythonPackage , fetchPypi +, isPy27 , pytest }: buildPythonPackage rec { pname = "JPype1"; version = "0.7.5"; + disabled = isPy27; src = fetchPypi { inherit pname version; From d5ca07e16024b2696caa1e08019de670bd3307a9 Mon Sep 17 00:00:00 2001 From: Jonathan Ringer Date: Tue, 16 Jun 2020 13:30:52 -0700 Subject: [PATCH 04/27] pythonPackages.astral: disable for python2 ``` Processing ./astral-2.2-py2-none-any.whl ERROR: Package 'astral' requires a different Python: 2.7.18 not in '>=3.6' ``` --- pkgs/development/python-modules/astral/default.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/astral/default.nix b/pkgs/development/python-modules/astral/default.nix index 11a29f5d37a..13c9932a128 100644 --- a/pkgs/development/python-modules/astral/default.nix +++ b/pkgs/development/python-modules/astral/default.nix @@ -1,8 +1,9 @@ -{ stdenv, buildPythonPackage, fetchPypi, pytz, requests, pytest }: +{ stdenv, buildPythonPackage, fetchPypi, isPy27, pytz, requests, pytest }: buildPythonPackage rec { pname = "astral"; version = "2.2"; + disabled = isPy27; src = fetchPypi { inherit pname version; From 8db288ee06a05688fbe6d1a8ff55e03e5e1e40a7 Mon Sep 17 00:00:00 2001 From: Jonathan Ringer Date: Tue, 16 Jun 2020 13:32:05 -0700 Subject: [PATCH 05/27] pythonPackages.av: disable for python2 Uses shlex commands which aren't present in python2 ``` from shlex import quote ImportError: cannot import name quote ``` --- pkgs/development/python-modules/av/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/development/python-modules/av/default.nix b/pkgs/development/python-modules/av/default.nix index 123a53d5cf3..3a2fcc04d04 100644 --- a/pkgs/development/python-modules/av/default.nix +++ b/pkgs/development/python-modules/av/default.nix @@ -1,6 +1,7 @@ { lib , buildPythonPackage , fetchPypi +, isPy27 , numpy , ffmpeg_4 , pkgconfig @@ -9,6 +10,7 @@ buildPythonPackage rec { pname = "av"; version = "8.0.2"; + disabled = isPy27; # setup.py no longer compatible src = fetchPypi { inherit pname version; From 625653c36d1d6a585feedfa19a8838b4e3a70d12 Mon Sep 17 00:00:00 2001 From: Jonathan Ringer Date: Tue, 16 Jun 2020 13:39:28 -0700 Subject: [PATCH 06/27] pythonPackages.auth0-python: fix tests --- .../python-modules/auth0-python/default.nix | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/pkgs/development/python-modules/auth0-python/default.nix b/pkgs/development/python-modules/auth0-python/default.nix index e2fafb3aef7..fed673453d1 100644 --- a/pkgs/development/python-modules/auth0-python/default.nix +++ b/pkgs/development/python-modules/auth0-python/default.nix @@ -3,6 +3,7 @@ , fetchPypi , requests , mock +, pytestCheckHook }: buildPythonPackage rec { @@ -20,6 +21,17 @@ buildPythonPackage rec { checkInputs = [ mock + pytestCheckHook + ]; + + pytestFlagsArray = [ + # jwt package is not available in nixpkgs + "--ignore=auth0/v3/test/authentication/test_token_verifier.py" + ]; + + # tries to ping websites (e.g. google.com) + disabledTests = [ + "can_timeout" ]; meta = with lib; { From c3597a127ad55f5e2f59c5966716291aee791e55 Mon Sep 17 00:00:00 2001 From: Jonathan Ringer Date: Tue, 16 Jun 2020 13:41:57 -0700 Subject: [PATCH 07/27] pythonPackages.avro: fix build --- pkgs/development/python-modules/avro/default.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/avro/default.nix b/pkgs/development/python-modules/avro/default.nix index 48ccd891c85..58c3b46cdba 100644 --- a/pkgs/development/python-modules/avro/default.nix +++ b/pkgs/development/python-modules/avro/default.nix @@ -1,4 +1,4 @@ -{ stdenv, buildPythonPackage, fetchPypi, isPy3k }: +{ stdenv, buildPythonPackage, fetchPypi, isPy3k, pycodestyle, isort }: buildPythonPackage rec { pname = "avro"; @@ -10,6 +10,9 @@ buildPythonPackage rec { sha256 = "4487f0e91d0d44142bd08b3c6da57073b720c3effb02eeb4e2e822804964c56b"; }; + nativeBuildInputs = [ pycodestyle ]; + propagatedBuildInputs = [ isort ]; + meta = with stdenv.lib; { description = "A serialization and RPC framework"; homepage = "https://pypi.python.org/pypi/avro/"; From fe1a38a2e2e092d8804a177be0bd0601455fba37 Mon Sep 17 00:00:00 2001 From: Jonathan Ringer Date: Tue, 16 Jun 2020 13:42:37 -0700 Subject: [PATCH 08/27] pythonPackages.base58: disable python2 python2 abandoned upstream --- pkgs/development/python-modules/base58/default.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/base58/default.nix b/pkgs/development/python-modules/base58/default.nix index e0d4d59fc03..53f5f0599e8 100644 --- a/pkgs/development/python-modules/base58/default.nix +++ b/pkgs/development/python-modules/base58/default.nix @@ -1,8 +1,9 @@ -{ stdenv, fetchPypi, buildPythonPackage, pytest, pyhamcrest }: +{ stdenv, fetchPypi, buildPythonPackage, isPy27, pytest, pyhamcrest }: buildPythonPackage rec { pname = "base58"; version = "2.0.0"; + disabled = isPy27; # python 2 abandoned upstream src = fetchPypi { inherit pname version; From 37019137751b55452a21564c8489bac7cbefb3aa Mon Sep 17 00:00:00 2001 From: Jonathan Ringer Date: Tue, 16 Jun 2020 13:45:50 -0700 Subject: [PATCH 09/27] pythonPackages.cfgv: disable python2, abandoned --- pkgs/development/python-modules/cfgv/default.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/cfgv/default.nix b/pkgs/development/python-modules/cfgv/default.nix index c040ae7a5f3..e1b3dfc8e2b 100644 --- a/pkgs/development/python-modules/cfgv/default.nix +++ b/pkgs/development/python-modules/cfgv/default.nix @@ -1,8 +1,9 @@ -{ lib, buildPythonPackage, fetchPypi, six }: +{ lib, buildPythonPackage, fetchPypi, isPy27, six }: buildPythonPackage rec { pname = "cfgv"; version = "3.1.0"; + disabled = isPy27; src = fetchPypi { inherit pname version; From 03b2293d8baa9663a01f5d94bf9f39866f7d23cb Mon Sep 17 00:00:00 2001 From: Jonathan Ringer Date: Tue, 16 Jun 2020 13:46:14 -0700 Subject: [PATCH 10/27] pythonPackages.cloudpickle: disable python2, abandoned --- pkgs/development/python-modules/cloudpickle/default.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/cloudpickle/default.nix b/pkgs/development/python-modules/cloudpickle/default.nix index e59f1d8afc4..551dd06f630 100644 --- a/pkgs/development/python-modules/cloudpickle/default.nix +++ b/pkgs/development/python-modules/cloudpickle/default.nix @@ -1,8 +1,9 @@ -{ stdenv, buildPythonPackage, fetchPypi, pytest, mock }: +{ stdenv, buildPythonPackage, fetchPypi, isPy27, pytest, mock }: buildPythonPackage rec { pname = "cloudpickle"; version = "1.4.1"; + disabled = isPy27; # abandoned upstream src = fetchPypi { inherit pname version; From e6f7592065116f954edcab4ea2d62ec01a718024 Mon Sep 17 00:00:00 2001 From: Jonathan Ringer Date: Tue, 16 Jun 2020 13:48:32 -0700 Subject: [PATCH 11/27] pythonPackages.etelemetry: disabled python2, abandoned --- pkgs/development/python-modules/etelemetry/default.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/etelemetry/default.nix b/pkgs/development/python-modules/etelemetry/default.nix index 0b9879ea715..041847089e9 100644 --- a/pkgs/development/python-modules/etelemetry/default.nix +++ b/pkgs/development/python-modules/etelemetry/default.nix @@ -1,8 +1,9 @@ -{ lib, buildPythonPackage, fetchPypi, requests, pytest }: +{ lib, buildPythonPackage, fetchPypi, isPy27, requests, pytest }: buildPythonPackage rec { version = "0.2.1"; pname = "etelemetry"; + disabled = isPy27; src = fetchPypi { inherit pname version; From f8bf71047b50fd0728eb975d98dba19b35d5809a Mon Sep 17 00:00:00 2001 From: Jonathan Ringer Date: Tue, 16 Jun 2020 13:49:20 -0700 Subject: [PATCH 12/27] pythonPackages.coveralls: disabled python2, abandoned --- pkgs/development/python-modules/coveralls/default.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/coveralls/default.nix b/pkgs/development/python-modules/coveralls/default.nix index c7d046eb019..c81cd3c666a 100644 --- a/pkgs/development/python-modules/coveralls/default.nix +++ b/pkgs/development/python-modules/coveralls/default.nix @@ -1,6 +1,7 @@ { buildPythonPackage , lib , fetchPypi +, isPy27 , mock , pytest , pytestrunner @@ -15,8 +16,8 @@ buildPythonPackage rec { pname = "coveralls"; - name = "${pname}-python-${version}"; version = "2.0.0"; + disabled = isPy27; # wanted by tests src = fetchPypi { From 77fe6c1c760201f377cce500b9fc81d2a399e593 Mon Sep 17 00:00:00 2001 From: Jonathan Ringer Date: Tue, 16 Jun 2020 13:50:24 -0700 Subject: [PATCH 13/27] pythonPackages.coveralls: disabled python2, not compatible --- pkgs/development/python-modules/dpath/default.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/dpath/default.nix b/pkgs/development/python-modules/dpath/default.nix index c9c9ad17981..548bd516838 100644 --- a/pkgs/development/python-modules/dpath/default.nix +++ b/pkgs/development/python-modules/dpath/default.nix @@ -1,10 +1,11 @@ -{ stdenv, fetchPypi, buildPythonPackage +{ stdenv, fetchPypi, buildPythonPackage, isPy27 , mock, pytestCheckHook, nose, hypothesis }: buildPythonPackage rec { pname = "dpath"; version = "2.0.1"; + disabled = isPy27; # uses python3 imports src = fetchPypi { inherit pname version; From 622e5db89ee72d790e5eaaac3285dac1ceda7719 Mon Sep 17 00:00:00 2001 From: Jonathan Ringer Date: Tue, 16 Jun 2020 13:56:39 -0700 Subject: [PATCH 14/27] pythonPackages.filemagic: disable python2, no longer compat --- pkgs/development/python-modules/filemagic/default.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/filemagic/default.nix b/pkgs/development/python-modules/filemagic/default.nix index 2feda678f74..ef8f6933e8f 100644 --- a/pkgs/development/python-modules/filemagic/default.nix +++ b/pkgs/development/python-modules/filemagic/default.nix @@ -4,6 +4,7 @@ buildPythonPackage { pname = "filemagic"; version = "1.6"; + disabled = !isPy3k; # asserts on ResourceWarning # Don't use the PyPI source because it's missing files required for testing src = fetchFromGitHub { @@ -18,7 +19,7 @@ buildPythonPackage { "'${file}/lib/libmagic${stdenv.hostPlatform.extensions.sharedLibrary}'" ''; - checkInputs = [ (if isPy3k then mock else unittest2) ]; + checkInputs = [ mock ] ++ lib.optionals (!isPy3k) [ unittest2 ]; meta = with lib; { description = "File type identification using libmagic"; From de231741d15c9d6ee4a4ee60583106263c8073e2 Mon Sep 17 00:00:00 2001 From: Jonathan Ringer Date: Tue, 16 Jun 2020 13:57:19 -0700 Subject: [PATCH 15/27] pythonPackages.humanize: disable python2, setup.py is py3 only --- pkgs/development/python-modules/humanize/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/development/python-modules/humanize/default.nix b/pkgs/development/python-modules/humanize/default.nix index 10f1b800068..418a8e203e4 100644 --- a/pkgs/development/python-modules/humanize/default.nix +++ b/pkgs/development/python-modules/humanize/default.nix @@ -1,6 +1,7 @@ { stdenv , buildPythonPackage , fetchPypi +, isPy27 , mock , setuptools_scm }: @@ -8,6 +9,7 @@ buildPythonPackage rec { version = "2.4.0"; pname = "humanize"; + disabled = isPy27; # setup.py no longer compatible src = fetchPypi { inherit pname version; From d377538c0d50cb77eeaba5652dc063844f2cb111 Mon Sep 17 00:00:00 2001 From: Jonathan Ringer Date: Tue, 16 Jun 2020 13:59:06 -0700 Subject: [PATCH 16/27] pythonPackages.flake8-debugger: fix python <3.8 builds --- .../python-modules/flake8-debugger/default.nix | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/flake8-debugger/default.nix b/pkgs/development/python-modules/flake8-debugger/default.nix index 1f41c0a6849..81b903621b5 100644 --- a/pkgs/development/python-modules/flake8-debugger/default.nix +++ b/pkgs/development/python-modules/flake8-debugger/default.nix @@ -1,4 +1,10 @@ -{ lib, fetchPypi, buildPythonPackage, flake8, pycodestyle, pytestrunner, pytest }: +{ lib, fetchPypi, buildPythonPackage, pythonOlder +, flake8 +, importlib-metadata +, pycodestyle +, pytestrunner +, pytest +}: buildPythonPackage rec { pname = "flake8-debugger"; @@ -11,7 +17,8 @@ buildPythonPackage rec { nativeBuildInputs = [ pytestrunner ]; - propagatedBuildInputs = [ flake8 pycodestyle ]; + propagatedBuildInputs = [ flake8 pycodestyle ] + ++ lib.optionals (pythonOlder "3.8") [ importlib-metadata ]; checkInputs = [ pytest ]; From 974f59445746e2a03439101b15816275eb91fb06 Mon Sep 17 00:00:00 2001 From: Jonathan Ringer Date: Tue, 16 Jun 2020 13:59:29 -0700 Subject: [PATCH 17/27] pythonPackages.httptools: disable python2, abandoned --- pkgs/development/python-modules/httptools/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/development/python-modules/httptools/default.nix b/pkgs/development/python-modules/httptools/default.nix index c63b098d324..ed25195e3f2 100644 --- a/pkgs/development/python-modules/httptools/default.nix +++ b/pkgs/development/python-modules/httptools/default.nix @@ -1,11 +1,13 @@ { lib , buildPythonPackage , fetchPypi +, isPy27 }: buildPythonPackage rec { pname = "httptools"; version = "0.1.1"; + disabled = isPy27; src = fetchPypi { inherit pname version; From 1a230cfb207a82d29843981cdd0e26dc0a8de0a0 Mon Sep 17 00:00:00 2001 From: Jonathan Ringer Date: Tue, 16 Jun 2020 14:01:20 -0700 Subject: [PATCH 18/27] pythonPackages.http-ece: fix builds --- pkgs/development/python-modules/http-ece/default.nix | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pkgs/development/python-modules/http-ece/default.nix b/pkgs/development/python-modules/http-ece/default.nix index eafa429b439..638191ee7fc 100644 --- a/pkgs/development/python-modules/http-ece/default.nix +++ b/pkgs/development/python-modules/http-ece/default.nix @@ -1,5 +1,5 @@ -{ lib, fetchPypi, buildPythonPackage -, coverage, flake8, mock, nose +{ lib, fetchPypi, buildPythonPackage, pythonOlder +, coverage, flake8, mock, nose, importlib-metadata , cryptography }: buildPythonPackage rec { @@ -11,7 +11,8 @@ buildPythonPackage rec { sha256 = "1y5ln09ji4dwpzhxr77cggk02kghq7lql60a6969a5n2lwpvqblk"; }; - propagatedBuildInputs = [ cryptography ]; + propagatedBuildInputs = [ cryptography ] + ++ lib.optionals (pythonOlder "3.8") [ importlib-metadata ]; checkInputs = [ coverage flake8 mock nose ]; From ad3f2ad42e300a617f5cea761631a4573d5bbca9 Mon Sep 17 00:00:00 2001 From: Jonathan Ringer Date: Tue, 16 Jun 2020 14:02:08 -0700 Subject: [PATCH 19/27] pythonPackages.inflection: disable python2, abandoned --- pkgs/development/python-modules/inflection/default.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/inflection/default.nix b/pkgs/development/python-modules/inflection/default.nix index f41e72def8d..bf370d7ebf3 100644 --- a/pkgs/development/python-modules/inflection/default.nix +++ b/pkgs/development/python-modules/inflection/default.nix @@ -1,8 +1,9 @@ -{ lib, fetchPypi, buildPythonPackage, pytest } : +{ lib, fetchPypi, buildPythonPackage, isPy27, pytest } : buildPythonPackage rec { pname = "inflection"; version = "0.4.0"; + disabled = isPy27; src = fetchPypi { inherit pname version; From 478cd630153b0469a991013eaf8212e947e67729 Mon Sep 17 00:00:00 2001 From: Jonathan Ringer Date: Tue, 16 Jun 2020 14:03:23 -0700 Subject: [PATCH 20/27] pythonPackages.limnoria: disable python2, abandoned --- pkgs/development/python-modules/limnoria/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/development/python-modules/limnoria/default.nix b/pkgs/development/python-modules/limnoria/default.nix index 567cd3b2206..a4800e70ffc 100644 --- a/pkgs/development/python-modules/limnoria/default.nix +++ b/pkgs/development/python-modules/limnoria/default.nix @@ -1,12 +1,14 @@ { stdenv , buildPythonPackage , fetchPypi +, isPy27 , pkgs }: buildPythonPackage rec { pname = "limnoria"; version = "2020.04.11"; + disabled = isPy27; # abandoned upstream src = fetchPypi { inherit pname version; From f6626b6842fa500134297cb14e765a06f889f48b Mon Sep 17 00:00:00 2001 From: Jonathan Ringer Date: Tue, 16 Jun 2020 14:04:19 -0700 Subject: [PATCH 21/27] pythonPackages.mutagen: disable python2, abandoned --- pkgs/development/python-modules/mutagen/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/development/python-modules/mutagen/default.nix b/pkgs/development/python-modules/mutagen/default.nix index 4aacc0891db..9494d2c84a6 100644 --- a/pkgs/development/python-modules/mutagen/default.nix +++ b/pkgs/development/python-modules/mutagen/default.nix @@ -1,6 +1,7 @@ { lib , buildPythonPackage , fetchPypi +, isPy27 , fetchpatch , hypothesis , pycodestyle @@ -13,6 +14,7 @@ buildPythonPackage rec { pname = "mutagen"; version = "1.44.0"; + disabled = isPy27; # abandoned src = fetchPypi { inherit pname version; From d017475b751d6f314a32a266f3db4f852dd73539 Mon Sep 17 00:00:00 2001 From: Jonathan Ringer Date: Tue, 16 Jun 2020 14:09:02 -0700 Subject: [PATCH 22/27] python2Packages.mutagen: freeze at 1.43 --- .../python-modules/mutagen/1.43.nix | 35 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 5 ++- 2 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 pkgs/development/python-modules/mutagen/1.43.nix diff --git a/pkgs/development/python-modules/mutagen/1.43.nix b/pkgs/development/python-modules/mutagen/1.43.nix new file mode 100644 index 00000000000..3947dc05fa4 --- /dev/null +++ b/pkgs/development/python-modules/mutagen/1.43.nix @@ -0,0 +1,35 @@ +{ lib +, buildPythonPackage +, fetchPypi +, fetchpatch +, hypothesis +, pycodestyle +, pyflakes +, pytest +, setuptools +, pkgs +}: + +buildPythonPackage rec { + pname = "mutagen"; + version = "1.43.0"; + + src = fetchPypi { + inherit pname version; + sha256 = "125m0pkiw5lsffc0236xdlxfhwpr8csvxpmg6855405qy4wjv61s"; + }; + + propagatedBuildInputs = [ setuptools ]; + checkInputs = [ + pkgs.faad2 pkgs.flac pkgs.vorbis-tools pkgs.liboggz + pkgs.glibcLocales pycodestyle pyflakes pytest hypothesis + ]; + LC_ALL = "en_US.UTF-8"; + + meta = with lib; { + description = "Python multimedia tagging library"; + homepage = "https://mutagen.readthedocs.io"; + license = licenses.lgpl2Plus; + platforms = platforms.all; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 48867a92f9d..199554f2c52 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -4655,7 +4655,10 @@ in { mutag = callPackage ../development/python-modules/mutag { }; - mutagen = callPackage ../development/python-modules/mutagen { }; + mutagen = if isPy27 then + callPackage ../development/python-modules/mutagen/1.43.nix { } + else + callPackage ../development/python-modules/mutagen { }; muttils = callPackage ../development/python-modules/muttils { }; From bbaeb07059c5ade10c9e90fed3108eae05cf2059 Mon Sep 17 00:00:00 2001 From: Jonathan Ringer Date: Tue, 16 Jun 2020 14:10:30 -0700 Subject: [PATCH 23/27] python2Packages.ordered-set: disable python2, abandoned --- pkgs/development/python-modules/ordered-set/default.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/ordered-set/default.nix b/pkgs/development/python-modules/ordered-set/default.nix index 0bc91ec7f15..4a9e6fefe06 100644 --- a/pkgs/development/python-modules/ordered-set/default.nix +++ b/pkgs/development/python-modules/ordered-set/default.nix @@ -1,8 +1,9 @@ -{ buildPythonPackage, fetchPypi, lib, pytest }: +{ buildPythonPackage, fetchPypi, lib, isPy27, pytest }: buildPythonPackage rec { pname = "ordered-set"; version = "4.0.1"; + disabled = isPy27; checkInputs = [ pytest ]; From e70fb9e81f5f4380c03e5f21c1d615947245b100 Mon Sep 17 00:00:00 2001 From: Jonathan Ringer Date: Tue, 16 Jun 2020 14:11:10 -0700 Subject: [PATCH 24/27] python2Packages.pipdate: disable python2, abandoned --- pkgs/development/python-modules/pipdate/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/development/python-modules/pipdate/default.nix b/pkgs/development/python-modules/pipdate/default.nix index 021b0f543ec..4e730df1c91 100644 --- a/pkgs/development/python-modules/pipdate/default.nix +++ b/pkgs/development/python-modules/pipdate/default.nix @@ -1,6 +1,7 @@ { lib , buildPythonPackage , fetchPypi +, isPy27 , appdirs , requests , pytest @@ -9,6 +10,7 @@ buildPythonPackage rec { pname = "pipdate"; version = "0.5.1"; + disabled = isPy27; # abandoned src = fetchPypi { inherit pname version; From 46c455e031cca7ac0face202a2873174f291e25f Mon Sep 17 00:00:00 2001 From: Jonathan Ringer Date: Tue, 16 Jun 2020 14:12:30 -0700 Subject: [PATCH 25/27] python2Packages.pytest-openfiles: disable python2, abandoned --- pkgs/development/python-modules/pytest-openfiles/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/development/python-modules/pytest-openfiles/default.nix b/pkgs/development/python-modules/pytest-openfiles/default.nix index 64fd8422ea8..bb7bdf03d00 100644 --- a/pkgs/development/python-modules/pytest-openfiles/default.nix +++ b/pkgs/development/python-modules/pytest-openfiles/default.nix @@ -1,6 +1,7 @@ { lib , buildPythonPackage , fetchPypi +, isPy27 , pytest , pytestCheckHook , psutil @@ -10,6 +11,7 @@ buildPythonPackage rec { pname = "pytest-openfiles"; version = "0.5.0"; + disabled = isPy27; # abandoned src = fetchPypi { inherit pname version; From 9b38751608bed8d346850cfb74b1bd6ff89dd33e Mon Sep 17 00:00:00 2001 From: Jonathan Ringer Date: Tue, 16 Jun 2020 14:14:04 -0700 Subject: [PATCH 26/27] pythonPackages.pytest-isort: fix tests --- pkgs/development/python-modules/pytest-isort/default.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/pytest-isort/default.nix b/pkgs/development/python-modules/pytest-isort/default.nix index 4c380b312e5..96f78426dba 100644 --- a/pkgs/development/python-modules/pytest-isort/default.nix +++ b/pkgs/development/python-modules/pytest-isort/default.nix @@ -1,4 +1,4 @@ -{ lib, buildPythonPackage, fetchPypi, pytest, isort }: +{ lib, buildPythonPackage, fetchPypi, isPy27, mock, pytest, isort }: buildPythonPackage rec { pname = "pytest-isort"; @@ -11,7 +11,8 @@ buildPythonPackage rec { propagatedBuildInputs = [ isort ]; - checkInputs = [ pytest ]; + checkInputs = [ pytest ] + ++ lib.optionals isPy27 [ mock ]; checkPhase = '' py.test -vs --cache-clear From 024a30e9f2c0867b671edcb9346e2d6e8dea10d5 Mon Sep 17 00:00:00 2001 From: Jonathan Ringer Date: Tue, 16 Jun 2020 14:19:33 -0700 Subject: [PATCH 27/27] python2Packages.traits: disable python2, abandoned --- pkgs/development/python-modules/traits/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/development/python-modules/traits/default.nix b/pkgs/development/python-modules/traits/default.nix index 2c343daf550..36963987b38 100644 --- a/pkgs/development/python-modules/traits/default.nix +++ b/pkgs/development/python-modules/traits/default.nix @@ -1,6 +1,7 @@ { stdenv , buildPythonPackage , fetchPypi +, isPy27 , python , pytest , numpy @@ -9,6 +10,7 @@ buildPythonPackage rec { pname = "traits"; version = "6.1.0"; + disabled = isPy27; # setup.py no longer py3 compat src = fetchPypi { inherit pname version;