Merge pull request #107770 from rmcgibbo/astropy
python3Packages.astropy: unbreak
This commit is contained in:
commit
c461a5d969
@ -1,6 +1,7 @@
|
|||||||
{ lib
|
{ lib
|
||||||
, buildPythonPackage
|
, buildPythonPackage
|
||||||
, fetchPypi
|
, fetchPypi
|
||||||
|
, fetchpatch
|
||||||
, numpy
|
, numpy
|
||||||
, astropy
|
, astropy
|
||||||
, astropy-helpers
|
, astropy-helpers
|
||||||
@ -18,6 +19,7 @@
|
|||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "aplpy";
|
pname = "aplpy";
|
||||||
version = "2.0.3";
|
version = "2.0.3";
|
||||||
|
format = "pyproject";
|
||||||
|
|
||||||
src = fetchPypi {
|
src = fetchPypi {
|
||||||
pname = "APLpy";
|
pname = "APLpy";
|
||||||
@ -25,6 +27,15 @@ buildPythonPackage rec {
|
|||||||
sha256 = "239f3d83635ca4251536aeb577df7c60df77fc4d658097b92094719739aec3f3";
|
sha256 = "239f3d83635ca4251536aeb577df7c60df77fc4d658097b92094719739aec3f3";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
patches = [ (fetchpatch {
|
||||||
|
# Can be removed in next release after 2.0.3
|
||||||
|
url = "https://github.com/aplpy/aplpy/pull/448.patch";
|
||||||
|
sha256 = "1pnzh7ykjc8hwahzbzyryrzv5a8fddgd1bmzbhagkrn6lmvhhpvq";
|
||||||
|
excludes = [ "tox.ini" "azure-pipelines.yml" ".circleci/config.yml" "MANIFEST.in" ".gitignore"
|
||||||
|
"setup.cfg" "appveyor.yml" "readthedocs.yml" "CHANGES.rst" ".gitmodules" ".travis.yml" "astropy_helpers" ];
|
||||||
|
})
|
||||||
|
];
|
||||||
|
|
||||||
propagatedBuildInputs = [
|
propagatedBuildInputs = [
|
||||||
numpy
|
numpy
|
||||||
astropy
|
astropy
|
||||||
@ -38,18 +49,10 @@ buildPythonPackage rec {
|
|||||||
];
|
];
|
||||||
|
|
||||||
nativeBuildInputs = [ astropy-helpers ];
|
nativeBuildInputs = [ astropy-helpers ];
|
||||||
|
|
||||||
checkInputs = [ pytest pytest-astropy ];
|
checkInputs = [ pytest pytest-astropy ];
|
||||||
|
|
||||||
# Disable automatic update of the astropy-helper module
|
|
||||||
postPatch = ''
|
|
||||||
substituteInPlace setup.cfg --replace "auto_use = True" "auto_use = False"
|
|
||||||
'';
|
|
||||||
|
|
||||||
# Tests must be run in the build directory
|
|
||||||
checkPhase = ''
|
checkPhase = ''
|
||||||
cd build/lib
|
OPENMP_EXPECTED=0 pytest aplpy
|
||||||
pytest
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
|
@ -17,18 +17,13 @@ buildPythonPackage rec {
|
|||||||
pname = "asdf";
|
pname = "asdf";
|
||||||
version = "2.7.1";
|
version = "2.7.1";
|
||||||
disabled = isPy27;
|
disabled = isPy27;
|
||||||
|
format = "pyproject";
|
||||||
|
|
||||||
src = fetchPypi {
|
src = fetchPypi {
|
||||||
inherit pname version;
|
inherit pname version;
|
||||||
sha256 = "4ba2e31cb24b974a10dfae3edee23db2e6bea2d00608604d062366aa3af6e81a";
|
sha256 = "4ba2e31cb24b974a10dfae3edee23db2e6bea2d00608604d062366aa3af6e81a";
|
||||||
};
|
};
|
||||||
|
|
||||||
postPatch = ''
|
|
||||||
substituteInPlace setup.cfg \
|
|
||||||
--replace "semantic_version>=2.3.1,<=2.6.0" "semantic_version>=2.3.1" \
|
|
||||||
--replace "doctest_plus = enabled" ""
|
|
||||||
'';
|
|
||||||
|
|
||||||
checkInputs = [
|
checkInputs = [
|
||||||
pytest-astropy
|
pytest-astropy
|
||||||
astropy
|
astropy
|
||||||
@ -45,7 +40,7 @@ buildPythonPackage rec {
|
|||||||
];
|
];
|
||||||
|
|
||||||
checkPhase = ''
|
checkPhase = ''
|
||||||
pytest
|
PY_IGNORE_IMPORTMISMATCH=1 pytest
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
|
@ -0,0 +1,31 @@
|
|||||||
|
{ lib
|
||||||
|
, buildPythonPackage
|
||||||
|
, fetchPypi
|
||||||
|
, pytestCheckHook
|
||||||
|
}:
|
||||||
|
|
||||||
|
buildPythonPackage rec {
|
||||||
|
pname = "extension-helpers";
|
||||||
|
version = "0.1";
|
||||||
|
format = "pyproject";
|
||||||
|
|
||||||
|
src = fetchPypi {
|
||||||
|
inherit pname version;
|
||||||
|
sha256 = "10iqjzmya2h4sk765dlm1pbqypwlqyh8rw59a5m9i63d3klnz2mc";
|
||||||
|
};
|
||||||
|
|
||||||
|
patches = [ ./permissions.patch ];
|
||||||
|
|
||||||
|
checkInputs = [ pytestCheckHook ];
|
||||||
|
|
||||||
|
pythonImportsCheck = [
|
||||||
|
"extension_helpers"
|
||||||
|
];
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
description = "Utilities for building and installing packages in the Astropy ecosystem";
|
||||||
|
homepage = "https://github.com/astropy/extension-helpers";
|
||||||
|
license = licenses.bsd3;
|
||||||
|
maintainers = [ maintainers.rmcgibbo ];
|
||||||
|
};
|
||||||
|
}
|
@ -0,0 +1,20 @@
|
|||||||
|
diff --git a/extension_helpers/_setup_helpers.py b/extension_helpers/_setup_helpers.py
|
||||||
|
index ec3e547..e2419f7 100644
|
||||||
|
--- a/extension_helpers/_setup_helpers.py
|
||||||
|
+++ b/extension_helpers/_setup_helpers.py
|
||||||
|
@@ -79,8 +79,13 @@ def get_extensions(srcdir='.'):
|
||||||
|
if len(ext_modules) > 0:
|
||||||
|
main_package_dir = min(packages, key=len)
|
||||||
|
src_path = os.path.join(os.path.dirname(__file__), 'src')
|
||||||
|
- shutil.copy(os.path.join(src_path, 'compiler.c'),
|
||||||
|
- os.path.join(srcdir, main_package_dir, '_compiler.c'))
|
||||||
|
+ a = os.path.join(src_path, 'compiler.c')
|
||||||
|
+ b = os.path.join(srcdir, main_package_dir, '_compiler.c')
|
||||||
|
+ try:
|
||||||
|
+ os.unlink(b)
|
||||||
|
+ except OSError:
|
||||||
|
+ pass
|
||||||
|
+ shutil.copy(a, b)
|
||||||
|
ext = Extension(main_package_dir + '.compiler_version',
|
||||||
|
[os.path.join(main_package_dir, '_compiler.c')])
|
||||||
|
ext_modules.append(ext)
|
@ -1,5 +1,6 @@
|
|||||||
{ lib
|
{ lib
|
||||||
, fetchPypi
|
, fetchPypi
|
||||||
|
, setuptools_scm
|
||||||
, buildPythonPackage
|
, buildPythonPackage
|
||||||
, isPy3k
|
, isPy3k
|
||||||
, cython
|
, cython
|
||||||
@ -8,11 +9,14 @@
|
|||||||
, pytest
|
, pytest
|
||||||
, pytest-astropy
|
, pytest-astropy
|
||||||
, astropy-helpers
|
, astropy-helpers
|
||||||
|
, astropy-extension-helpers
|
||||||
|
, pyerfa
|
||||||
}:
|
}:
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "astropy";
|
pname = "astropy";
|
||||||
version = "4.2";
|
version = "4.2";
|
||||||
|
format = "pyproject";
|
||||||
|
|
||||||
disabled = !isPy3k; # according to setup.py
|
disabled = !isPy3k; # according to setup.py
|
||||||
|
|
||||||
@ -21,15 +25,12 @@ buildPythonPackage rec {
|
|||||||
sha256 = "2c194f8a429b8399de64a413a06881ea49f0525cabaa2d78fc132b9e970adc6a";
|
sha256 = "2c194f8a429b8399de64a413a06881ea49f0525cabaa2d78fc132b9e970adc6a";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ astropy-helpers cython jinja2 ];
|
nativeBuildInputs = [ setuptools_scm astropy-helpers astropy-extension-helpers cython jinja2 ];
|
||||||
|
propagatedBuildInputs = [ numpy pyerfa ];
|
||||||
propagatedBuildInputs = [ numpy pytest ]; # yes it really has pytest in install_requires
|
|
||||||
|
|
||||||
checkInputs = [ pytest pytest-astropy ];
|
checkInputs = [ pytest pytest-astropy ];
|
||||||
|
|
||||||
# Disable automatic update of the astropy-helper module
|
preBuild = ''
|
||||||
postPatch = ''
|
export SETUPTOOLS_SCM_PRETEND_VERSION="${version}"
|
||||||
substituteInPlace setup.cfg --replace "auto_use = True" "auto_use = False"
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# Tests must be run from the build directory. astropy/samp tests
|
# Tests must be run from the build directory. astropy/samp tests
|
||||||
@ -42,15 +43,14 @@ buildPythonPackage rec {
|
|||||||
'';
|
'';
|
||||||
|
|
||||||
# 368 failed, 10889 passed, 978 skipped, 69 xfailed in 196.24s
|
# 368 failed, 10889 passed, 978 skipped, 69 xfailed in 196.24s
|
||||||
|
# doCheck = false;
|
||||||
doCheck = false;
|
doCheck = false;
|
||||||
|
|
||||||
meta = {
|
meta = with lib; {
|
||||||
description = "Astronomy/Astrophysics library for Python";
|
description = "Astronomy/Astrophysics library for Python";
|
||||||
homepage = "https://www.astropy.org";
|
homepage = "https://www.astropy.org";
|
||||||
license = lib.licenses.bsd3;
|
license = licenses.bsd3;
|
||||||
platforms = lib.platforms.all;
|
platforms = platforms.all;
|
||||||
maintainers = with lib.maintainers; [ kentjames ];
|
maintainers = [ maintainers.kentjames ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -15,6 +15,7 @@
|
|||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "astroquery";
|
pname = "astroquery";
|
||||||
version = "0.4.1";
|
version = "0.4.1";
|
||||||
|
format = "pyproject";
|
||||||
|
|
||||||
src = fetchPypi {
|
src = fetchPypi {
|
||||||
inherit pname version;
|
inherit pname version;
|
||||||
@ -31,11 +32,6 @@ buildPythonPackage rec {
|
|||||||
doCheck = false;
|
doCheck = false;
|
||||||
checkInputs = [ pytest pytest-astropy ];
|
checkInputs = [ pytest pytest-astropy ];
|
||||||
|
|
||||||
# Disable automatic update of the astropy-helper module
|
|
||||||
postPatch = ''
|
|
||||||
substituteInPlace setup.cfg --replace "auto_use = True" "auto_use = False"
|
|
||||||
'';
|
|
||||||
|
|
||||||
# Tests must be run in the build directory. The tests create files
|
# Tests must be run in the build directory. The tests create files
|
||||||
# in $HOME/.astropy so we need to set HOME to $TMPDIR.
|
# in $HOME/.astropy so we need to set HOME to $TMPDIR.
|
||||||
checkPhase = ''
|
checkPhase = ''
|
||||||
|
@ -4,13 +4,15 @@
|
|||||||
, numpy
|
, numpy
|
||||||
, pandas
|
, pandas
|
||||||
, six
|
, six
|
||||||
, pytest
|
, astropy
|
||||||
, python
|
, pytestCheckHook
|
||||||
|
, pytest-doctestplus
|
||||||
}:
|
}:
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "drms";
|
pname = "drms";
|
||||||
version = "0.6.0";
|
version = "0.6.0";
|
||||||
|
format = "pyproject";
|
||||||
|
|
||||||
src = fetchPypi {
|
src = fetchPypi {
|
||||||
inherit pname version;
|
inherit pname version;
|
||||||
@ -24,13 +26,11 @@ buildPythonPackage rec {
|
|||||||
];
|
];
|
||||||
|
|
||||||
checkInputs = [
|
checkInputs = [
|
||||||
pytest
|
astropy
|
||||||
|
pytestCheckHook
|
||||||
|
pytest-doctestplus
|
||||||
];
|
];
|
||||||
|
|
||||||
checkPhase = ''
|
|
||||||
${python.interpreter} -m drms.tests
|
|
||||||
'';
|
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "Access HMI, AIA and MDI data with Python";
|
description = "Access HMI, AIA and MDI data with Python";
|
||||||
homepage = "https://github.com/sunpy/drms";
|
homepage = "https://github.com/sunpy/drms";
|
||||||
|
@ -1,41 +0,0 @@
|
|||||||
{ lib
|
|
||||||
, buildPythonPackage
|
|
||||||
, fetchPypi
|
|
||||||
, isPy27
|
|
||||||
, pytestCheckHook
|
|
||||||
, setuptools_scm
|
|
||||||
}:
|
|
||||||
|
|
||||||
buildPythonPackage rec {
|
|
||||||
pname = "extension-helpers";
|
|
||||||
version = "0.1";
|
|
||||||
disabled = isPy27;
|
|
||||||
|
|
||||||
src = fetchPypi {
|
|
||||||
inherit pname version;
|
|
||||||
sha256 = "10iqjzmya2h4sk765dlm1pbqypwlqyh8rw59a5m9i63d3klnz2mc";
|
|
||||||
};
|
|
||||||
|
|
||||||
nativeBuildInputs = [
|
|
||||||
setuptools_scm
|
|
||||||
];
|
|
||||||
|
|
||||||
propagatedBuildInputs = [
|
|
||||||
pytestCheckHook
|
|
||||||
];
|
|
||||||
|
|
||||||
# avoid importing local module
|
|
||||||
preCheck = ''
|
|
||||||
cd extension_helpers
|
|
||||||
'';
|
|
||||||
|
|
||||||
# assumes setup.py is in pwd
|
|
||||||
disabledTests = [ "compiler_module" ];
|
|
||||||
|
|
||||||
meta = with lib; {
|
|
||||||
description = "Helpers to assist with building packages with compiled C/Cython extensions";
|
|
||||||
homepage = "https://github.com/astropy/extension-helpers";
|
|
||||||
license = licenses.bsd3;
|
|
||||||
maintainers = [ ];
|
|
||||||
};
|
|
||||||
}
|
|
42
pkgs/development/python-modules/pyerfa/default.nix
Normal file
42
pkgs/development/python-modules/pyerfa/default.nix
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
{ lib
|
||||||
|
, buildPythonPackage
|
||||||
|
, fetchPypi
|
||||||
|
, isPy3k
|
||||||
|
, liberfa
|
||||||
|
, packaging
|
||||||
|
, numpy
|
||||||
|
}:
|
||||||
|
|
||||||
|
buildPythonPackage rec {
|
||||||
|
pname = "pyerfa";
|
||||||
|
format = "pyproject";
|
||||||
|
version = "1.7.1.1";
|
||||||
|
|
||||||
|
doCheck = false;
|
||||||
|
|
||||||
|
src = fetchPypi {
|
||||||
|
inherit pname version;
|
||||||
|
sha256 = "09i2qcsvxd3q04a5yaf6fwzg79paaslpksinan9d8smj7viql15i";
|
||||||
|
};
|
||||||
|
|
||||||
|
nativeBuildInputs = [ packaging ];
|
||||||
|
propagatedBuildInputs = [ liberfa numpy ];
|
||||||
|
preBuild = ''
|
||||||
|
export PYERFA_USE_SYSTEM_LIBERFA=1
|
||||||
|
'';
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
description = "Python bindings for ERFA routines";
|
||||||
|
longDescription = ''
|
||||||
|
PyERFA is the Python wrapper for the ERFA library (Essential Routines
|
||||||
|
for Fundamental Astronomy), a C library containing key algorithms for
|
||||||
|
astronomy, which is based on the SOFA library published by the
|
||||||
|
International Astronomical Union (IAU). All C routines are wrapped as
|
||||||
|
Numpy universal functions, so that they can be called with scalar or
|
||||||
|
array inputs.
|
||||||
|
'';
|
||||||
|
homepage = "https://github.com/liberfa/pyerfa";
|
||||||
|
license = licenses.bsd3;
|
||||||
|
maintainers = [ maintainers.rmcgibbo ];
|
||||||
|
};
|
||||||
|
}
|
@ -1,21 +1,36 @@
|
|||||||
{ lib
|
{ lib
|
||||||
, buildPythonPackage
|
, buildPythonPackage
|
||||||
, fetchPypi
|
, fetchPypi
|
||||||
|
, fetchpatch
|
||||||
, pytest
|
, pytest
|
||||||
, pytestcov
|
, pytestcov
|
||||||
, pytestCheckHook
|
, pytestCheckHook
|
||||||
, numpy
|
, numpy
|
||||||
, astropy
|
, astropy
|
||||||
|
, scipy
|
||||||
|
, h5py
|
||||||
|
, scikitimage
|
||||||
}:
|
}:
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "pytest-astropy-header";
|
pname = "pytest-astropy-header";
|
||||||
version = "0.1.2";
|
version = "0.1.2";
|
||||||
|
format = "pyproject";
|
||||||
|
|
||||||
src = fetchPypi {
|
src = fetchPypi {
|
||||||
inherit pname version;
|
inherit pname version;
|
||||||
sha256 = "1y87agr324p6x5gvhziymxjlw54pyn4gqnd49papbl941djpkp5g";
|
sha256 = "1y87agr324p6x5gvhziymxjlw54pyn4gqnd49papbl941djpkp5g";
|
||||||
};
|
};
|
||||||
|
patches = [ (fetchpatch {
|
||||||
|
url = "https://github.com/astropy/pytest-astropy-header/pull/16.patch";
|
||||||
|
sha256 = "11ln63zq0kgsdx1jw3prlzpcdbxmc99p9cwr18s0x6apy0k6df31";
|
||||||
|
})
|
||||||
|
(fetchpatch {
|
||||||
|
url = "https://github.com/astropy/pytest-astropy-header/pull/29.patch";
|
||||||
|
sha256 = "18l434c926r5z1iq3b6lpnp0lrssszars9y1y9hs6216r60jgjpl";
|
||||||
|
})
|
||||||
|
];
|
||||||
|
|
||||||
|
|
||||||
propagatedBuildInputs = [
|
propagatedBuildInputs = [
|
||||||
pytest
|
pytest
|
||||||
@ -25,6 +40,9 @@ buildPythonPackage rec {
|
|||||||
pytestCheckHook
|
pytestCheckHook
|
||||||
pytestcov
|
pytestcov
|
||||||
numpy
|
numpy
|
||||||
|
scipy
|
||||||
|
h5py
|
||||||
|
scikitimage
|
||||||
astropy
|
astropy
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
, astropy
|
, astropy
|
||||||
, astropy-healpix
|
, astropy-healpix
|
||||||
, astropy-helpers
|
, astropy-helpers
|
||||||
, extension-helpers
|
, astropy-extension-helpers
|
||||||
, scipy
|
, scipy
|
||||||
, pytest
|
, pytest
|
||||||
, pytest-astropy
|
, pytest-astropy
|
||||||
@ -23,15 +23,16 @@ buildPythonPackage rec {
|
|||||||
sha256 = "1jsc3ad518vyys5987fr1achq8qvnz8rm80zp5an9qxlwr4zmh4m";
|
sha256 = "1jsc3ad518vyys5987fr1achq8qvnz8rm80zp5an9qxlwr4zmh4m";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
patches = [ (fetchpatch {
|
||||||
|
# Can be removed in next release after 0.7.1
|
||||||
|
# See https://github.com/astropy/reproject/issues/246
|
||||||
|
url = "https://github.com/astropy/reproject/pull/243.patch";
|
||||||
|
sha256 = "0dq3ii39hsrks0b9v306dlqf07dx0hqad8rwajmzw6rfda9m3c2a";
|
||||||
|
})
|
||||||
|
];
|
||||||
|
|
||||||
propagatedBuildInputs = [ numpy astropy astropy-healpix astropy-helpers scipy ];
|
propagatedBuildInputs = [ numpy astropy astropy-healpix astropy-helpers scipy ];
|
||||||
|
nativeBuildInputs = [ astropy-helpers cython astropy-extension-helpers setuptools_scm ];
|
||||||
nativeBuildInputs = [ astropy-helpers cython extension-helpers setuptools_scm ];
|
|
||||||
|
|
||||||
# Disable automatic update of the astropy-helper module
|
|
||||||
postPatch = ''
|
|
||||||
substituteInPlace setup.cfg --replace "auto_use = True" "auto_use = False"
|
|
||||||
'';
|
|
||||||
|
|
||||||
checkInputs = [ pytest pytest-astropy ];
|
checkInputs = [ pytest pytest-astropy ];
|
||||||
|
|
||||||
# Tests must be run in the build directory
|
# Tests must be run in the build directory
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
{ lib
|
{ lib
|
||||||
, fetchFromGitHub
|
, fetchPypi
|
||||||
, buildPythonPackage
|
, buildPythonPackage
|
||||||
, aplpy
|
, aplpy
|
||||||
|
, joblib
|
||||||
, astropy
|
, astropy
|
||||||
, radio_beam
|
, radio_beam
|
||||||
, pytest
|
, pytest
|
||||||
@ -11,31 +12,20 @@
|
|||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "spectral-cube";
|
pname = "spectral-cube";
|
||||||
version = "0.4.5";
|
version = "0.5.0";
|
||||||
|
format = "pyproject";
|
||||||
|
|
||||||
# Fetch from GitHub instead of PyPi, as 0.4.5 isn't available in PyPi
|
src = fetchPypi {
|
||||||
src = fetchFromGitHub {
|
inherit pname version;
|
||||||
owner = "radio-astro-tools";
|
sha256 = "17zisr26syfb8kn89xj17lrdycm0hsmy5yp5zrn236wgd8rjriki";
|
||||||
repo = pname;
|
|
||||||
rev = "v${version}";
|
|
||||||
sha256 = "1xc1m6vpl0bm600fx9vypa7zcvwg7yvhgn0w89y6v9d1vl0qcs7z";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
propagatedBuildInputs = [ astropy radio_beam ];
|
|
||||||
|
|
||||||
nativeBuildInputs = [ astropy-helpers ];
|
nativeBuildInputs = [ astropy-helpers ];
|
||||||
|
propagatedBuildInputs = [ astropy radio_beam joblib ];
|
||||||
checkInputs = [ aplpy pytest pytest-astropy ];
|
checkInputs = [ aplpy pytest pytest-astropy ];
|
||||||
|
|
||||||
# Disable automatic update of the astropy-helper module
|
|
||||||
postPatch = ''
|
|
||||||
substituteInPlace setup.cfg --replace "auto_use = True" "auto_use = False"
|
|
||||||
'';
|
|
||||||
|
|
||||||
# Tests must be run in the build directory
|
|
||||||
checkPhase = ''
|
checkPhase = ''
|
||||||
cd build/lib
|
pytest spectral_cube
|
||||||
pytest
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
{ stdenv
|
{ stdenv
|
||||||
, lib
|
, lib
|
||||||
, buildPythonPackage
|
, buildPythonPackage
|
||||||
, fetchFromGitHub
|
, fetchPypi
|
||||||
, pythonOlder
|
, pythonOlder
|
||||||
|
|
||||||
, asdf
|
, asdf
|
||||||
, astropy
|
, astropy
|
||||||
, astropy-helpers
|
, astropy-helpers
|
||||||
|
, astropy-extension-helpers
|
||||||
, beautifulsoup4
|
, beautifulsoup4
|
||||||
, drms
|
, drms
|
||||||
, glymur
|
, glymur
|
||||||
@ -29,16 +29,18 @@
|
|||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "sunpy";
|
pname = "sunpy";
|
||||||
version = "1.0.6";
|
version = "2.0.6";
|
||||||
disabled = pythonOlder "3.6";
|
disabled = pythonOlder "3.6";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchPypi {
|
||||||
owner = "sunpy";
|
inherit pname version;
|
||||||
repo = pname;
|
sha256 = "109flghca42yhsm2w5xicqhyx1mc8c3vlwvadbn65fz3lhysqj67";
|
||||||
rev = "v${version}";
|
|
||||||
sha256 = "0j2yfhfxgi95rig8cfp9lvszb7694gq90jvs0xrb472hwnzgh2sk";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
nativeBuildInputs = [
|
||||||
|
astropy-extension-helpers
|
||||||
|
];
|
||||||
|
|
||||||
propagatedBuildInputs = [
|
propagatedBuildInputs = [
|
||||||
numpy
|
numpy
|
||||||
scipy
|
scipy
|
||||||
@ -66,16 +68,11 @@ buildPythonPackage rec {
|
|||||||
pytest-mock
|
pytest-mock
|
||||||
];
|
];
|
||||||
|
|
||||||
preBuild = ''
|
|
||||||
export SETUPTOOLS_SCM_PRETEND_VERSION="${version}"
|
|
||||||
export HOME=$(mktemp -d)
|
|
||||||
'';
|
|
||||||
|
|
||||||
# darwin has write permission issues
|
# darwin has write permission issues
|
||||||
doCheck = stdenv.isLinux;
|
doCheck = stdenv.isLinux;
|
||||||
# ignore documentation tests
|
# ignore documentation tests
|
||||||
checkPhase = ''
|
checkPhase = ''
|
||||||
pytest sunpy -k 'not rst'
|
PY_IGNORE_IMPORTMISMATCH=1 HOME=$(mktemp -d) pytest sunpy -k 'not rst'
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
|
@ -421,6 +421,8 @@ in {
|
|||||||
|
|
||||||
astropy-helpers = callPackage ../development/python-modules/astropy-helpers { };
|
astropy-helpers = callPackage ../development/python-modules/astropy-helpers { };
|
||||||
|
|
||||||
|
astropy-extension-helpers = callPackage ../development/python-modules/astropy-extension-helpers { };
|
||||||
|
|
||||||
astroquery = callPackage ../development/python-modules/astroquery { };
|
astroquery = callPackage ../development/python-modules/astroquery { };
|
||||||
|
|
||||||
asttokens = callPackage ../development/python-modules/asttokens { };
|
asttokens = callPackage ../development/python-modules/asttokens { };
|
||||||
@ -1999,8 +2001,6 @@ in {
|
|||||||
|
|
||||||
exifread = callPackage ../development/python-modules/exifread { };
|
exifread = callPackage ../development/python-modules/exifread { };
|
||||||
|
|
||||||
extension-helpers = callPackage ../development/python-modules/extension-helpers { };
|
|
||||||
|
|
||||||
extras = callPackage ../development/python-modules/extras { };
|
extras = callPackage ../development/python-modules/extras { };
|
||||||
|
|
||||||
eyeD3 = callPackage ../development/python-modules/eyed3 { };
|
eyeD3 = callPackage ../development/python-modules/eyed3 { };
|
||||||
@ -5121,6 +5121,8 @@ in {
|
|||||||
|
|
||||||
pyepsg = callPackage ../development/python-modules/pyepsg { };
|
pyepsg = callPackage ../development/python-modules/pyepsg { };
|
||||||
|
|
||||||
|
pyerfa = callPackage ../development/python-modules/pyerfa { };
|
||||||
|
|
||||||
pyexcel = callPackage ../development/python-modules/pyexcel { };
|
pyexcel = callPackage ../development/python-modules/pyexcel { };
|
||||||
|
|
||||||
pyexcelerator = callPackage ../development/python-modules/pyexcelerator { };
|
pyexcelerator = callPackage ../development/python-modules/pyexcelerator { };
|
||||||
|
Loading…
x
Reference in New Issue
Block a user