From 4b0d8e20915ee674054cb3bd1b3573a9f42bd08a Mon Sep 17 00:00:00 2001 From: Sharlatan Hellseher Date: Sat, 22 May 2021 20:52:49 +0100 Subject: [PATCH] gnu: astropy: rc1 * gnu/packages/astronomy.scm (python-astropy) [inputs]: refactor inputs [package] Attemp to make test working no-successufl run, it failed with starting phase `check' /tmp/guix-build-python-astropy-4.2.1.drv-0/astropy-4.2.1/astropy/config/configuration.py:582: ConfigurationMissingWarning: Configuration defaults will be used due to FileNotFoundError:2 on None warn(ConfigurationMissingWarning(msg)) ImportError while loading conftest '/tmp/guix-build-python-astropy-4.2.1.drv-0/astropy-4.2.1/conftest.py'. conftest.py:11: in from astropy import __version__ astropy/__init__.py:248: in _initialize_astropy() astropy/__init__.py:203: in _initialize_astropy raise ImportError('You appear to be trying to import astropy from ' E ImportError: You appear to be trying to import astropy from within a source checkout or from an editable installation without building the extension modules first. Either run: E E pip install -e . E E or E E python setup.py build_ext --inplace E E to make sure the extension modules are built command "pytest" "-vv" failed with status 4 builder for `/gnu/store/syjzb0sjd01af6i13k5pa6snwxk1im3x-python-astropy-4.2.1.drv' failed with exit code 1 --- gnu/packages/astronomy.scm | 71 +++++++++++++++++++++----------------- 1 file changed, 40 insertions(+), 31 deletions(-) diff --git a/gnu/packages/astronomy.scm b/gnu/packages/astronomy.scm index b607fbd3d7..8ea665380e 100644 --- a/gnu/packages/astronomy.scm +++ b/gnu/packages/astronomy.scm @@ -1085,13 +1085,17 @@ orbit around the Earth.") (arguments ;; NOTE: (Sharlatan-20210426T204315+0100): Tests require build astropy ;; module, it needs a good review on how to enable them. - `(#:tests? #f + `(;#:tests? #f #:phases (modify-phases %standard-phases (add-before 'build 'setenv-astropy-system-all (lambda _ (setenv "ASTROPY_USE_SYSTEM_ALL" "1") #t)) + (replace 'check + (lambda* (#:key inputs outputs #:allow-other-keys) + (add-installed-pythonpath inputs outputs) + (invoke "pytest" "-vv"))) ;; NOTE: (Sharlatan-20210426T200127+0100): it fails during install ;; phases without the file is removed ;; @@ -1108,37 +1112,42 @@ orbit around the Earth.") #t))))) (native-inputs `(("cfitsio" ,cfitsio) - ("coverage" ,python-coverage) - ("cython" ,python-cython) - ("extension-helpers" ,python-extension-helpers) - ("ipython" ,python-ipython) - ("objgraph" ,python-objgraph) - ("pkg-config" ,pkg-config) - ("setuptools-scm" ,python-setuptools-scm) - ("sgp4" ,python-sgp4) - ("skyfield" ,python-skyfield))) - (inputs - `(("asdf" ,python-asdf) - ("beautifulsoup4" ,python-beautifulsoup4) - ("bleach" ,python-bleach) - ("bottleneck" ,python-bottleneck) - ("cfitsio" ,cfitsio) - ("dask" ,python-dask) - ("expat" ,expat) - ("graphviz" ,graphviz) - ("h5py" ,python-h5py) - ("html5lib" ,python-html5lib) - ("jplephem" ,python-jplephem) - ("matplotlib" ,python-matplotlib) - ("mpmath" ,python-mpmath) - ("numpy" ,python-numpy) - ("pandas" ,python-pandas) - ("pyerfa" ,python-pyerfa) - ("pytz" ,python-pytz) - ("pyyaml" ,python-pyyaml) - ("scipy" ,python-scipy) - ("sortedcontainers" ,python-sortedcontainers) + ("python-asdf" ,python-asdf)("expat" ,expat) + ("python-beautifulsoup4" ,python-beautifulsoup4) + ("python-bleach" ,python-bleach) + ("python-bottleneck" ,python-bottleneck) + ("python-coverage" ,python-coverage) + ("python-cython" ,python-cython) + ("python-dask" ,python-dask) + ("python-extension-helpers" ,python-extension-helpers) + ("python-graphviz" ,graphviz) + ("python-h5py" ,python-h5py) + ("python-html5lib" ,python-html5lib) + ("python-hypothesis" ,python-hypothesis) + ("python-ipython" ,python-ipython) + ("python-jplephem" ,python-jplephem) + ("python-matplotlib" ,python-matplotlib) + ("python-mpmath" ,python-mpmath) + ("python-objgraph" ,python-objgraph) + ("python-pandas" ,python-pandas) + ("python-pkg-config" ,pkg-config) + ("python-pytest" ,python-pytest) + ("python-pytest-astropy" ,python-pytest-astropy) + ("python-pytest-cov" ,python-pytest-cov) + ("python-pytest-xdist" ,python-pytest-xdist) + ("python-pytz" ,python-pytz) + ("python-pyyaml" ,python-pyyaml) + ("python-scipy" ,python-scipy) + ("python-setuptools" ,python-setuptools) + ("python-setuptools-scm" ,python-setuptools-scm) + ("python-sgp4" ,python-sgp4) + ("python-skyfield" ,python-skyfield) + ("python-sortedcontainers" ,python-sortedcontainers) + ("python-tox" ,python-tox) ("wcslib" ,wcslib))) + (propagated-inputs + `(("python-numpy" ,python-numpy) + ("python-pyerfa" ,python-pyerfa))) (home-page "https://astropy.org/") (synopsis "Astronomy and astrophysics core library") (description -- 2.31.1