diff options
-rw-r--r-- | dev-python/pywcs/ChangeLog | 6 | ||||
-rw-r--r-- | dev-python/pywcs/Manifest | 5 | ||||
-rw-r--r-- | dev-python/pywcs/files/pywcs-1.8.1-wcslib.patch | 120 | ||||
-rw-r--r-- | dev-python/pywcs/pywcs-1.8.1.ebuild | 35 |
4 files changed, 165 insertions, 1 deletions
diff --git a/dev-python/pywcs/ChangeLog b/dev-python/pywcs/ChangeLog index bc02955e6..7da2c98af 100644 --- a/dev-python/pywcs/ChangeLog +++ b/dev-python/pywcs/ChangeLog @@ -2,6 +2,12 @@ # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 # $Header: $ +*pywcs-1.8.1 (26 Apr 2010) + + 26 Apr 2010; Kacper Kowalik <xarthisius.kk@gmail.com> +pywcs-1.8.1.ebuild, + +files/pywcs-1.8.1-wcslib.patch: + version bump, removing bundled wcslib + *pywcs-1.7 (12 Feb 2010) 12 Feb 2010; SĂ©bastien Fabbro <bicatali@gentoo.org> +pywcs-1.7.ebuild: diff --git a/dev-python/pywcs/Manifest b/dev-python/pywcs/Manifest index 9c753e2b4..799e89a9c 100644 --- a/dev-python/pywcs/Manifest +++ b/dev-python/pywcs/Manifest @@ -1,6 +1,9 @@ +AUX pywcs-1.8.1-wcslib.patch 3849 RMD160 1e1eda65d42836893c8a073bafa2ccaf15f236e2 SHA1 6371e75548963d6b92bb67584350760c1b733531 SHA256 9a588537d9caa354fbca5a26ea50d5d8e2244f06bd60a620b5571bef2adef02a DIST pywcs-1.5.1-4.3.3.tar.gz 711806 RMD160 e8ae6d223cf15d9a9b3b6bfa24d9cb15a4f3befb SHA1 052e9c679efd59b31fd40d3dda462cb98cd3d607 SHA256 58c256579ea5814579fc718b7cd88d7c0c56ec861160a879377f78c3be296873 DIST pywcs-1.7-4.4.4.tar.gz 2009870 RMD160 231ca843d2070172020016936536a02b63098e42 SHA1 9ac35228291e2aa65177aff47fe5fd25d6970b84 SHA256 49765b43ab6ac6a8e61455f847c1758ddaf15bfb558e46d981703fb0b9bb9107 +DIST pywcs-1.8.1-4.4.4.tar.gz 2010226 RMD160 288135458de2a3c1cc142a5c44cb4fcdfa931291 SHA1 512f3c8776b8ff34e0d39d0f60bb4e073bacf830 SHA256 907a6d852393056e8532be63bd1e14eec32d80a919b08d6d4837613620409662 EBUILD pywcs-1.5.1.ebuild 676 RMD160 badc976a4bb05581d321ece776af22cf606a283e SHA1 1f5345dea19ad9d16685f22be98ce1d1f4194432 SHA256 14c12f3d9049131d3f865b1bbfee320dfba5115d059a8b6b803c726aa8eb0f5a EBUILD pywcs-1.7.ebuild 660 RMD160 70a5155394c78e469a7cb7dafb0b36c76e7283d3 SHA1 2c683fac8de782ef5ae95f7b4ee56991685b0c76 SHA256 4aa2cab90f9b4280d145bf199db499959da195b29d28f8f8b5fa5eb7aa5a5e12 -MISC ChangeLog 364 RMD160 2fd2b24faeeab17cb32ff0b4a0b00dd26c9edf21 SHA1 156d17db1d6fbf29ea30a7ad83aa2c24d3ce260b SHA256 50f1f3911d53295c26b6e8f5978b567bcc6bffcb477f7e0ca3fd05309086e864 +EBUILD pywcs-1.8.1.ebuild 748 RMD160 d42e0f2f4ecc05fbb3a1d658ceaa8762c19cd5b3 SHA1 099ba4ca97578f97d3f4e80fed413dd9f1997337 SHA256 56138ce4826445f9e29188439dcae903e69a33fed7119a22cc9e9dda37cbad8e +MISC ChangeLog 545 RMD160 860f3b6bbe9e77faf66b141adac2e924646ffe8a SHA1 b2f08c626135a8eaa3516a03b04463d5225b6f40 SHA256 15af02a27db45a71aa253a3c17fdfab0b860268e81b0231010e55cb99519070a MISC metadata.xml 374 RMD160 751b95b8cb2d0fa8194e7388b51f5785b4f16d0f SHA1 32790eaab968b07b66c22157f42138b1f56911e6 SHA256 5fe68de0cf26109619592c99a227ee9f4b54f2a18e4c9f95206a63c8275c1b60 diff --git a/dev-python/pywcs/files/pywcs-1.8.1-wcslib.patch b/dev-python/pywcs/files/pywcs-1.8.1-wcslib.patch new file mode 100644 index 000000000..16d790bcd --- /dev/null +++ b/dev-python/pywcs/files/pywcs-1.8.1-wcslib.patch @@ -0,0 +1,120 @@ +--- defsetup.py.orig 2010-04-24 11:27:55.655012084 +0200 ++++ defsetup.py 2010-04-24 12:00:52.393014990 +0200 +@@ -38,70 +38,26 @@ + + ###################################################################### + # WCSLIB +-WCSVERSION = "4.4.4" +-WCSLIB = "wcslib-%s" % WCSVERSION # Path to wcslib +-WCSLIBC = join(WCSLIB, "C") # Path to wcslib source files +-WCSFILES = [ # List of wcslib files to compile +- 'flexed/wcspih.c', +- 'flexed/wcsulex.c', +- 'flexed/wcsutrn.c', +- 'cel.c', +- 'lin.c', +- 'log.c', +- 'prj.c', +- 'spc.c', +- 'sph.c', +- 'spx.c', +- 'tab.c', +- 'wcs.c', +- 'wcsfix.c', +- 'wcshdr.c', +- 'wcsunits.c', +- 'wcsutil.c'] +-WCSFILES = [join(WCSLIBC, x) for x in WCSFILES] ++from subprocess import Popen, PIPE ++from re import match + +-###################################################################### +-# WCSLIB CONFIGURATION +- +-# The only configuration parameter needed at compile-time is how to +-# specify a 64-bit signed integer. Python's ctypes module can get us +-# that information, but it is only available in Python 2.5 or later. +-# If we can't be absolutely certain, we default to "long long int", +-# which is correct on most platforms (x86, x86_64). If we find +-# platforms where this heuristic doesn't work, we may need to hardcode +-# for them. +-def determine_64_bit_int(): +- try: +- try: +- import ctypes +- except ImportError: +- raise ValueError() +- +- if ctypes.sizeof(ctypes.c_longlong) == 8: +- return "long long int" +- elif ctypes.sizeof(ctypes.c_long) == 8: +- return "long int" +- elif ctypes.sizeof(ctypes.c_int) == 8: +- return "int" +- else: +- raise ValueError() ++def pkgconfig(*packages, **kw): ++ flag_map = {'-I': 'include_dirs', '-L': 'library_dirs', '-l': 'libraries'} ++ arg = "--libs --cflags --modversion %s" % ' '.join(packages) ++ for token in Popen(["pkg-config "+ arg],stdout=PIPE, shell=True).communicate()[0].split(): ++ if(match("[0-9]",token)): ++ kw.setdefault("version",[]).append(token) ++ else: ++ kw.setdefault(flag_map.get(token[:2]), []).append(token[2:]) ++ return kw + +- except ValueError: +- return "long long int" ++WCSLIB = pkgconfig('wcslib') ++WCSVERSION = WCSLIB['version'][0] + + if os.path.exists("pywcs"): + srcroot = 'pywcs' + else: + srcroot = '.' +-fd = open(join(srcroot, 'src', 'wcsconfig.h'), "w") +-fd.write(""" +-/* WCSLIB library version number. */ +-#define WCSLIB_VERSION %s +- +-/* 64-bit integer data type. */ +-#define WCSLIB_INT64 %s +-""" % (WCSVERSION, determine_64_bit_int())) +-fd.close() + + ###################################################################### + # GENERATE DOCSTRINGS IN C +@@ -190,7 +146,8 @@ + + ###################################################################### + # DISTUTILS SETUP +-libraries = [] ++libraries = WCSLIB['libraries'] ++include_dirs = [numpy_include, join(srcroot, "src")] + WCSLIB['include_dirs'] + define_macros = [('ECHO', None), + ('WCSTRIG_MACRO', None), + ('PYWCS_BUILD', None), +@@ -233,13 +190,8 @@ + + PYWCS_EXTENSIONS = [ + Extension('pywcs._pywcs', +- WCSFILES + PYWCS_SOURCES, +- include_dirs = +- [numpy_include, +- join(srcroot, WCSLIBC), +- WCSLIBC, +- join(srcroot, "src") +- ], ++ PYWCS_SOURCES, ++ include_dirs=include_dirs, + define_macros=define_macros, + undef_macros=undef_macros, + extra_compile_args=extra_compile_args, +@@ -259,7 +211,6 @@ + 'ext_modules' : PYWCS_EXTENSIONS, + 'data_files' : [ + ( 'pywcs/include', ['src/*.h']), +- ( 'pywcs/include/wcslib', [ WCSLIBC + '/*.h'] ), + ], + } + diff --git a/dev-python/pywcs/pywcs-1.8.1.ebuild b/dev-python/pywcs/pywcs-1.8.1.ebuild new file mode 100644 index 000000000..0bb35ba46 --- /dev/null +++ b/dev-python/pywcs/pywcs-1.8.1.ebuild @@ -0,0 +1,35 @@ +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI=3 +inherit distutils eutils + +WCS_V=4.4.4 +MYP="${P}-${WCS_V}" + +DESCRIPTION="Python routines for handling the FITS World Coordinate System" +HOMEPAGE="https://www.stsci.edu/trac/ssb/astrolib/" +SRC_URI="http://stsdas.stsci.edu/astrolib/${MYP}.tar.gz" + +DEPEND="dev-python/pyfits + >=sci-astronomy/wcslib-4.4.4" +RDEPEND="${DEPEND}" + +IUSE="" +SLOT="0" +KEYWORDS="~amd64 ~x86" +LICENSE="AURA" + +S=${WORKDIR}/${MYP} + +src_prepare(){ + epatch "${FILESDIR}"/${P}-wcslib.patch +} + +# FIX: compiles twice due to stsci hacks + +src_test() { + # FIX: does not work, needs fits files + PYTHONPATH=$(dir -d build/lib*) "${python}" test/test.py || die +} |