[aur-requests] [PRQ#14062] Merge Request for python2-numpy-openblas
notify at aur.archlinux.org
notify at aur.archlinux.org
Wed Feb 6 23:32:44 UTC 2019
xia0er [1] filed a request to merge python2-numpy-openblas [2] into
python-numpy-openblas [3]:
I am maintaining both python2-numpy-openblas and python-numpy-openblas
and I am merging them into a split package, but I am not able to push
the split package because the python2-numpy-openblas already exists
(with the following error). Could you please help merge python2-numpy-
openblas into python-numpy-openblas, so I can push the split package
(PKGBUILD below)? Thanks!
[code]
## error message when push python-numpy-openblas/PKGBUILD
[xia0er at host python-numpy-openblas]$ git push
Enumerating objects: 7, done.
Counting objects: 100% (7/7), done.
Delta compression using up to 24 threads
Compressing objects: 100% (4/4), done.
Writing objects: 100% (4/4), 1.66 KiB | 1.66 MiB/s, done.
Total 4 (delta 1), reused 0 (delta 0)
remote: error: cannot overwrite package: python2-numpy-openblas
remote: error: hook declined to update refs/heads/master
To ssh://aur4.archlinux.org/python-numpy-openblas.git
! [remote rejected] master -> master (hook declined)
error: failed to push some refs to
'ssh://aur@aur4.archlinux.org/python-numpy-openblas.git'
[/code]
[code]
# PKGBUILD for the new split package
pkgbase=python-numpy-openblas
pkgname=("python-numpy-openblas" "python2-numpy-openblas")
pkgver=1.16.1
pkgrel=2
pkgdesc="Scientific tools for Python - built with openblas"
arch=("i686" "x86_64")
license=("custom")
url="http://numpy.scipy.org/"
makedepends=('cblas' 'lapack' 'python' 'python2' 'python-setuptools'
'python2-setuptools'
'gcc-fortran' 'python-nose' 'python2-nose' 'cython'
'cython2')
checkdepends=('python-pytest' 'python2-pytest')
options=('staticlibs')
source=("python-
numpy-$pkgver.tar.gz::https://github.com/numpy/numpy/archive/v$pkgver.tar.gz")
sha256sums=('59485e2d172c4c3e27307969ef2c1220b98efcf59cbf373bec41da19f7b69b92')
prepare() {
cp -a numpy-$pkgver{,-py2}
cd numpy-$pkgver-py2
sed -e "s|#![ ]*/usr/bin/python$|#!/usr/bin/python2|" \
-e "s|#![ ]*/usr/bin/env python$|#!/usr/bin/env python2|" \
-e "s|#![ ]*/bin/env python$|#!/usr/bin/env python2|" \
-i $(find . -name '*.py')
}
build() {
cd "$srcdir"/numpy-$pkgver
python setup.py build
cd "$srcdir"/numpy-$pkgver-py2
python2 setup.py build
}
check() {
# TODO: Fix fortran tests here (it works fine after installation)
cd "$srcdir"/numpy-$pkgver
python setup.py config_fc --fcompiler=gnu95 install
--root="$PWD/tmp_install" --optimize=1
cd "$PWD/tmp_install"
PATH="$PWD/usr/bin:$PATH" PYTHONPATH="$PWD/usr/lib/python3.7/site-
packages:$PYTHONPATH" python -c 'import numpy; numpy.test()'
cd "$srcdir"/numpy-$pkgver-py2
python2 setup.py config_fc --fcompiler=gnu95 install
--root="$PWD/tmp_install" --optimize=1
cd "$PWD/tmp_install"
PATH="$PWD/usr/bin:$PATH" PYTHONPATH="$PWD/usr/lib/python2.7/site-
packages:$PYTHONPATH" python2 -c 'import numpy; numpy.test()'
}
package_python2-numpy-openblas() {
depends=("python2" "cython2" "openblas-lapack")
optdepends=("python2-nose: testsuite")
provides=("python2-numpy=${pkgver}")
conflicts=("python2-numpy")
_pyver=2.7
export Atlas=None
export LDFLAGS="$LDFLAGS -shared"
echo "Building Python2"
cd "${srcdir}"/numpy-"$pkgver"-py2
python2 setup.py config_fc --fcompiler=gnu95 build
python2 setup.py config_fc --fcompiler=gnu95 install \
--prefix=/usr --root="${pkgdir}" --optimize=1
install -m755 -d "${pkgdir}/usr/share/licenses/python2-numpy"
install -m644 LICENSE.txt
"${pkgdir}/usr/share/licenses/python2-numpy/"
install -m755 -d "${pkgdir}/usr/include/python${_pyver}"
ln -sf /usr/lib/python${_pyver}/site-
packages/numpy/core/include/numpy
"${pkgdir}/usr/include/python${_pyver}/numpy"
mv "$pkgdir"/usr/bin/f2py{,2}
}
package_python-numpy-openblas() {
depends=("python" "cython" "openblas-lapack")
optdepends=("python-nose: testsuite")
provides=("python3-numpy=${pkgver}" "python-numpy=${pkgver}")
conflicts=("python3-numpy" "python-numpy")
_pyver=3.7
_pyinc=3.7m
export Atlas=None
export LDFLAGS="$LDFLAGS -shared"
echo "Building Python3"
cd "$srcdir/numpy-$pkgver"
python setup.py config_fc --fcompiler=gnu95 build
python setup.py config_fc --fcompiler=gnu95 install \
--prefix=/usr --root="${pkgdir}" --optimize=1
install -m755 -d "${pkgdir}/usr/share/licenses/python-numpy"
install -m644 LICENSE.txt "${pkgdir}/usr/share/licenses/python-
numpy/"
install -m755 -d "${pkgdir}/usr/include/python${_pyinc}"
ln -sf /usr/lib/python${_pyver}/site-
packages/numpy/core/include/numpy
"${pkgdir}/usr/include/python${_pyinc}/numpy"
}
[/code]
[1] https://aur.archlinux.org/account/xia0er/
[2] https://aur.archlinux.org/pkgbase/python2-numpy-openblas/
[3] https://aur.archlinux.org/pkgbase/python-numpy-openblas/
More information about the aur-requests
mailing list