Permalink
Browse files

Re-instate pre python-r1 eclass ebuild for numpy. Porting work to new…

… eclass continues.

Package-Manager: portage-2.2.0_alpha149
  • Loading branch information...
1 parent af15944 commit 850f694b0f5faf52f49a361c46d4c4737f5a63ca @kiwifb kiwifb committed Dec 18, 2012
Showing with 160 additions and 1 deletion.
  1. +5 −0 dev-python/numpy/ChangeLog
  2. +2 −1 dev-python/numpy/Manifest
  3. +153 −0 dev-python/numpy/numpy-1.7.0_pre20121217.ebuild
@@ -2,6 +2,11 @@
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
# $Header: /var/cvsroot/gentoo-x86/dev-python/numpy/ChangeLog,v 1.157 2012/05/04 15:12:15 patrick Exp $
+ 18 Dec 2012; François Bissey <francois.bissey@canterbury.ac.nz>
+ +numpy-1.7.0_pre20121217.ebuild:
+ re-instate numpy 1.7.0 using the old python eclass while work on the new
+ ebuild continues.
+
*numpy-1.7.0_pre20121217-r1 (17 Dec 2012)
17 Dec 2012; François Bissey <francois.bissey@canterbury.ac.nz>
@@ -16,5 +16,6 @@ DIST numpy-1.6.0-user.pdf 20021 SHA256 d5f157b19585d4db6aa170573e6b41c70d0750972
DIST numpy-c4c169c7cb32075386bd03463a908035c655784b.tar.gz 4806486 SHA256 23665e3c4f8d61a44de8306e8c5a6af45ef8bf3ee297782e4f84fb68fcf4b73e SHA512 aa06344eadf042cfdd4fbcc2a670769aee44be14a84737af184508d8e327b76278e0d1d768da482719b0c81ff2dbd59a31f9fdfc2b3c7b4f5e6a359bb42aab4c WHIRLPOOL 0a9736603ac58e43052e212db800a0a717a8410465d80703265508d68bfbdae159cb6f18d891b758fe3c73671fa4bdb9169c93ee07e2a55d5c31aba6a05875d4
EBUILD numpy-1.5.1.ebuild 5381 SHA256 e498ce9e5155b89d88fb3bd8e73413c1ac790cf421ecea02bb7351e031d6efe6 SHA512 c58a5a2dade2ea25a06ce776dc98b92d232923984775ddf77cee7120584a72414fa123d89c9ba562cc2e50dc1d731cb5269267eb724d90cfb8c170d3fa7d7880 WHIRLPOOL 1b5bb57e67e65393eb4f80f90fcc39b09b4f16c606ada864b0bfa2ebbe5a9d5d1bc9585f7bc072dd153fe13a33cba5e8a486d5746fb20f8abb9947ecd961838c
EBUILD numpy-1.7.0_pre20121217-r1.ebuild 4303 SHA256 17a3308a438ccd4acc17b8321077638c836d5b05858d9b9d6afbffbdb4d08fe0 SHA512 dff1b1c2a05066af545128f43b78de91a968392231972ee902a4395ce1fefb9a509b8f7092be35330d46bf16daf1ea45a527e4eb2be00eb5f0f30413e15fea21 WHIRLPOOL 1ea9588c51b391e354b27a7d8e947de11feaebc5e89fcaab3b166e01a6ecd40cebcdd7ade574f5f666921af6fd9bb61dfe7998d6da119f44d5746edb3b49ab91
-MISC ChangeLog 23324 SHA256 4786dcadbd88b4b0797e079bc71f7285db8f9b4bf6ea54c50d52ffec39017ac6 SHA512 586094a07431100abf5b5fa369216573bf05d08516ef77a46c315af033093a6f69e274d2b3401df915b74ad5b6f84c5c3d541dc441ec17c99078e7193f01d32a WHIRLPOOL 947d920e9daded8dbdcc23be51c9e2c196a6b60dd7bc58d1642ffd754acb9cd2a4f7377dd9997918aad71e2d7eb7f9a679af9e469bb01e0fdc49d938778c53e2
+EBUILD numpy-1.7.0_pre20121217.ebuild 4241 SHA256 5633bedf01ed42295f5a5bd8d314389de2def0a75f5a0e91d586659b4bf1ccd3 SHA512 94c98ce3c81edf9b5db78e634da49ced36f064789ab229b8bd230fdd3d189d8985e168d7231e9d6977dd4aff20893ece5bb9591ee4215ac7f972a3677b3b5ef3 WHIRLPOOL 03e45e0a895f5b3c67dcec147b690d92e95eaf37f2457dac8046ed499310a566bb927a4601f2ca72c635f5d56155497be7c70817df7c25b9581c3f6834e049b8
+MISC ChangeLog 23522 SHA256 922f3261c696d618cba782e80b0ed5e4f827fb3cc610895e9ef3340171d59456 SHA512 bee5687f4eddc7d8f52c7558065efe074522e7cccfb1998990c42952b22d43618c0d3f3d6a94873da64efb5e48d557663980c1413c2174d95df12a98652a42ef WHIRLPOOL b5c2a0f04c8d4ee9aa08fdcd57737ec8a343489bd6103a87d58ec31c61277d32c37da88e418680469dda405c30b9e0d45b33403461259b5cb1d92131491078ca
MISC metadata.xml 615 SHA256 f50bbda17ece7ce10e62c739225822877af67a95b3fb9b6a861ee31db489cab3 SHA512 ffe2529b21b7a5ae0e201e735680603653fe32b2426a2c5cefe22409e4116e32d9e3ab3684192fa56f03e269bcc9ff333a511c0b5499246195c9a011b5779db0 WHIRLPOOL 6b43f449e642d51c693dbcb1c09af5e11dde1959c692073b8e7b366c61746e980ac966eede3ac7cc2cdbf7b7f41a092f8bdbe604cd5f477a7e6a43fc4129e2f7
@@ -0,0 +1,153 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-python/numpy/numpy-1.6.2.ebuild,v 1.6 2012/10/16 18:38:04 jlec Exp $
+
+EAPI=4
+
+PYTHON_DEPEND="*::3.2"
+SUPPORT_PYTHON_ABIS="1"
+RESTRICT_PYTHON_ABIS="3.3 *-jython *-pypy-*"
+
+FORTRAN_NEEDED=lapack
+
+inherit distutils eutils flag-o-matic fortran-2 toolchain-funcs versionator
+
+DOC_P="${PN}-1.6.0"
+GITTAG="c4c169c7cb32075386bd03463a908035c655784b"
+MY_P="${PN}-${GITTAG}"
+
+DESCRIPTION="Fast array and numerical python library"
+HOMEPAGE="http://numpy.scipy.org/ http://pypi.python.org/pypi/numpy"
+SRC_URI="https://github.com/numpy/numpy/archive/${GITTAG}.tar.gz -> ${MY_P}.tar.gz
+ doc? (
+ http://docs.scipy.org/doc/${DOC_P}/numpy-html.zip -> ${DOC_P}-html.zip
+ http://docs.scipy.org/doc/${DOC_P}/numpy-ref.pdf -> ${DOC_P}-ref.pdf
+ http://docs.scipy.org/doc/${DOC_P}/numpy-user.pdf -> ${DOC_P}-user.pdf
+ )"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
+IUSE="doc lapack test"
+
+RDEPEND="
+ dev-python/setuptools
+ lapack? ( virtual/cblas virtual/lapack )"
+DEPEND="${RDEPEND}
+ doc? ( app-arch/unzip )
+ lapack? ( virtual/pkgconfig )
+ test? ( >=dev-python/nose-0.10 )"
+
+PYTHON_CFLAGS=("* + -fno-strict-aliasing")
+
+# Build system installs f2py${Python_version} scripts.
+PYTHON_NONVERSIONED_EXECUTABLES=("/usr/bin/f2py[[:digit:]]+\.[[:digit:]]+")
+
+DOCS="COMPATIBILITY DEV_README.txt THANKS.txt"
+
+S="${WORKDIR}/${MY_P}"
+
+pkg_setup() {
+ fortran-2_pkg_setup
+ python_pkg_setup
+
+ # See progress in http://projects.scipy.org/scipy/numpy/ticket/573
+ # with the subtle difference that we don't want to break Darwin where
+ # -shared is not a valid linker argument
+ if [[ ${CHOST} != *-darwin* ]]; then
+ append-ldflags -shared
+ fi
+
+ # only one fortran to link with:
+ # linking with cblas and lapack library will force
+ # autodetecting and linking to all available fortran compilers
+ if use lapack; then
+ append-fflags -fPIC
+ NUMPY_FCONFIG="config_fc --noopt --noarch"
+ # workaround bug 335908
+ [[ $(tc-getFC) == *gfortran* ]] && NUMPY_FCONFIG+=" --fcompiler=gnu95"
+ fi
+}
+
+src_unpack() {
+ unpack ${MY_P}.tar.gz
+ if use doc; then
+ unzip -qo "${DISTDIR}"/${DOC_P}-html.zip -d html || die
+ fi
+}
+
+pc_incdir() {
+ pkg-config --cflags-only-I $@ | \
+ sed -e 's/^-I//' -e 's/[ ]*-I/:/g'
+}
+
+pc_libdir() {
+ pkg-config --libs-only-L $@ | \
+ sed -e 's/^-L//' -e 's/[ ]*-L/:/g'
+}
+
+pc_libs() {
+ pkg-config --libs-only-l $@ | \
+ sed -e 's/[ ]-l*\(pthread\|m\)[ ]*//g' \
+ -e 's/^-l//' -e 's/[ ]*-l/,/g'
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-1.7.0-atlas.patch
+
+ if use lapack; then
+ append-ldflags "$(pkg-config --libs-only-other cblas lapack)"
+ local libdir="${EPREFIX}"/usr/$(get_libdir)
+ # make sure _dotblas.so gets built
+ sed -i -e '/NO_ATLAS_INFO/,+1d' numpy/core/setup.py || die
+ cat >> site.cfg <<-EOF
+ [blas]
+ include_dirs = $(pc_incdir cblas)
+ library_dirs = $(pc_libdir cblas blas):${libdir}
+ blas_libs = $(pc_libs cblas blas)
+ [lapack]
+ library_dirs = $(pc_libdir lapack):${libdir}
+ lapack_libs = $(pc_libs lapack)
+ EOF
+ else
+ export {ATLAS,PTATLAS,BLAS,LAPACK,MKL}=None
+ fi
+
+ export CC="$(tc-getCC) ${CFLAGS}"
+}
+
+src_compile() {
+ distutils_src_compile ${NUMPY_FCONFIG}
+}
+
+src_test() {
+ testing() {
+ "$(PYTHON)" setup.py ${NUMPY_FCONFIG} build -b "build-${PYTHON_ABI}" install \
+ --home="${S}/test-${PYTHON_ABI}" --no-compile || die "install test failed"
+ pushd "${S}/test-${PYTHON_ABI}/"lib* > /dev/null
+ PYTHONPATH=python "$(PYTHON)" -c "import numpy; numpy.test()" 2>&1 | tee test.log
+ grep -Eq "^(ERROR|FAIL):" test.log && return 1
+ popd > /dev/null
+ rm -fr test-${PYTHON_ABI}
+ }
+ python_execute_function testing
+}
+
+src_install() {
+ distutils_src_install ${NUMPY_FCONFIG}
+
+ delete_txt() {
+ rm -f "${ED}"$(python_get_sitedir)/numpy/*.txt
+ }
+ python_execute_function -q delete_txt
+
+ docinto f2py
+ dodoc numpy/f2py/docs/*.txt
+ doman numpy/f2py/f2py.1
+
+ if use doc; then
+ insinto /usr/share/doc/${PF}
+ doins -r "${WORKDIR}"/html
+ doins "${DISTDIR}"/${DOC_P}*pdf
+ fi
+}

0 comments on commit 850f694

Please sign in to comment.