git.iko.soy/typeable/nixpkgs
on master help sign in
pythonPackages.radio_beam: add checkPhase
commit723382b0bfa366ffc90aca31348a28d74228a3b5 authorSébastien Maret <sebastien.maret@icloud.com> dateTue 23 Jul 2019, 12:27 (7 years ago) parent5e7213b
1 file changed+21−3
pkgs/development/python-modules/radio_beam/default.nix+21−3
pkgs/development/python-modules/radio_beam/default.nix+21−3
@@ -1,14 +1,17 @@
11{ lib
22, fetchPypi
33, buildPythonPackage
4−, astropy }:
4+, astropy
5+, pytest
6+, pytest-astropy
7+, astropy-helpers
8+, scipy
9+}:
510
611buildPythonPackage rec {
712 pname = "radio_beam";
813 version = "0.3.1";
914
10− doCheck = false; # the tests requires several pytest plugins that are not in nixpkgs
11−
1215 src = fetchPypi {
1316 inherit pname version;
1417 sha256 = "1wgd9dyz3pcc9ighkclb6qfyshwbg35s57lz6k62jhcxpvp8r5zb";
@@ -16,6 +19,21 @@ buildPythonPackage rec {
1619
1720 propagatedBuildInputs = [ astropy ];
1821
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+
1937 meta = {
2038 description = "Tools for Beam IO and Manipulation";
2139 homepage = http://radio-astro-tools.github.io;