From 82b0686a621ea959a2f442d9a41d20f644774a3d Mon Sep 17 00:00:00 2001 From: Sebastien Fabbro Date: Mon, 19 Feb 2007 10:15:19 +0000 Subject: [PATCH] added numpy-1.0.1-r1: overhaul cleaning and testing Package-Manager: portage-2.1.2-r9 --- dev-python/numpy/ChangeLog | 9 +- dev-python/numpy/Manifest | 53 ++++-- dev-python/numpy/files/digest-numpy-1.0.1-r1 | 3 + dev-python/numpy/files/numpy-1.0.1-f2py.patch | 42 +++++ dev-python/numpy/metadata.xml | 11 +- dev-python/numpy/numpy-0.9.8.ebuild | 4 +- dev-python/numpy/numpy-1.0.1-r1.ebuild | 161 ++++++++++++++++++ dev-python/numpy/numpy-1.0.1.ebuild | 4 +- 8 files changed, 265 insertions(+), 22 deletions(-) create mode 100644 dev-python/numpy/files/digest-numpy-1.0.1-r1 create mode 100644 dev-python/numpy/files/numpy-1.0.1-f2py.patch create mode 100644 dev-python/numpy/numpy-1.0.1-r1.ebuild diff --git a/dev-python/numpy/ChangeLog b/dev-python/numpy/ChangeLog index 1a81736725b4..1cf4bab716b1 100644 --- a/dev-python/numpy/ChangeLog +++ b/dev-python/numpy/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for dev-python/numpy # Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-python/numpy/ChangeLog,v 1.17 2007/01/31 08:36:28 nerdboy Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-python/numpy/ChangeLog,v 1.18 2007/02/19 10:15:18 bicatali Exp $ + +*numpy-1.0.1-r1 (19 Feb 2007) + + 19 Feb 2007; Sébastien Fabbro + +files/numpy-1.0.1-f2py.patch, metadata.xml, +numpy-1.0.1-r1.ebuild: + Fixed for cblas deps, better testing. Now works with test. Better + compliance to python packages. Added ifc treatment for amd64. *numpy-1.0.1 (31 Jan 2007) diff --git a/dev-python/numpy/Manifest b/dev-python/numpy/Manifest index 2afef3ebfbe5..fa717917629b 100644 --- a/dev-python/numpy/Manifest +++ b/dev-python/numpy/Manifest @@ -1,24 +1,45 @@ +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA1 + +AUX numpy-1.0.1-f2py.patch 1403 RMD160 4a02205910231c3b08ae919a45facc21dd2818ae SHA1 148118c4ee9d8a754a0891621ece9b5774e76016 SHA256 746b437aff172764a238bb75d6a5b7b0547113c8a256721cf4bec2b1819bcf51 +MD5 69e8b3f89762b836594a61414942aa78 files/numpy-1.0.1-f2py.patch 1403 +RMD160 4a02205910231c3b08ae919a45facc21dd2818ae files/numpy-1.0.1-f2py.patch 1403 +SHA256 746b437aff172764a238bb75d6a5b7b0547113c8a256721cf4bec2b1819bcf51 files/numpy-1.0.1-f2py.patch 1403 DIST numpy-0.9.8.tar.gz 985088 RMD160 6059d103ae0c89f946da906f0cddcb9cd1f6b59b SHA1 d468f66849f8672a611004a64726fc6ea7195c83 SHA256 1cac3bb08d5a64b9877eb458b7235bf33bdb591136cb08e4561b6210756750c1 DIST numpy-1.0.1.tar.gz 1249684 RMD160 f3a0c55aa5add8c93f91eee1bb05ff555c0f2485 SHA1 d6d20a32d2386ea32582d497d123211a98441c4e SHA256 c90d6f0ced132ef5bcd0b2791e0697bef6d92de45c2c591ea472d9f795757067 -EBUILD numpy-0.9.8.ebuild 1558 RMD160 572d8e2a877058ddbe6d7122b63fb9eda54395bb SHA1 6aba9d2b0a9b5366371f21c0b17dbe0254e24c4d SHA256 28094a1c7f8c998f24f69989fd2975ae877bdcfb09e41958ae69473c208f9e54 -MD5 5baea7516f0bd9858c2ffa8adb123f9a numpy-0.9.8.ebuild 1558 -RMD160 572d8e2a877058ddbe6d7122b63fb9eda54395bb numpy-0.9.8.ebuild 1558 -SHA256 28094a1c7f8c998f24f69989fd2975ae877bdcfb09e41958ae69473c208f9e54 numpy-0.9.8.ebuild 1558 -EBUILD numpy-1.0.1.ebuild 2271 RMD160 b436411a245ca0f3dca4483151ad445a205968f5 SHA1 709d73c1894a351ee8c0d99bae78d9e8273fdee3 SHA256 75bfc0bcdc2bc9a71e9c060cbbdeb3bc7a04d745fa15c4749ed204307e9416f5 -MD5 5426724393ecc4634d021313901903a0 numpy-1.0.1.ebuild 2271 -RMD160 b436411a245ca0f3dca4483151ad445a205968f5 numpy-1.0.1.ebuild 2271 -SHA256 75bfc0bcdc2bc9a71e9c060cbbdeb3bc7a04d745fa15c4749ed204307e9416f5 numpy-1.0.1.ebuild 2271 -MISC ChangeLog 3106 RMD160 479bbdbad5bb2b6779e8b2f4d78032912ebbf1a5 SHA1 67ce4f8db20f16335feabaf3cb9aca8dd4248348 SHA256 6ff2f4b7ccb96ac698c667588f422c36d3fd168bb1175d45167c5eaeea65c194 -MD5 a606f01f6a0be7251dd5b7f71707bbb9 ChangeLog 3106 -RMD160 479bbdbad5bb2b6779e8b2f4d78032912ebbf1a5 ChangeLog 3106 -SHA256 6ff2f4b7ccb96ac698c667588f422c36d3fd168bb1175d45167c5eaeea65c194 ChangeLog 3106 -MISC metadata.xml 617 RMD160 fcb64d876af5dffc1a1cc308f6e76a3ff3525244 SHA1 5e056fcc834226a96a9a7197ba2f2c0c076634d5 SHA256 eda38840db709ec1460753d542150351bcd8eaf235fcd58252e45712d64cad6a -MD5 9251edbaa605d72f2c04cc0a5b4f9a84 metadata.xml 617 -RMD160 fcb64d876af5dffc1a1cc308f6e76a3ff3525244 metadata.xml 617 -SHA256 eda38840db709ec1460753d542150351bcd8eaf235fcd58252e45712d64cad6a metadata.xml 617 +EBUILD numpy-0.9.8.ebuild 1557 RMD160 536add2de5a6c0fe7ac2a1ef39788b074bfb0b0b SHA1 2e7e3d8e0160fba6f6bdf273a0a990069559f4dc SHA256 6149347b0833687ffc279ac04eb163ac004363308e047f27fbd10b4a718a4458 +MD5 77c55bc35c89e312fd945a4ffdbfaaa0 numpy-0.9.8.ebuild 1557 +RMD160 536add2de5a6c0fe7ac2a1ef39788b074bfb0b0b numpy-0.9.8.ebuild 1557 +SHA256 6149347b0833687ffc279ac04eb163ac004363308e047f27fbd10b4a718a4458 numpy-0.9.8.ebuild 1557 +EBUILD numpy-1.0.1-r1.ebuild 3709 RMD160 6212dc4ee067817ac63bb91a174323963faa7a04 SHA1 d6ac77f766fd24638300beb3d2005cc9533af64a SHA256 0e10a0d2f99df63b4037de2693551560e6c890fe0a949b2f4316f942740c8d8b +MD5 a2df4193d75bb55bdbb97ec1c3f90ea7 numpy-1.0.1-r1.ebuild 3709 +RMD160 6212dc4ee067817ac63bb91a174323963faa7a04 numpy-1.0.1-r1.ebuild 3709 +SHA256 0e10a0d2f99df63b4037de2693551560e6c890fe0a949b2f4316f942740c8d8b numpy-1.0.1-r1.ebuild 3709 +EBUILD numpy-1.0.1.ebuild 2271 RMD160 fd436cc29e0389f1d2246a9340c23024246f0ecb SHA1 a5b046c89bb968a92c323c5f9dabd6438451f5cd SHA256 067aff264eccb0d9465715a91960c9f070ea04c1b1f1bd4500800aaec56a6af1 +MD5 62f4ec838aed7d95ba701c229ef98964 numpy-1.0.1.ebuild 2271 +RMD160 fd436cc29e0389f1d2246a9340c23024246f0ecb numpy-1.0.1.ebuild 2271 +SHA256 067aff264eccb0d9465715a91960c9f070ea04c1b1f1bd4500800aaec56a6af1 numpy-1.0.1.ebuild 2271 +MISC ChangeLog 3398 RMD160 6c44c91518f4e4d0ff5d5cddc852f0e23dc63aa2 SHA1 c5118d308ce313a1b9b939f451dd3d2bbd469f5b SHA256 754a536e516311da70ffbdf9cc55f3dd2996c6171e74e47fcadcaebe0cfedad5 +MD5 275225a17d3dd73fd7d4bf0be8119489 ChangeLog 3398 +RMD160 6c44c91518f4e4d0ff5d5cddc852f0e23dc63aa2 ChangeLog 3398 +SHA256 754a536e516311da70ffbdf9cc55f3dd2996c6171e74e47fcadcaebe0cfedad5 ChangeLog 3398 +MISC metadata.xml 747 RMD160 cab47e68bae4e3101d98c1efaca4b4383805febc SHA1 8c1ff40e2614000817816e4b6e358017dc4028df SHA256 6caffbc5bae045c139864dbfa489a297551fd436be33e4149af7df26dd85701c +MD5 c740759c27c25f2a83b5db69d594bd16 metadata.xml 747 +RMD160 cab47e68bae4e3101d98c1efaca4b4383805febc metadata.xml 747 +SHA256 6caffbc5bae045c139864dbfa489a297551fd436be33e4149af7df26dd85701c metadata.xml 747 MD5 a69679bccfb83100a3547c07b19bd72d files/digest-numpy-0.9.8 235 RMD160 8a348d126eee1dffdfcda72fe0e898faeb633801 files/digest-numpy-0.9.8 235 SHA256 5b8e9c649439c0084103ace433c75d26c1e2aa05fefddc972d8716240db48da3 files/digest-numpy-0.9.8 235 MD5 03507ab77c28afe5e3f47d2f3e5ee2f7 files/digest-numpy-1.0.1 238 RMD160 ea629f31974cb85325a558a41a3c5f8500cf636e files/digest-numpy-1.0.1 238 SHA256 683c8162153610de363d0aa90c583e5e83f4bb8fc815d6e0310c43f76cc19faa files/digest-numpy-1.0.1 238 +MD5 03507ab77c28afe5e3f47d2f3e5ee2f7 files/digest-numpy-1.0.1-r1 238 +RMD160 ea629f31974cb85325a558a41a3c5f8500cf636e files/digest-numpy-1.0.1-r1 238 +SHA256 683c8162153610de363d0aa90c583e5e83f4bb8fc815d6e0310c43f76cc19faa files/digest-numpy-1.0.1-r1 238 +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v1.4.6 (GNU/Linux) + +iD8DBQFF2XjBWc/Ciu+QQGkRApaQAJ0V+YhnGXNzCpOhqiqPPe1GLCW25QCfWko7 ++AKdQPOHkxuvwpsab5lBqro= +=/6mg +-----END PGP SIGNATURE----- diff --git a/dev-python/numpy/files/digest-numpy-1.0.1-r1 b/dev-python/numpy/files/digest-numpy-1.0.1-r1 new file mode 100644 index 000000000000..6bfc0c7d6798 --- /dev/null +++ b/dev-python/numpy/files/digest-numpy-1.0.1-r1 @@ -0,0 +1,3 @@ +MD5 13a29244cbe03e0d45e56d8d90ecb55d numpy-1.0.1.tar.gz 1249684 +RMD160 f3a0c55aa5add8c93f91eee1bb05ff555c0f2485 numpy-1.0.1.tar.gz 1249684 +SHA256 c90d6f0ced132ef5bcd0b2791e0697bef6d92de45c2c591ea472d9f795757067 numpy-1.0.1.tar.gz 1249684 diff --git a/dev-python/numpy/files/numpy-1.0.1-f2py.patch b/dev-python/numpy/files/numpy-1.0.1-f2py.patch new file mode 100644 index 000000000000..d64f1d647af2 --- /dev/null +++ b/dev-python/numpy/files/numpy-1.0.1-f2py.patch @@ -0,0 +1,42 @@ +diff -Nur numpy/f2py/f2py.1 numpy/f2py.new/f2py.1 +--- numpy/f2py/f2py.1 2006-07-26 21:04:19.000000000 +0100 ++++ numpy/f2py.new/f2py.1 2007-02-14 12:16:47.000000000 +0000 +@@ -184,7 +184,7 @@ + + Optional Numarray 0.9 or higher partially supported. + +-numpy_distutils from Scipy (can be downloaded from F2PY homepage) ++numpy_distutils from Numpy (can be downloaded from F2PY homepage) + .SH "SEE ALSO" + python(1) + .SH BUGS +@@ -200,10 +200,8 @@ + + Mailing list: http://cens.ioc.ee/mailman/listinfo/f2py-users/ + +-Scipy website: http://www.numpy.org ++Numpy website: http://numeric.numpy.org + .SH COPYRIGHT + Copyright (c) 1999, 2000, 2001, 2002, 2003, 2004, 2005 Pearu Peterson + .SH LICENSE + NumPy License +-.SH VERSION +-2.45.241 +diff -Nur numpy/f2py/setup.py numpy/f2py.new/setup.py +--- numpy/f2py/setup.py 2006-10-03 05:35:22.000000000 +0100 ++++ numpy/f2py.new/setup.py 2007-02-14 12:16:41.000000000 +0000 +@@ -35,13 +35,12 @@ + + config.add_data_files('src/fortranobject.c', + 'src/fortranobject.h', +- 'f2py.1' + ) + + config.make_svn_version_py() + + def generate_f2py_py(build_dir): +- f2py_exe = 'f2py'+os.path.basename(sys.executable)[6:] ++ f2py_exe = 'f2py' + if f2py_exe[-4:]=='.exe': + f2py_exe = f2py_exe[:-4] + '.py' + if 'bdist_wininst' in sys.argv and f2py_exe[-3:] != '.py': diff --git a/dev-python/numpy/metadata.xml b/dev-python/numpy/metadata.xml index f65da7436b19..90292d93dfc7 100644 --- a/dev-python/numpy/metadata.xml +++ b/dev-python/numpy/metadata.xml @@ -4,6 +4,15 @@ python sci -This package contains a powerful N-dimensional array object, sophisticated (broadcasting) functions, tools for integrating C/C++ and Fortran code, and useful linear algebra, Fourier transform, and random number capabilities. It derives from the old Numeric code base and can be used as a replacement for Numeric. It also adds the features introduced by numarray and can be used to replace numarray. +NumPy is a general-purpose array-processing package designed to +efficiently manipulate large multi-dimensional arrays of arbitrary +records without sacrificing too much speed for small multi-dimensional +arrays. NumPy is built on the Numeric code base and adds features +introduced by numarray as well as an extended C-API and the ability to +create arrays of arbitrary type. + +There are also basic facilities for discrete fourier transform, +basic linear algebra and random number generation. +It is the successor of Numeric and numarray. diff --git a/dev-python/numpy/numpy-0.9.8.ebuild b/dev-python/numpy/numpy-0.9.8.ebuild index acdc2d5c3272..19e6a9be9018 100644 --- a/dev-python/numpy/numpy-0.9.8.ebuild +++ b/dev-python/numpy/numpy-0.9.8.ebuild @@ -1,6 +1,6 @@ -# Copyright 1999-2006 Gentoo Foundation +# Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-python/numpy/numpy-0.9.8.ebuild,v 1.6 2006/09/26 07:52:55 dberkholz Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-python/numpy/numpy-0.9.8.ebuild,v 1.7 2007/02/19 10:15:18 bicatali Exp $ inherit distutils diff --git a/dev-python/numpy/numpy-1.0.1-r1.ebuild b/dev-python/numpy/numpy-1.0.1-r1.ebuild new file mode 100644 index 000000000000..47db8229831b --- /dev/null +++ b/dev-python/numpy/numpy-1.0.1-r1.ebuild @@ -0,0 +1,161 @@ +# Copyright 1999-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-python/numpy/numpy-1.0.1-r1.ebuild,v 1.1 2007/02/19 10:15:18 bicatali Exp $ + +NEED_PYTHON=2.3 + +inherit distutils eutils fortran + +MY_P=${P/_beta/b} +MY_P=${MY_P/_} +DESCRIPTION="Python array processing for numbers, strings, records, and objects" +SRC_URI="mirror://sourceforge/numpy/${MY_P}.tar.gz" +HOMEPAGE="http://numeric.scipy.org/" + +RDEPEND="!dev-python/f2py + lapack? ( || ( sci-libs/blas-atlas sci-libs/cblas-reference ) + virtual/lapack )" +DEPEND="${RDEPEND} + lapack? ( app-admin/eselect-cblas )" + +IUSE="lapack" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~ppc64 ~x86" +LICENSE="BSD" + +S="${WORKDIR}/${MY_P}" + +FORTRAN="g77 gfortran" + +numpy_configure() { + local mycblas + for d in $(eselect cblas show); do mycblas=${d}; done + if [[ -z "${mycblas/reference/}" ]] && [[ -z "${mycblas/atlas/}" ]]; then + ewarn "You need to set cblas to atlas or reference. Do:" + ewarn " eselect cblas set " + ewarn "where is atlas, threaded-atlas or reference" + die "setup failed" + fi + + [[ -z "${FFLAGS}" ]] && FFLAGS="${CFLAGS}" + + # remove default values + echo "# gentoo config" > site.cfg + + export BLAS=None + export LAPACK=None + export ATLAS=None + export PTATLAS=None + export MKL=None + + if use lapack; then + echo "[blas_opt]" >> site.cfg + case "${mycblas}" in + reference) + echo "include_dirs = /usr/include/cblas" >> site.cfg + echo "libraries = blas, cblas" >> site.cfg + unset BLAS + ;; + atlas|threaded-atlas) + echo "include_dirs = /usr/include/atlas" >> site.cfg + echo "libraries = blas, cblas, atlas" >> site.cfg + unset ATLAS + ;; + *) + local msg="Invalid cblas implementation: ${cblas}" + eerror "${msg}" + die "${msg}" + ;; + esac + echo "[lapack_opt]" >> site.cfg + echo "libraries = lapack" >> site.cfg + unset LAPACK + fi + # Map compilers to what numpy calls them (same as scipy) + case "${FORTRANC}" in + gfortran) + NUMPY_FC="gnu95" + ;; + g77) + NUMPY_FC="gnu" + ;; + g95) + NUMPY_FC="g95" + ;; + ifc|ifort) + if use ia64; then + NUMPY_FC="intele" + elif use amd64; then + NUMPY_FC="intelem" + else + NUMPY_FC="intel" + fi + ;; + *) + local msg="Invalid Fortran compiler \'${FORTRANC}\'" + eerror "${msg}" + die "${msg}" + ;; + esac + export NUMPY_FC + # http://projects.scipy.org/scipy/numpy/ticket/182 + # Can't set LDFLAGS + unset LDFLAGS +} + +src_unpack() { + fortran_src_unpack + cd "${S}" + # fix some paths and docs in f2py + epatch "${FILESDIR}"/${P}-f2py.patch + + # gentoo patch for ATLAS library names + sed -i \ + -e "s:'f77blas':'blas':g" \ + -e "s:'ptblas':'blas':g" \ + -e "s:'ptcblas':'cblas':g" \ + -e "s:'lapack_atlas':'lapack':g" \ + numpy/distutils/system_info.py +} + +src_compile() { + numpy_configure + distutils_src_compile \ + config_fc \ + --fcompiler=${NUMPY_FC} \ + --opt="${FFLAGS}" +} + +src_test() { + # see comment before the distutils_src_install + numpy_configure + ${python} setup.py install \ + --home="${S}"/test \ + --no-compile \ + config_fc \ + --fcompiler=${NUMPY_FC} \ + --opt="${FFLAGS}" || die "install test failed" + pushd "${S}"/test/lib*/python + PYTHONPATH=. "${python}" -c \ + "import numpy as n;import sys;sys.exit(n.test(10,3))" \ + > test.log 2>&1 + grep -q OK test.log || die "test failed" + popd + rm -rf test +} + +src_install() { + # we need to do the configuring again, for some reason, the + # variables are not kept within setup.py functions + numpy_configure + distutils_src_install \ + config_fc \ + --fcompiler=${NUMPY_FC} \ + --opt="${FFLAGS}" + + docinto numpy + dodoc numpy/doc/*txt + docinto f2py + dodoc numpy/f2py/docs/*txt + doman numpy/f2py/f2py.1 +} diff --git a/dev-python/numpy/numpy-1.0.1.ebuild b/dev-python/numpy/numpy-1.0.1.ebuild index b230cfb2ba2a..ffa2dfa1786c 100644 --- a/dev-python/numpy/numpy-1.0.1.ebuild +++ b/dev-python/numpy/numpy-1.0.1.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-python/numpy/numpy-1.0.1.ebuild,v 1.1 2007/01/31 08:36:28 nerdboy Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-python/numpy/numpy-1.0.1.ebuild,v 1.2 2007/02/19 10:15:18 bicatali Exp $ inherit distutils fortran @@ -83,7 +83,7 @@ src_compile() { export LAPACK=None export ATLAS=None fi - + # http://projects.scipy.org/scipy/numpy/ticket/182 # Can't set LDFLAGS unset LDFLAGS -- 2.26.2