about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/sunpy
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2021-01-15 10:30:44 +0000
committerAlyssa Ross <hi@alyssa.is>2021-01-15 10:30:44 +0000
commite0794be8a0d11e90461e5a9c85012a36b93ec976 (patch)
treeefd9cbc55ea3322867bf601c4d536758a3dd5fcc /nixpkgs/pkgs/development/python-modules/sunpy
parent3538874082ded7647b1ccec0343c7c1e882cfef3 (diff)
parent1a57d96edd156958b12782e8c8b6a374142a7248 (diff)
downloadnixlib-e0794be8a0d11e90461e5a9c85012a36b93ec976.tar
nixlib-e0794be8a0d11e90461e5a9c85012a36b93ec976.tar.gz
nixlib-e0794be8a0d11e90461e5a9c85012a36b93ec976.tar.bz2
nixlib-e0794be8a0d11e90461e5a9c85012a36b93ec976.tar.lz
nixlib-e0794be8a0d11e90461e5a9c85012a36b93ec976.tar.xz
nixlib-e0794be8a0d11e90461e5a9c85012a36b93ec976.tar.zst
nixlib-e0794be8a0d11e90461e5a9c85012a36b93ec976.zip
Merge commit '1a57d96edd156958b12782e8c8b6a374142a7248'
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/sunpy')
-rw-r--r--nixpkgs/pkgs/development/python-modules/sunpy/default.nix25
1 files changed, 11 insertions, 14 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/sunpy/default.nix b/nixpkgs/pkgs/development/python-modules/sunpy/default.nix
index 6830c7c13430..6a455ce49ebe 100644
--- a/nixpkgs/pkgs/development/python-modules/sunpy/default.nix
+++ b/nixpkgs/pkgs/development/python-modules/sunpy/default.nix
@@ -1,12 +1,12 @@
 { stdenv
 , lib
 , buildPythonPackage
-, fetchFromGitHub
+, fetchPypi
 , pythonOlder
-
 , asdf
 , astropy
 , astropy-helpers
+, astropy-extension-helpers
 , beautifulsoup4
 , drms
 , glymur
@@ -29,16 +29,18 @@
 
 buildPythonPackage rec {
   pname = "sunpy";
-  version = "1.0.6";
+  version = "2.0.6";
   disabled = pythonOlder "3.6";
 
-  src = fetchFromGitHub {
-    owner = "sunpy";
-    repo = pname;
-    rev = "v${version}";
-    sha256 = "0j2yfhfxgi95rig8cfp9lvszb7694gq90jvs0xrb472hwnzgh2sk";
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "109flghca42yhsm2w5xicqhyx1mc8c3vlwvadbn65fz3lhysqj67";
   };
 
+  nativeBuildInputs = [
+    astropy-extension-helpers
+  ];
+
   propagatedBuildInputs = [
     numpy
     scipy
@@ -66,16 +68,11 @@ buildPythonPackage rec {
     pytest-mock
   ];
 
-  preBuild = ''
-    export SETUPTOOLS_SCM_PRETEND_VERSION="${version}"
-    export HOME=$(mktemp -d)
-  '';
-
   # darwin has write permission issues
   doCheck = stdenv.isLinux;
   # ignore documentation tests
   checkPhase = ''
-    pytest sunpy -k 'not rst'
+    PY_IGNORE_IMPORTMISMATCH=1 HOME=$(mktemp -d) pytest sunpy -k 'not rst'
   '';
 
   meta = with lib; {