summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/astropy-healpix/default.nix
diff options
context:
space:
mode:
authorRobin Gloster <mail@glob.in>2021-05-24 09:55:24 -0500
committerRobin Gloster <mail@glob.in>2021-05-24 09:55:24 -0500
commit4bc5fbef9d159e143fb7e2c3231932e6e76f667c (patch)
treee2198f5c552e0667d838b8ec764ddb3a4d8f6dec /pkgs/development/python-modules/astropy-healpix/default.nix
parentjq: fix build with structured-attrs on darwin (diff)
parentMerge pull request #123802 from superherointj/package-virtmanager-bugfix (diff)
downloadnixpkgs-origin/structured-attrs.tar.gz
Merge remote-tracking branch 'upstream/master' into structured-attrsorigin/structured-attrs
Diffstat (limited to 'pkgs/development/python-modules/astropy-healpix/default.nix')
-rw-r--r--pkgs/development/python-modules/astropy-healpix/default.nix33
1 files changed, 25 insertions, 8 deletions
diff --git a/pkgs/development/python-modules/astropy-healpix/default.nix b/pkgs/development/python-modules/astropy-healpix/default.nix
index e82faba97583..80ef403b2cc0 100644
--- a/pkgs/development/python-modules/astropy-healpix/default.nix
+++ b/pkgs/development/python-modules/astropy-healpix/default.nix
@@ -3,25 +3,42 @@
, fetchPypi
, numpy
, astropy
-, astropy-helpers
+, astropy-extension-helpers
+, setuptools-scm
+, pytestCheckHook
+, pytest-doctestplus
+, hypothesis
}:
buildPythonPackage rec {
pname = "astropy-healpix";
version = "0.6";
- doCheck = false; # tests require pytest-astropy
-
src = fetchPypi {
- inherit pname version;
+ inherit version;
+ pname = lib.replaceStrings ["-"] ["_"] pname;
sha256 = "409a6621c383641456c074f0f0350a24a4a58e910eaeef14e9bbce3e00ad6690";
};
- propagatedBuildInputs = [ numpy astropy astropy-helpers ];
+ nativeBuildInputs = [
+ astropy-extension-helpers
+ setuptools-scm
+ ];
+
+ propagatedBuildInputs = [
+ numpy
+ astropy
+ ];
+
+ checkInputs = [
+ pytestCheckHook
+ pytest-doctestplus
+ hypothesis
+ ];
- # 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
+ preCheck = ''
+ cd build/lib*
'';
meta = with lib; {