15 buildPythonPackage rec {
19 # pypi src contains cython-produced .c files which don't compile
21 src = fetchFromGitHub {
25 hash = "sha256-xo+XbBJ2HKql9rd7Ma84JofRg8M4u6vmz44Qo8JhEBc=";
28 propagatedBuildInputs = [
35 # Upstream patches needed for the tests to pass
36 # See https://github.com/astropy/pyregion/pull/157/
39 url = "https://github.com/astropy/pyregion/pull/157/commits/082649730d353a0d0c0ee9619be1aa501aabba62.patch";
40 hash = "sha256-4mHZt3S29ZfK+QKavm6DLBwVxGl/ga7W7GEcQ5ewxuo=";
43 url = "https://github.com/astropy/pyregion/pull/157/commits/c448a465dd56887979da62aec6138fc89bb37b19.patch";
44 hash = "sha256-GEtvScmVbAdE4E5Xx0hNOPommvzcnJ3jNZpBmY3PbyE=";
48 nativeBuildInputs = [ astropy-helpers cython ];
50 nativeCheckInputs = [ pytestCheckHook pytest-astropy ];
52 disabledTests = lib.optionals (!stdenv.hostPlatform.isDarwin) [
53 # Skipping 2 tests because it's failing. Domain knowledge was unavailable on decision.
54 # Error logs: https://gist.github.com/superherointj/3f616f784014eeb2e3039b0f4037e4e9
55 "test_calculate_rotation_angle"
59 # Disable automatic update of the astropy-helper module
61 substituteInPlace setup.cfg --replace "auto_use = True" "auto_use = False"
64 # Tests must be run in the build directory
73 description = "Python parser for ds9 region files";
74 homepage = "https://github.com/astropy/pyregion";
75 license = licenses.mit;
76 maintainers = [ maintainers.smaret ];