From af03e7f59f11de6c533b6101bc51e1da7017dd70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Maret?= Date: Thu, 29 Sep 2022 23:02:52 +0200 Subject: [PATCH 1/3] python3Packages.pyregion: 2.0 -> 2.1.1 - Update to the latest upstream - Fix tests --- pkgs/development/python-modules/pyregion/default.nix | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/pkgs/development/python-modules/pyregion/default.nix b/pkgs/development/python-modules/pyregion/default.nix index 6d33e18e4f91..1a6cf6ace29e 100644 --- a/pkgs/development/python-modules/pyregion/default.nix +++ b/pkgs/development/python-modules/pyregion/default.nix @@ -13,15 +13,15 @@ buildPythonPackage rec { pname = "pyregion"; - version = "2.0"; + version = "2.1.1"; # pypi src contains cython-produced .c files which don't compile # with python3.9 src = fetchFromGitHub { owner = "astropy"; repo = pname; - rev = version; - sha256 = "1izar7z606czcyws9s8bjbpb1xhqshpv5009rlpc92hciw7jv4kg"; + rev = "v${version}"; + sha256 = "sha256-xo+XbBJ2HKql9rd7Ma84JofRg8M4u6vmz44Qo8JhEBc="; }; propagatedBuildInputs = [ @@ -33,9 +33,8 @@ buildPythonPackage rec { # Upstream patch needed for the test to pass patches = [ (fetchpatch { - name = "conftest-astropy-3-fix.patch"; - url = "https://github.com/astropy/pyregion/pull/136.patch"; - sha256 = "13yxjxiqnhjy9gh24hvv6pnwx7qic2mcx3ccr1igjrc3f881d59m"; + url = "https://github.com/astropy/pyregion/pull/157.patch"; + sha256 = "sha256-FMPpwwbtCR8FDZWbD3Cmat7vu6AhyUezu2TOpUfujJE="; }) ]; From d61f68964facc8fb12ae6b321740aa2e3879f6f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Maret?= Date: Sat, 1 Oct 2022 15:37:21 +0200 Subject: [PATCH 2/3] python3Packages.reproject: fix tests --- pkgs/development/python-modules/reproject/default.nix | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/pkgs/development/python-modules/reproject/default.nix b/pkgs/development/python-modules/reproject/default.nix index 1f75683a5b1d..a8643ca65073 100644 --- a/pkgs/development/python-modules/reproject/default.nix +++ b/pkgs/development/python-modules/reproject/default.nix @@ -2,7 +2,6 @@ , astropy , astropy-extension-helpers , astropy-healpix -, astropy-helpers , buildPythonPackage , cython , fetchPypi @@ -28,7 +27,6 @@ buildPythonPackage rec { nativeBuildInputs = [ astropy-extension-helpers - astropy-helpers cython setuptools-scm ]; @@ -36,7 +34,6 @@ buildPythonPackage rec { propagatedBuildInputs = [ astropy astropy-healpix - astropy-helpers numpy scipy ]; @@ -46,9 +43,11 @@ buildPythonPackage rec { pytestCheckHook ]; - preCheck = '' - cd build/lib* - ''; + pytestFlagsArray = [ + "build/lib*" + # Avoid failure due to user warning: Distutils was imported before Setuptools + "-p no:warnings" + ]; pythonImportsCheck = [ "reproject" From acc3247db8a2c00eb19195d99185386ad4e10138 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Maret?= Date: Sat, 8 Oct 2022 13:38:02 +0200 Subject: [PATCH 3/3] python3Packages.pyregion: fetch each patch commit individually --- pkgs/development/python-modules/pyregion/default.nix | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/pkgs/development/python-modules/pyregion/default.nix b/pkgs/development/python-modules/pyregion/default.nix index 1a6cf6ace29e..11595e018112 100644 --- a/pkgs/development/python-modules/pyregion/default.nix +++ b/pkgs/development/python-modules/pyregion/default.nix @@ -30,11 +30,16 @@ buildPythonPackage rec { astropy ]; - # Upstream patch needed for the test to pass + # Upstream patches needed for the tests to pass + # See https://github.com/astropy/pyregion/pull/157/ patches = [ (fetchpatch { - url = "https://github.com/astropy/pyregion/pull/157.patch"; - sha256 = "sha256-FMPpwwbtCR8FDZWbD3Cmat7vu6AhyUezu2TOpUfujJE="; + url = "https://github.com/astropy/pyregion/pull/157/commits/082649730d353a0d0c0ee9619be1aa501aabba62.patch"; + sha256 = "sha256-4mHZt3S29ZfK+QKavm6DLBwVxGl/ga7W7GEcQ5ewxuo="; + }) + (fetchpatch { + url = "https://github.com/astropy/pyregion/pull/157/commits/c448a465dd56887979da62aec6138fc89bb37b19.patch"; + sha256 = "sha256-GEtvScmVbAdE4E5Xx0hNOPommvzcnJ3jNZpBmY3PbyE="; }) ];