1 | # -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4 |
---|
2 | # $Id: Portfile 139414 2015-08-16 21:35:54Z robitaille@macports.org $ |
---|
3 | |
---|
4 | PortSystem 1.0 |
---|
5 | PortGroup python 1.0 |
---|
6 | |
---|
7 | name py-astropy |
---|
8 | version 1.0.5 |
---|
9 | maintainers robitaille |
---|
10 | |
---|
11 | dist_subdir ${name}/${version} |
---|
12 | |
---|
13 | categories-append science |
---|
14 | description A Community Python Library for Astronomy |
---|
15 | long_description The Astropy project is a common effort to develop \ |
---|
16 | a single core package for Astronomy. |
---|
17 | |
---|
18 | platforms darwin |
---|
19 | license BSD |
---|
20 | |
---|
21 | homepage http://www.astropy.org |
---|
22 | master_sites http://pypi.python.org/packages/source/a/astropy/ |
---|
23 | distname astropy-${version} |
---|
24 | checksums md5 0d55d7c505bef39e40c7bfc59c0a0676 \ |
---|
25 | sha1 83fac847f2cb5c58e9681d3fbc5b3293ea24de81 \ |
---|
26 | rmd160 a6adec07c662730f1b4eb3fc22e6ab41ce935bc9 |
---|
27 | |
---|
28 | python.versions 26 27 33 34 35 |
---|
29 | |
---|
30 | build.args-append --use-system-cfitsio \ |
---|
31 | --use-system-expat \ |
---|
32 | --use-system-wcslib \ |
---|
33 | --use-system-erfa |
---|
34 | |
---|
35 | if {${name} ne ${subport}} { |
---|
36 | |
---|
37 | depends_lib-append port:cfitsio \ |
---|
38 | port:expat \ |
---|
39 | port:wcslib \ |
---|
40 | port:erfa \ |
---|
41 | port:py${python.version}-numpy |
---|
42 | |
---|
43 | depends_build-append \ |
---|
44 | port:pkgconfig \ |
---|
45 | port:py${python.version}-setuptools |
---|
46 | |
---|
47 | # By default, astropy downloads an astropy-helpers package for setup.py. |
---|
48 | # The --offline and --no-git flags prevent this and use a bundled version. |
---|
49 | build.cmd ${python.bin} setup.py --no-user-cfg --offline --no-git |
---|
50 | destroot.cmd ${python.bin} setup.py --no-user-cfg --offline --no-git |
---|
51 | |
---|
52 | # Don't let the python portgroup create symlinks to the binaries, because |
---|
53 | # the python portgroup's post-destroot block will run before ours, so the |
---|
54 | # files won't have the right names yet, and the symlinks will be broken. |
---|
55 | python.link_binaries no |
---|
56 | |
---|
57 | post-destroot { |
---|
58 | # Don't conflict with files installed by py-pyfits. |
---|
59 | set ap_suffix -ap |
---|
60 | foreach bin {fitscheck fitsdiff fitsheader volint fits2bitmap samp_hub wcslint} { |
---|
61 | move ${destroot}${python.prefix}/bin/${bin} ${destroot}${python.prefix}/bin/${bin}${ap_suffix} |
---|
62 | ln -s ${python.prefix}/bin/${bin}${ap_suffix} ${destroot}${prefix}/bin/${bin}${ap_suffix}${python.link_binaries_suffix} |
---|
63 | } |
---|
64 | } |
---|
65 | |
---|
66 | } |
---|