Package Details: python-astropy 5.1-1

Git Clone URL: (read-only, click to copy)
Package Base: python-astropy
Description: A community python library for astronomy
Upstream URL:
Licenses: BSD
Conflicts: python-pyfits, python-vo
Submitter: mboquien
Maintainer: mboquien
Last Packager: mboquien
Votes: 29
Popularity: 0.004930
First Submitted: 2013-04-20 09:07 (UTC)
Last Updated: 2022-05-26 22:28 (UTC)

Dependencies (29)

Sources (1)

Latest Comments

wadouk commented on 2022-01-27 20:58 (UTC)

@mboquien, not on arch but manjaro

doesn't have other update

the python package is in 3.10 extension-helper seems 3.9 (by viewing file list)

will wait manjaro team publish other stuff

mboquien commented on 2022-01-27 20:50 (UTC) (edited on 2022-01-27 20:50 (UTC) by mboquien)

@wadouk Archlinux's python version is now at 3.10 and it does not support partial updates. I suggest you upgrade the entire system.

wadouk commented on 2022-01-27 20:45 (UTC)

last update doesn't deploy

maybe it's about python version : python-extension-helpers is installed but in python3.9 astropy seems to install as 3.8 ?

  File "/var/tmp/pamac-build-user/python-astropy/src/astropy-5.0.1/", line 66, in <module>
    from extension_helpers import get_extensions  # noqa
ModuleNotFoundError: No module named 'extension_helpers'
==> ERROR: A failure occurred in build().

lmartinez-mirror commented on 2021-09-19 17:41 (UTC) (edited on 2021-09-19 18:07 (UTC) by lmartinez-mirror)

Is there a reason why this package doesn't build using setuptools instead of pip?

EDIT: Put together a patch for building with python-setuptools instead of python-pip, per Python packaging guidelines.

diff --git a/PKGBUILD b/PKGBUILD
index 1a84745..287a648 100644
@@ -1,8 +1,9 @@
-# Contributor: Médéric Boquien <>
 # Maintainer: Médéric Boquien <>
+# Contributor: Luis Martinez <luis dot martinez at disroot dot org>
 pkgdesc="A community python library for astronomy"
 arch=('i686' 'x86_64')
@@ -26,22 +27,19 @@ optdepends=('python-scipy: powers a variety of features in several modules'
             'libxml2: validates VOTABLE XML files. This is a command line tool installed outside of Python'
 conflicts=('python-pyfits' 'python-vo')
-makedepends=('cython' 'python-jinja' 'python-pip' 'python-setuptools-scm' 'python-extension-helpers')
+makedepends=('cython' 'python-jinja' 'python-setuptools-scm' 'python-extension-helpers')

 build() {
   cd "${srcdir}/astropy-${pkgver}"
   # Temporarily disable the use of the system cfitsio, as astropy is broken as it only tracks an old bundled version with a slightly different API
-  #ASTROPY_USE_SYSTEM_ALL=1 PIP_CONFIG_FILE=/dev/null pip wheel --no-cache-dir --no-deps --wheel-dir="${srcdir}/astropy-${pkgver}" .
-  ASTROPY_USE_SYSTEM_WCSLIB=1 ASTROPY_USE_SYSTEM_EXPAT=1 ASTROPY_USE_SYSTEM_ERFA=1 PIP_CONFIG_FILE=/dev/null pip wheel --no-cache-dir --no-deps --wheel-dir="${srcdir}/astropy-${pkgver}" .

 package() {
   cd "${srcdir}/astropy-${pkgver}"

-  install -d -m755 "${pkgdir}/usr/share/licenses/${pkgname}/"
-  install -m644 -t "${pkgdir}/usr/share/licenses/${pkgname}/" licenses/*
-  PIP_CONFIG_FILE=/dev/null pip install --isolated --ignore-installed --no-deps --no-warn-script-location --root="${pkgdir}" "$(ls ./*.whl 2> /dev/null)"
-  rm "${pkgdir}"/usr/lib/python*/site-packages/astropy-"${pkgver}".dist-info/direct_url.json
+  install -Dm 644 -t "${pkgdir}/usr/share/licenses/${pkgname}/" licenses/*
+  PYTHONHASHSEED=0 python install --root="$pkgdir/" --optimize=1 --skip-build

Roland commented on 2021-08-10 11:58 (UTC) (edited on 2021-08-10 18:20 (UTC) by Roland)

python-setuptools-scm and python-extension-helpers were missing as makedepends. makepkg -si worked for me without the two python-setuptools-scm and python-extension-helpers lines, which pacman cannot retrieve, but an aur helper like yay probably can. I had installed them manually separately from the git source package. With yay the following PKGBUILD should work.

pozar87 commented on 2021-04-09 06:54 (UTC)

Hi! I had to add (...) CFLAGS="-I/usr/include/wcslib-7.4/" pip wheel (...) to make gcc see wcs.h. Perhaps it will help someone :)

halfhorn commented on 2020-11-09 22:15 (UTC)

@petronny is correct. python-pip needs to be in makedepends

petronny commented on 2020-10-28 05:50 (UTC)

Please add python-pip to makedepends.

jankoh commented on 2020-10-25 19:12 (UTC) (edited on 2020-10-25 19:13 (UTC) by jankoh)

I got the error quoted below while trying to update the package. The solution was simply to mount the tmp-filesystem with exec instead on noexec. Maybe it could be checked to have a executable filesystem for building.

Best regards, Jan

Processing /home/jankoh/.cache/yay/python-astropy/src/astropy-4.1
Installing build dependencies ... done
Getting requirements to build wheel ... error
ERROR: Command errored out with exit status 1:
command: /usr/bin/python /usr/lib/python3.8/site-packages/pep517/ get_requires_for_build_wheel /tmp/tmp2of0s6q8                          
    cwd: /tmp/pip-req-build-kx7w53ca                                                                                                                   
Complete output (72 lines):                                                                                                                             
Traceback (most recent call last):                                                                                                                      
    File "/tmp/pip-build-env-r45ob04u/overlay/lib/python3.8/site-packages/numpy/core/", line 17, in <module>                                   
    from . import multiarray                                                                                                                            
    File "/tmp/pip-build-env-r45ob04u/overlay/lib/python3.8/site-packages/numpy/core/", line 14, in <module>                                 
    from . import overrides                                                                                                                             
    File "/tmp/pip-build-env-r45ob04u/overlay/lib/python3.8/site-packages/numpy/core/", line 7, in <module>                                   
    from numpy.core._multiarray_umath import (                                                                                                          
ImportError: /tmp/pip-build-env-r45ob04u/overlay/lib/python3.8/site-packages/numpy/core/ failed to map segment from shared object

During handling of the above exception, another exception occurred:

Traceback (most recent call last):                                                                                                                      
    File "/usr/lib/python3.8/site-packages/pep517/", line 280, in <module>                                                                  
    File "/usr/lib/python3.8/site-packages/pep517/", line 263, in main                                                                      
    json_out['return_val'] = hook(**hook_input['kwargs'])                                                                                               
    File "/usr/lib/python3.8/site-packages/pep517/", line 114, in get_requires_for_build_wheel                                              
    return hook(config_settings)                                                                                                                        
    File "/tmp/pip-build-env-r45ob04u/overlay/lib/python3.8/site-packages/setuptools/", line 149, in get_requires_for_build_wheel            
    return self._get_build_requires(                                                                                                                    
    File "/tmp/pip-build-env-r45ob04u/overlay/lib/python3.8/site-packages/setuptools/", line 130, in _get_build_requires                     
    File "/tmp/pip-build-env-r45ob04u/overlay/lib/python3.8/site-packages/setuptools/", line 145, in run_setup                               
    exec(compile(code, __file__, 'exec'), locals())                                                                                                     
    File "", line 70, in <module>                                                                                                                 
    File "/tmp/pip-build-env-r45ob04u/overlay/lib/python3.8/site-packages/extension_helpers/", line 48, in get_extensions                
    for setuppkg in iter_setup_packages(srcdir, packages):                                                                                              
    File "/tmp/pip-build-env-r45ob04u/overlay/lib/python3.8/site-packages/extension_helpers/", line 109, in iter_setup_packages          
    module = import_file(setup_package,                                                                                                                 
    File "/tmp/pip-build-env-r45ob04u/overlay/lib/python3.8/site-packages/extension_helpers/", line 194, in import_file                          
    mod = loader.load_module()                                                                                                                          
    File "<frozen importlib._bootstrap_external>", line 462, in _check_name_wrapper                                                                       
    File "<frozen importlib._bootstrap_external>", line 962, in load_module                                                                               
    File "<frozen importlib._bootstrap_external>", line 787, in load_module                                                                               
    File "<frozen importlib._bootstrap>", line 265, in _load_module_shim                                                                                  
    File "<frozen importlib._bootstrap>", line 702, in _load                                                                                              
    File "<frozen importlib._bootstrap>", line 671, in _load_unlocked                                                                                     
    File "<frozen importlib._bootstrap_external>", line 783, in exec_module                                                                               
    File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed                                                                          
    File "./astropy/wcs/", line 14, in <module>                                                                                           
    import numpy                                                                                                                                        
    File "/tmp/pip-build-env-r45ob04u/overlay/lib/python3.8/site-packages/numpy/", line 142, in <module>                                       
    from . import core                                                                                                                                  
    File "/tmp/pip-build-env-r45ob04u/overlay/lib/python3.8/site-packages/numpy/core/", line 47, in <module>                                   
    raise ImportError(msg)                                                                                                                              


Importing the numpy c-extensions failed.                                                                                                                
- Try uninstalling and reinstalling numpy.                                                                                                              
- If you have already done that, then:                                                                                                                  
    1. Check that you expected to use Python3.8 from "/usr/bin/python",                                                                                   
    and that you have no directories in your PATH or PYTHONPATH that can                                                                               
    interfere with the Python and numpy version "1.17.3" you're trying to use.                                                                         
    2. If (1) looks fine, you can open a new issue at                                                                                                  Please include details on:                                                                                 
    - how you installed Python                                                                                                                         
    - how you installed numpy                                                                                                                          
    - your operating system                                                                                                                            
    - whether or not you have multiple versions of Python installed                                                                                    
    - if you built from source, your compiler versions and ideally a build log

- If you're working with a numpy git repository, try `git clean -xdf`                                                                                   
    (removes all files not under version control) and rebuild numpy.

Note: this error has many possible causes, so please don't comment on                                                                                   
an existing issue about this - open a new one instead.

Original error was: /tmp/pip-build-env-r45ob04u/overlay/lib/python3.8/site-packages/numpy/core/ failed to map segment from shared object

ERROR: Command errored out with exit status 1: /usr/bin/python /usr/lib/python3.8/site-packages/pep517/ get_requires_for_build_wheel /tmp/tmp2of0s6q8 Check the logs for full command output.

oldherl commented on 2020-10-25 15:51 (UTC)

Missing makedepends python-pip

mboquien commented on 2019-10-28 11:41 (UTC)

The default of makepkg is MD5. I have updated to SHA512. As for the second point, this is an issue with makepkg that will be fixed with the next version of pacman. If you want to silence the message, just define a PACKAGER environment variable in the indicated format.

kseistrup commented on 2019-10-28 10:59 (UTC)

When building python-astropy 3.2.3-1:

==> Validating source files with md5sums...

Please use at least sha256sums.

==> WARNING: PACKAGER should have the format 'Example Name <email@address.invalid>'

Please provide a PACKAGER variable in the PKGBUILD file.

Universebenzene commented on 2019-10-08 04:18 (UTC)

3.2.2 released. And the new version of wcslib seems to be compatible with astropy now, so you can use the external one with --use-system-libraries again.

mboquien commented on 2016-03-25 22:56 (UTC)

The package has been updated to 1.1.2. Sorry for the delay. The minimum wcslib version got bumped with astropy 1.1.2 in order to fix a critical bug. In the end the AUR astropy package depended on the Arch wcslib package update.

lonur commented on 2015-09-04 12:38 (UTC)

Thank you, this way it still throws a couple of warnings but goes all the way through.

mboquien commented on 2015-09-04 12:24 (UTC)

For the time being a solution is to delete the "--use-system-libraries" option line 18 of the PKGBUILD. The issue should be fixed properly with astropy 1.1.

lonur commented on 2015-09-04 12:22 (UTC)

Hi, are there any workarounds or fixes for the problem mauritiusdadd described below? Or is it just me still having this issue building python-astropy 1.0.4-1?

mboquien commented on 2015-08-16 17:29 (UTC)

Thanks for reporting the issue. I can confirm it. I have contacted the astropy developers. I will see whether I can get a patch.

mauritiusdadd commented on 2015-08-16 13:01 (UTC)

Hi, this package fails to build after the recent update of wcslib to version 5.9-1 (even in a clean chroot) with the following errors: astropy/wcs/src/pipeline.c:146:42: error: invalid application of 'sizeof' to incomplete type 'struct wcserr' pipeline->err = calloc(1, sizeof(struct wcserr)); ^ astropy/wcs/src/pipeline.c:148:7: warning: implicit declaration of function 'wcserr_copy' [-Wimplicit-function-declaration] wcserr_copy(pipeline->wcs->err, pipeline->err); ^ astropy/wcs/src/pipeline.c:69:19: warning: variable 'err' set but not used [-Wunused-but-set-variable] struct wcserr **err; ^ astropy/wcs/src/pipeline.c:60:22: warning: unused variable 'function' [-Wunused-variable] static const char* function = "pipeline_all_pixel2world"; ^ astropy/wcs/src/pipeline.c: In function 'pipeline_pix2foc': astropy/wcs/src/pipeline.c:235:42: error: invalid application of 'sizeof' to incomplete type 'struct wcserr' pipeline->err = calloc(1, sizeof(struct wcserr)); ^ astropy/wcs/src/pipeline.c:181:20: warning: variable 'err' set but not used [-Wunused-but-set-variable] struct wcserr **err; ^ astropy/wcs/src/pipeline.c:173:22: warning: unused variable 'function' [-Wunused-variable] static const char* function = "pipeline_pix2foc"; ^ error: command 'gcc' failed with exit status 1 ==> ERROR: A failure occurred in build().

mboquien commented on 2015-01-27 22:01 (UTC)

Sorry about the small installation problem. I corrected it as soon as I saw it. Not quickly enough though. Revision ≥3 should fix the problem.

gypaetus commented on 2015-01-27 21:56 (UTC)

Fantastic! Just a small comment that the dependency on python-numpy should be >=1.5.1 I think this package also conflicts with python2-astropy because they try to install executable files under the same path.

mboquien commented on 2015-01-27 21:39 (UTC)

The package has been updated, including a small patch to be compatible with WCSlib≥4.24.

gypaetus commented on 2015-01-26 03:56 (UTC)

astropy v0.4.4 has been released

mboquien commented on 2014-03-27 19:47 (UTC)

Quick new version integrating a patch to fix a bug with python 3.4 which prevented the module from being imported.

mboquien commented on 2014-03-27 19:00 (UTC)

Version bump for python 3.4.

mboquien commented on 2014-02-14 19:41 (UTC)

Hello, Following the comment from migueldvb, I have updated various package names in the depends and conflicts sections. Regards, Médéric

gypaetus commented on 2013-12-04 01:26 (UTC)

The package python3-h5py does not exist, should that dependency be replaced by python-h5py?

mboquien commented on 2013-11-24 11:59 (UTC)

Hello, Finally astropy 0.3 is out. It solves the problem of incompatibility with cfitsio that prevented astropy 0.2 from building correctly when using external packages. Unfortunately, the legacy option is now gone. This means that you cannot do an "import pyfits" anymore now. Porting could be as simple as "import as pyfits". Otherwise the dependencies have been updated, using erfa rather than sofa and the licenses are now properly included. Let me know if you encounter any problem. Regards, Médéric

mboquien commented on 2013-08-05 16:32 (UTC)

Hello, Thanks for the notification. The update may take a little while as there is an incompatbility with arch's current cfitsio version. It has been reported and is being dealt with at the moment. One workaround would be to use the libraries shipped with astropy, removing the --use-system-libraries flag in the PKGBUILD file but I do not like the idea of having multiple versions of the same lib installed. Regards, M.

clu commented on 2013-08-05 16:24 (UTC)

Thanks for maintaining this! The dependency python3-h5py should be changed to python-h5py.