diff options
author | Leo <thinkabit.ukim@gmail.com> | 2019-08-31 03:12:03 -0300 |
---|---|---|
committer | Leo <thinkabit.ukim@gmail.com> | 2019-09-03 06:55:05 -0300 |
commit | 0593f5a76c7f6cef0bb53a3d45351825976fe7aa (patch) | |
tree | 921a05bd22c3324454c76257426e862c4bbbc541 /community/py3-pybind11 | |
parent | 5bdf7f13eead989a3017689596520620cfe962d3 (diff) | |
download | aports-0593f5a76c7f6cef0bb53a3d45351825976fe7aa.tar.bz2 aports-0593f5a76c7f6cef0bb53a3d45351825976fe7aa.tar.xz |
community/py3-pybind11: upgrade to 2.3.0
- Drop py2
- Install cmake files
- Split -dev subpackage
- Run tests
Diffstat (limited to 'community/py3-pybind11')
-rw-r--r-- | community/py3-pybind11/APKBUILD | 70 |
1 files changed, 31 insertions, 39 deletions
diff --git a/community/py3-pybind11/APKBUILD b/community/py3-pybind11/APKBUILD index b8a7a172d6..ae65f93c8c 100644 --- a/community/py3-pybind11/APKBUILD +++ b/community/py3-pybind11/APKBUILD @@ -1,66 +1,58 @@ # Maintainer: Carlo Landmeter <clandmeter@alpinelinux.org> -pkgname=py-pybind11 +pkgname=py3-pybind11 _pkgname=pybind11 -pkgver=2.2.4 -pkgrel=1 +pkgver=2.3.0 +pkgrel=0 pkgdesc="Seamless operability between C++11 and Python" url="https://github.com/pybind/pybind11" arch="noarch" license="MPL-2.0" -depends="" makedepends=" - python2-dev python3-dev - py-setuptools + py3-setuptools cmake - pytest boost-dev " -subpackages="py3-${pkgname#py-}:_py3 py2-${pkgname#py-}:_py2" +checkdepends=" + py3-pytest + " +subpackages="$pkgname-dev" source="$pkgname-$pkgver.tar.gz::https://github.com/pybind/pybind11/archive/v$pkgver.tar.gz" builddir="$srcdir/$_pkgname-$pkgver" +replaces="py-pybind11" # Backwards compatibility +provides="py-pybind11=$pkgver-r$pkgrel" # Backwards compatibility + build() { # fails to build with fortify headers enabled # https://github.com/pybind/pybind11/issues/1650 export CXXFLAGS="$CXXFLAGS -U_FORTIFY_SOURCE" - local python= - for python in python2 python3; do - cd "$builddir" - $python setup.py build - mkdir "$builddir"/$python - cd "$builddir"/$python - cmake -DPYTHON_EXECUTABLE=/usr/bin/$python \ - -DCMAKE_INSTALL_PREFIX=/usr \ - -DUSE_PYTHON_INCLUDE_DIR=FALSE .. - make - done -} -package() { - mkdir -p "$pkgdir" -} + python3 setup.py build -_py2() { - replaces="$pkgname" - depends="${depends//py-/py2-}" - _py python2 + mkdir -p "$builddir"/build-cmake + cd "$builddir"/build-cmake + cmake .. \ + -DPYTHON_EXECUTABLE=/usr/bin/python3 \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DUSE_PYTHON_INCLUDE_DIR=FALSE + make } -_py3() { - depends="${depends//py-/py3-}" - _py python3 +check() { + make -C build-cmake check } -_py() { - local python="$1" - pkgdesc="$pkgdesc (for $python)" - depends="$depends $python" - install_if="$pkgname=$pkgver-r$pkgrel $python" +package() { + python3 setup.py install --prefix=/usr --root="$pkgdir" \ + --install-headers=/usr/include/pybind11 --skip-build + + DESTDIR="$pkgdir" make -C build-cmake install +} - cd "$builddir" - $python setup.py install --prefix=/usr --root="$subpkgdir" \ - --install-headers='/usr/include/pybind11' --skip-build +dev() { + depends_dev="$pkgname" + default_dev } -sha512sums="6bddf5c885ff92a3e373bcedc6574dfefe8be9ebb6176c6c96d475457466c76bfb982c6df4066cb0fbead4b867f87dbc4fbc1605c80852635016f614330ce041 py-pybind11-2.2.4.tar.gz" +sha512sums="04542fe9dca2ffdb86c15698a4bbc041446a9f11970092e89a482ae0ff64c932f62fff8f437b98bdaa006c1fccabddd79f0c7e376f27daed2150b1d2f988e8aa py3-pybind11-2.3.0.tar.gz" |