lol

python3.pkgs.pyerfa: Enable and fix tests & more

Use NIX_CFLAGS_COMPILE = "-O2", due to upstream issue. cd "$out" to
avoid circular import issue (discuessed downstream at at
https://github.com/NixOS/nixpkgs/issues/255262).

+30 -3
+30 -3
pkgs/development/python-modules/pyerfa/default.nix
··· 1 { lib 2 , buildPythonPackage 3 , fetchPypi 4 , jinja2 5 , oldest-supported-numpy 6 , setuptools-scm ··· 8 , liberfa 9 , packaging 10 , numpy 11 }: 12 13 buildPythonPackage rec { 14 pname = "pyerfa"; 15 format = "pyproject"; 16 version = "2.0.0.3"; 17 - 18 - doCheck = false; 19 20 src = fetchPypi { 21 inherit pname version; 22 hash = "sha256-13+7+lg1DBlMy5nl2TqgXTwrFNWq2LZi2Txq2f/0Hzk="; 23 }; 24 25 nativeBuildInputs = [ 26 jinja2 27 oldest-supported-numpy ··· 31 ]; 32 33 propagatedBuildInputs = [ 34 - liberfa 35 numpy 36 ]; 37 38 preBuild = '' 39 export PYERFA_USE_SYSTEM_LIBERFA=1 40 ''; 41 42 meta = with lib; { 43 description = "Python bindings for ERFA routines";
··· 1 { lib 2 , buildPythonPackage 3 , fetchPypi 4 + , fetchpatch 5 , jinja2 6 , oldest-supported-numpy 7 , setuptools-scm ··· 9 , liberfa 10 , packaging 11 , numpy 12 + , pytestCheckHook 13 + , pytest-doctestplus 14 }: 15 16 buildPythonPackage rec { 17 pname = "pyerfa"; 18 format = "pyproject"; 19 version = "2.0.0.3"; 20 21 src = fetchPypi { 22 inherit pname version; 23 hash = "sha256-13+7+lg1DBlMy5nl2TqgXTwrFNWq2LZi2Txq2f/0Hzk="; 24 }; 25 26 + patches = [ 27 + # Sort of helps maybe for https://github.com/liberfa/pyerfa/issues/112 28 + (fetchpatch { 29 + url = "https://github.com/liberfa/pyerfa/commit/4866342b94c5e7344711146f1186a4c3e7534da8.patch"; 30 + hash = "sha256-uPFFdLYfRweQdeEApBAw6Ulqh31NTQwwmnaU+x/M+C0="; 31 + }) 32 + ]; 33 + 34 nativeBuildInputs = [ 35 jinja2 36 oldest-supported-numpy ··· 40 ]; 41 42 propagatedBuildInputs = [ 43 numpy 44 + ]; 45 + buildInputs = [ 46 + liberfa 47 ]; 48 49 preBuild = '' 50 export PYERFA_USE_SYSTEM_LIBERFA=1 51 ''; 52 + 53 + # See https://github.com/liberfa/pyerfa/issues/112#issuecomment-1721197483 54 + NIX_CFLAGS_COMPILE = "-O2"; 55 + nativeCheckInputs = [ 56 + pytestCheckHook 57 + pytest-doctestplus 58 + ]; 59 + # Getting circular import errors without this, not clear yet why. This was mentioned to 60 + # upstream at: https://github.com/liberfa/pyerfa/issues/112 and downstream at 61 + # https://github.com/NixOS/nixpkgs/issues/255262 62 + preCheck = '' 63 + cd $out 64 + ''; 65 + pythonImportsCheck = [ 66 + "erfa" 67 + ]; 68 69 meta = with lib; { 70 description = "Python bindings for ERFA routines";