From d9830419c519abd8d7414a36acd2faaa48a8c224 Mon Sep 17 00:00:00 2001 From: Alessio Sergi Date: Mon, 17 Oct 2016 17:30:30 +0200 Subject: [PATCH] python-numpy: rebuild for Python 3.5 Switch to python3-* pkgs. Convert python3.4-* pkg into dummy pkg. --- .../patches/numpy_f2py_setup.patch | 11 ++++ srcpkgs/python-numpy/template | 50 ++++++++++--------- srcpkgs/python3-numpy | 1 + 3 files changed, 39 insertions(+), 23 deletions(-) create mode 100644 srcpkgs/python-numpy/patches/numpy_f2py_setup.patch create mode 120000 srcpkgs/python3-numpy diff --git a/srcpkgs/python-numpy/patches/numpy_f2py_setup.patch b/srcpkgs/python-numpy/patches/numpy_f2py_setup.patch new file mode 100644 index 00000000000..f743caad748 --- /dev/null +++ b/srcpkgs/python-numpy/patches/numpy_f2py_setup.patch @@ -0,0 +1,11 @@ +--- numpy/f2py/setup.py.orig ++++ numpy/f2py/setup.py +@@ -55,7 +55,7 @@ def configuration(parent_package='', top + 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/srcpkgs/python-numpy/template b/srcpkgs/python-numpy/template index 5392d0ca37e..eccd2cee66d 100644 --- a/srcpkgs/python-numpy/template +++ b/srcpkgs/python-numpy/template @@ -1,12 +1,11 @@ # Template file for 'python-numpy' pkgname=python-numpy version=1.11.2 -revision=1 +revision=2 wrksrc="numpy-${version}" build_style=python-module -python_versions="2.7 3.4" -hostmakedepends="python-setuptools python3.4-setuptools gcc-fortran" -makedepends="python-devel python3.4-devel lapack-devel cblas-devel" +hostmakedepends="python-setuptools python3-setuptools gcc-fortran" +makedepends="python-devel python3-devel lapack-devel cblas-devel" pycompile_module="numpy" short_desc="Fast and sophisticated array facility to Python2" maintainer="Alessio Sergi " @@ -16,40 +15,45 @@ distfiles="${PYPI_SITE}/n/numpy/numpy-${version}.tar.gz" checksum=04db2fbd64e2e7c68e740b14402b25af51418fc43a59d9e54172b38b906b0f69 alternatives=" - numpy:f2py:/usr/bin/f2py2.7 - numpy:f2py.1:/usr/share/man/man1/f2py2.7.1" + numpy:f2py:/usr/bin/f2py2 + numpy:f2py.1:/usr/share/man/man1/f2py2.1" export ATLAS=None LDFLAGS="-shared" post_install() { # create compat symlinks for .h files - vmkdir usr/include/python2.7 - ln -sfr ${DESTDIR}/usr/lib/python2.7/site-packages/numpy/core/include/numpy \ - ${DESTDIR}/usr/include/python2.7 - vmkdir usr/include/python3.4m - ln -sfr ${DESTDIR}/usr/lib/python3.4/site-packages/numpy/core/include/numpy \ - ${DESTDIR}/usr/include/python3.4m + vmkdir ${py2_inc} + ln -sfr ${DESTDIR}/${py2_sitelib}/numpy/core/include/numpy \ + ${DESTDIR}/${py2_inc} + vmkdir ${py3_inc} + ln -sfr ${DESTDIR}/${py3_sitelib}/numpy/core/include/numpy \ + ${DESTDIR}/${py3_inc} # create versioned man pages - vman doc/f2py/f2py.1 f2py2.7.1 - vman doc/f2py/f2py.1 f2py3.4.1 + vman doc/f2py/f2py.1 f2py2.1 + vman doc/f2py/f2py.1 f2py3.1 vlicense LICENSE.txt LICENSE } -python3.4-numpy_package() { +python3-numpy_package() { alternatives=" - numpy:f2py:/usr/bin/f2py3.4 - numpy:f2py.1:/usr/share/man/man1/f2py3.4.1" - pycompile_version="3.4" + numpy:f2py:/usr/bin/f2py3 + numpy:f2py.1:/usr/share/man/man1/f2py3.1" pycompile_module="numpy" - short_desc="${short_desc/Python2/Python3.4}" + replaces="python3.4-numpy>=0" + short_desc="${short_desc/Python2/Python3}" pkg_install() { - vmove usr/bin/f2py3.4 - vmove usr/lib/python3.4 - vmove usr/include/python3.4m - vmove usr/share/man/man1/f2py3.4.1 + vmove usr/bin/f2py3 + vmove ${py3_sitelib} + vmove ${py3_inc} + vmove usr/share/man/man1/f2py3.1 vlicense LICENSE.txt LICENSE } } +python3.4-numpy_package() { + build_style=meta + short_desc="${short_desc/Python2/Python3.4} (transitional dummy package)" + depends="python3-numpy>=${version}_${revision}" +} diff --git a/srcpkgs/python3-numpy b/srcpkgs/python3-numpy new file mode 120000 index 00000000000..69b83ae14d8 --- /dev/null +++ b/srcpkgs/python3-numpy @@ -0,0 +1 @@ +python-numpy \ No newline at end of file