[AstroPy] External packages in astropy (was: Re: [astropy-dev] ANN: Astropy v0.1)

Olе Streicher astropy at liska.ath.cx
Wed Jun 20 03:37:55 EDT 2012

Erik Tollerud <erik.tollerud at gmail.com> writes:
> On Tue, Jun 19, 2012 at 11:19 AM, Olе Streicher <astropy at liska.ath.cx> wrote:
>> * I very much like the idea of having the external C code in a specific
>>  diretory tree "cextern" since this makes it easier to split this part
>>  and use the versions provided with the OS. I would guess that also
>>  the "wcslib" part will move from pywcs to cextern?

> Mike D (the maintainer of astropy.wcs and pywcs) will know for sure,
> but I think his plan is to keep wcslib where it is, because the
> python-level wrapper is rather closely tied to the particular version
> of wcslib.

I don't see this tight bound to a specific version. pywcs/astropy.wcs
uses the official API of wcslib, so it should work with every
version. And the shared library contains a SONAME that is going to be
changed if binary compability breaks.

Source and binary compability can be checked with the upstream tracker


(which is down in the moment I write this), and this shows that the last
versions (from 4.8, if I remember correctly) are all compatible. 

> The idea is that cextern is for C code that is essentially included
> "wholly" (like extern), and things that are tightly coupled to the
> python code (including Cython .pyx files) will live in the python
> source tree.  There's more about this is in the README file in the
> cextern directory.

When astropy is packaged for a distribution (probably others than Debian
and Ubuntu as well), there is a need to replace convienience copies of
third-party code by references to the according packages. Making this
easier is IMO one of the uses of cextern. I would even suggest to rename
it to "thirdparty" of similar, since this is probably not limited to C

At least, it would be nice to have build-time configuration options to
use external packages instead of the distributed ones (adjustable since
the external packages may vary between the Linux distributions).

I would also suggest a rule that external packages should be used
unchanged in the astropy tree (if changes are needed, they should be
discussed/included with the original authors).

Best regards


More information about the AstroPy mailing list