Revision: 134625 https://trac.macports.org/changeset/134625 Author: robitaille@macports.org Date: 2015-04-01 04:25:22 -0700 (Wed, 01 Apr 2015) Log Message: ----------- py-astropy: avoid conflicts with py-pyfits port Modified Paths: -------------- trunk/dports/python/py-astropy/Portfile Modified: trunk/dports/python/py-astropy/Portfile =================================================================== --- trunk/dports/python/py-astropy/Portfile 2015-04-01 07:24:28 UTC (rev 134624) +++ trunk/dports/python/py-astropy/Portfile 2015-04-01 11:25:22 UTC (rev 134625) @@ -5,6 +5,7 @@ PortGroup python 1.0 name py-astropy version 1.0.1 +revision 1 maintainers robitaille dist_subdir ${name}/${version} @@ -48,21 +49,18 @@ build.cmd ${python.bin} setup.py --no-user-cfg --offline --no-git destroot.cmd ${python.bin} setup.py --no-user-cfg --offline --no-git + # Don't let the python portgroup create symlinks to the binaries, because + # the python portgroup's post-destroot block will run before ours, so the + # files won't have the right names yet, and the symlinks will be broken. + python.link_binaries no + post-destroot { - file rename ${destroot}${prefix}/bin/fitscheck-${python.branch} \ - ${destroot}${prefix}/bin/fitscheck-ap-${python.branch} - file rename ${destroot}${prefix}/bin/fitsdiff-${python.branch} \ - ${destroot}${prefix}/bin/fitsdiff-ap-${python.branch} - file rename ${destroot}${prefix}/bin/fitsheader-${python.branch} \ - ${destroot}${prefix}/bin/fitsheader-ap-${python.branch} - file rename ${destroot}${prefix}/bin/volint-${python.branch} \ - ${destroot}${prefix}/bin/volint-ap-${python.branch} - file rename ${destroot}${prefix}/bin/fits2bitmap-${python.branch} \ - ${destroot}${prefix}/bin/fits2bitmap-ap-${python.branch} - file rename ${destroot}${prefix}/bin/samp_hub-${python.branch} \ - ${destroot}${prefix}/bin/samp_hub-ap-${python.branch} - file rename ${destroot}${prefix}/bin/wcslint-${python.branch} \ - ${destroot}${prefix}/bin/wcslint-ap-${python.branch} + # Don't conflict with files installed by py-pyfits. + set ap_suffix -ap + foreach bin {fitscheck fitsdiff fitsheader volint fits2bitmap samp_hub wcslint} { + move ${destroot}${python.prefix}/bin/${bin} ${destroot}${python.prefix}/bin/${bin}${ap_suffix} + ln -s ${python.prefix}/bin/${bin}${ap_suffix} ${destroot}${prefix}/bin/${bin}${ap_suffix}${python.link_binaries_suffix} + } } }