# Maintainer: Carlo Landmeter pkgname=py3-pybind11 _pkgname=pybind11 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" makedepends=" python3-dev py3-setuptools cmake boost-dev " 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" python3 setup.py build 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 } check() { make -C build-cmake check } package() { python3 setup.py install --prefix=/usr --root="$pkgdir" \ --install-headers=/usr/include/pybind11 --skip-build DESTDIR="$pkgdir" make -C build-cmake install } dev() { depends_dev="$pkgname" default_dev } sha512sums="04542fe9dca2ffdb86c15698a4bbc041446a9f11970092e89a482ae0ff64c932f62fff8f437b98bdaa006c1fccabddd79f0c7e376f27daed2150b1d2f988e8aa py3-pybind11-2.3.0.tar.gz"