about summary refs log tree commit diff
path: root/pkgs/development/python-modules/astropy
diff options
context:
space:
mode:
authorRobert T. McGibbon <rmcgibbo@gmail.com>2020-12-27 19:16:28 -0500
committerRobert T. McGibbon <rmcgibbo@gmail.com>2020-12-28 15:16:21 -0500
commit8df2e7698436e684a41349545f5302a729b706b6 (patch)
treec4bc20eb7ac5b326fcd05059b254408d725b2dba /pkgs/development/python-modules/astropy
parent7ef5a93fe1a3e69307b316484641fee7caed0ed4 (diff)
python3Packages.astropy: unbreak
Diffstat (limited to 'pkgs/development/python-modules/astropy')
-rw-r--r--pkgs/development/python-modules/astropy/default.nix26
1 files changed, 13 insertions, 13 deletions
diff --git a/pkgs/development/python-modules/astropy/default.nix b/pkgs/development/python-modules/astropy/default.nix
index 2fe59e53d9c14..9ffcba63954b5 100644
--- a/pkgs/development/python-modules/astropy/default.nix
+++ b/pkgs/development/python-modules/astropy/default.nix
@@ -1,5 +1,6 @@
 { lib
 , fetchPypi
+, setuptools_scm
 , buildPythonPackage
 , isPy3k
 , cython
@@ -8,11 +9,14 @@
 , pytest
 , pytest-astropy
 , astropy-helpers
+, astropy-extension-helpers
+, pyerfa
 }:
 
 buildPythonPackage rec {
   pname = "astropy";
   version = "4.2";
+  format = "pyproject";
 
   disabled = !isPy3k; # according to setup.py
 
@@ -21,15 +25,12 @@ buildPythonPackage rec {
     sha256 = "2c194f8a429b8399de64a413a06881ea49f0525cabaa2d78fc132b9e970adc6a";
   };
 
-  nativeBuildInputs = [ astropy-helpers cython jinja2 ];
-
-  propagatedBuildInputs = [ numpy pytest ]; # yes it really has pytest in install_requires
-
+  nativeBuildInputs = [ setuptools_scm astropy-helpers astropy-extension-helpers cython jinja2 ];
+  propagatedBuildInputs = [ numpy pyerfa ];
   checkInputs = [ pytest pytest-astropy ];
 
-  # Disable automatic update of the astropy-helper module
-  postPatch = ''
-    substituteInPlace setup.cfg --replace "auto_use = True" "auto_use = False"
+  preBuild = ''
+    export SETUPTOOLS_SCM_PRETEND_VERSION="${version}"
   '';
 
   # 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
+  # doCheck = false;
   doCheck = false;
 
-  meta = {
+  meta = with lib; {
     description = "Astronomy/Astrophysics library for Python";
     homepage = "https://www.astropy.org";
-    license = lib.licenses.bsd3;
-    platforms = lib.platforms.all;
-    maintainers = with lib.maintainers; [ kentjames ];
+    license = licenses.bsd3;
+    platforms = platforms.all;
+    maintainers = [ maintainers.kentjames ];
   };
 }
-
-