Merge pull request #120874 from rmcgibbo/astropy

python3Packages.astropy: unbreak multiple modules

authored by

Fabian Affolter and committed by
GitHub
37c75aaf c5173fe2

+66 -42
+25 -8
pkgs/development/python-modules/astropy-healpix/default.nix
··· 3 , fetchPypi 4 , numpy 5 , astropy 6 - , astropy-helpers 7 }: 8 9 buildPythonPackage rec { 10 pname = "astropy-healpix"; 11 version = "0.6"; 12 13 - doCheck = false; # tests require pytest-astropy 14 - 15 src = fetchPypi { 16 - inherit pname version; 17 sha256 = "409a6621c383641456c074f0f0350a24a4a58e910eaeef14e9bbce3e00ad6690"; 18 }; 19 20 - propagatedBuildInputs = [ numpy astropy astropy-helpers ]; 21 22 - # Disable automatic update of the astropy-helper module 23 - postPatch = '' 24 - substituteInPlace setup.cfg --replace "auto_use = True" "auto_use = False" 25 ''; 26 27 meta = with lib; {
··· 3 , fetchPypi 4 , numpy 5 , astropy 6 + , astropy-extension-helpers 7 + , setuptools-scm 8 + , pytestCheckHook 9 + , pytest-doctestplus 10 + , hypothesis 11 }: 12 13 buildPythonPackage rec { 14 pname = "astropy-healpix"; 15 version = "0.6"; 16 17 src = fetchPypi { 18 + inherit version; 19 + pname = lib.replaceStrings ["-"] ["_"] pname; 20 sha256 = "409a6621c383641456c074f0f0350a24a4a58e910eaeef14e9bbce3e00ad6690"; 21 }; 22 23 + nativeBuildInputs = [ 24 + astropy-extension-helpers 25 + setuptools-scm 26 + ]; 27 + 28 + propagatedBuildInputs = [ 29 + numpy 30 + astropy 31 + ]; 32 33 + checkInputs = [ 34 + pytestCheckHook 35 + pytest-doctestplus 36 + hypothesis 37 + ]; 38 + 39 + # tests must be run in the build directory 40 + preCheck = '' 41 + cd build/lib* 42 ''; 43 44 meta = with lib; {
+12 -7
pkgs/development/python-modules/glymur/default.nix
··· 2 , buildPythonPackage 3 , fetchFromGitHub 4 , numpy 5 - , python 6 , scikitimage 7 , openjpeg 8 , procps 9 , contextlib2 10 , mock 11 , importlib-resources ··· 14 15 buildPythonPackage rec { 16 pname = "glymur"; 17 - version = "0.8.18"; 18 19 src = fetchFromGitHub { 20 owner = "quintusdias"; 21 repo = pname; 22 rev = "v${version}"; 23 - sha256 = "1zbghzw1q4fljb019lsrhka9xrnn4425qnxrjbmbv7dssgkkywd7"; 24 }; 25 26 propagatedBuildInputs = [ ··· 30 checkInputs = [ 31 scikitimage 32 procps 33 ]; 34 35 postConfigure = '' 36 substituteInPlace glymur/config.py \ 37 - --replace "path = read_config_file(libname)" "path = '${openjpeg}/lib' + libname + ${if stdenv.isDarwin then "'.dylib'" else "'.so'"}" 38 ''; 39 40 - checkPhase = '' 41 - ${python.interpreter} -m unittest discover 42 - ''; 43 44 meta = with lib; { 45 description = "Tools for accessing JPEG2000 files";
··· 2 , buildPythonPackage 3 , fetchFromGitHub 4 , numpy 5 , scikitimage 6 , openjpeg 7 , procps 8 + , pytestCheckHook 9 , contextlib2 10 , mock 11 , importlib-resources ··· 14 15 buildPythonPackage rec { 16 pname = "glymur"; 17 + version = "0.9.3"; 18 19 src = fetchFromGitHub { 20 owner = "quintusdias"; 21 repo = pname; 22 rev = "v${version}"; 23 + sha256 = "1xlpax56qg5qqh0s19xidgvv2483sc684zj7rh6zw1m1z9m37drr"; 24 }; 25 26 propagatedBuildInputs = [ ··· 30 checkInputs = [ 31 scikitimage 32 procps 33 + pytestCheckHook 34 ]; 35 36 postConfigure = '' 37 substituteInPlace glymur/config.py \ 38 + --replace "path = read_config_file(libname)" "path = '${openjpeg}/lib/lib' + libname + ${if stdenv.isDarwin then "'.dylib'" else "'.so'"}" 39 ''; 40 41 + disabledTestPaths = [ 42 + # this test involves glymur's different ways of finding the openjpeg path on 43 + # fsh systems by reading an .rc file and such, and is obviated by the patch 44 + # in postConfigure 45 + "tests/test_config.py" 46 + ]; 47 + 48 49 meta = with lib; { 50 description = "Tools for accessing JPEG2000 files";
+9 -7
pkgs/development/python-modules/pytest-doctestplus/default.nix
··· 4 , isPy27 5 , six 6 , pytest 7 , numpy 8 }: 9 10 buildPythonPackage rec { ··· 17 sha256 = "6fe747418461d7b202824a3486ba8f4fa17a9bd0b1eddc743ba1d6d87f03391a"; 18 }; 19 20 - buildInputs = [ pytest ]; 21 22 propagatedBuildInputs = [ 23 six ··· 25 ]; 26 27 checkInputs = [ 28 - pytest 29 ]; 30 - 31 - # check_distribution incorrectly pulls pytest version 32 - checkPhase = '' 33 - pytest -k 'not check_distribution' 34 - ''; 35 36 meta = with lib; { 37 description = "Pytest plugin with advanced doctest features";
··· 4 , isPy27 5 , six 6 , pytest 7 + , pytestCheckHook 8 , numpy 9 + , setuptools_scm 10 }: 11 12 buildPythonPackage rec { ··· 19 sha256 = "6fe747418461d7b202824a3486ba8f4fa17a9bd0b1eddc743ba1d6d87f03391a"; 20 }; 21 22 + nativeBuildInputs = [ 23 + setuptools_scm 24 + ]; 25 + buildInputs = [ 26 + pytest 27 + ]; 28 29 propagatedBuildInputs = [ 30 six ··· 32 ]; 33 34 checkInputs = [ 35 + pytestCheckHook 36 ]; 37 38 meta = with lib; { 39 description = "Pytest plugin with advanced doctest features";
+6 -14
pkgs/development/python-modules/radio_beam/default.nix
··· 2 , fetchPypi 3 , buildPythonPackage 4 , astropy 5 - , pytest 6 - , pytest-astropy 7 - , astropy-helpers 8 , scipy 9 }: 10 ··· 13 version = "0.3.3"; 14 15 src = fetchPypi { 16 - inherit pname version; 17 sha256 = "e34902d91713ccab9f450b9d3e82317e292cf46a30bd42f9ad3c9a0519fcddcd"; 18 }; 19 20 propagatedBuildInputs = [ astropy ]; 21 22 - nativeBuildInputs = [ astropy-helpers ]; 23 - 24 - # Disable automatic update of the astropy-helper module 25 - postPatch = '' 26 - substituteInPlace setup.cfg --replace "auto_use = True" "auto_use = False" 27 - ''; 28 - 29 - checkInputs = [ pytest pytest-astropy scipy ]; 30 31 # Tests must be run in the build directory 32 - checkPhase = '' 33 cd build/lib 34 - pytest 35 ''; 36 37 meta = {
··· 2 , fetchPypi 3 , buildPythonPackage 4 , astropy 5 + , pytestCheckHook 6 + , pytest-doctestplus 7 , scipy 8 }: 9 ··· 12 version = "0.3.3"; 13 14 src = fetchPypi { 15 + inherit version; 16 + pname = "radio-beam"; 17 sha256 = "e34902d91713ccab9f450b9d3e82317e292cf46a30bd42f9ad3c9a0519fcddcd"; 18 }; 19 20 propagatedBuildInputs = [ astropy ]; 21 22 + checkInputs = [ pytestCheckHook pytest-doctestplus scipy ]; 23 24 # Tests must be run in the build directory 25 + preCheck = '' 26 cd build/lib 27 ''; 28 29 meta = {
+12 -6
pkgs/development/python-modules/spectral-cube/default.nix
··· 1 { lib 2 , fetchPypi 3 , buildPythonPackage 4 , aplpy 5 , joblib 6 , astropy 7 , radio_beam 8 - , pytest 9 , pytest-astropy 10 , astropy-helpers 11 }: ··· 20 sha256 = "17zisr26syfb8kn89xj17lrdycm0hsmy5yp5zrn236wgd8rjriki"; 21 }; 22 23 nativeBuildInputs = [ astropy-helpers ]; 24 propagatedBuildInputs = [ astropy radio_beam joblib ]; 25 - checkInputs = [ aplpy pytest pytest-astropy ]; 26 - 27 - checkPhase = '' 28 - pytest spectral_cube 29 - ''; 30 31 meta = { 32 description = "Library for reading and analyzing astrophysical spectral data cubes";
··· 1 { lib 2 , fetchPypi 3 + , fetchpatch 4 , buildPythonPackage 5 , aplpy 6 , joblib 7 , astropy 8 , radio_beam 9 + , pytestCheckHook 10 , pytest-astropy 11 , astropy-helpers 12 }: ··· 21 sha256 = "17zisr26syfb8kn89xj17lrdycm0hsmy5yp5zrn236wgd8rjriki"; 22 }; 23 24 + patches = [ 25 + # Fix compatibility with radio_beam >= 0.3.3. Will be included 26 + # in the next release of spectral cube > 0.5.0 27 + (fetchpatch { 28 + url = "https://github.com/radio-astro-tools/spectral-cube/commit/bbe4295ebef7dfa6fe4474275a29acd6cb0cb544.patch"; 29 + sha256 = "1qddfm3364kc34yf6wd9nd6rxh4qc2v5pqilvz9adwb4a50z28bf"; 30 + }) 31 + ]; 32 + 33 nativeBuildInputs = [ astropy-helpers ]; 34 propagatedBuildInputs = [ astropy radio_beam joblib ]; 35 + checkInputs = [ pytestCheckHook aplpy pytest-astropy ]; 36 37 meta = { 38 description = "Library for reading and analyzing astrophysical spectral data cubes";
+2
pkgs/development/python-modules/sunpy/default.nix
··· 11 , beautifulsoup4 12 , drms 13 , glymur 14 , hypothesis 15 , matplotlib 16 , numpy ··· 50 pandas 51 astropy 52 astropy-helpers 53 parfive 54 sqlalchemy 55 scikitimage
··· 11 , beautifulsoup4 12 , drms 13 , glymur 14 + , h5netcdf 15 , hypothesis 16 , matplotlib 17 , numpy ··· 51 pandas 52 astropy 53 astropy-helpers 54 + h5netcdf 55 parfive 56 sqlalchemy 57 scikitimage