[arch-commits] Commit in pybind11/repos (community-any community-any/PKGBUILD)
Santiago Torres-Arias
sangy at archlinux.org
Sun Nov 18 02:08:10 UTC 2018
Date: Sunday, November 18, 2018 @ 02:08:09
Author: sangy
Revision: 408631
archrelease: copy trunk to community-any
Added:
pybind11/repos/community-any/
pybind11/repos/community-any/PKGBUILD
(from rev 408630, pybind11/trunk/PKGBUILD)
----------+
PKGBUILD | 84 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 84 insertions(+)
Copied: pybind11/repos/community-any/PKGBUILD (from rev 408630, pybind11/trunk/PKGBUILD)
===================================================================
--- community-any/PKGBUILD (rev 0)
+++ community-any/PKGBUILD 2018-11-18 02:08:09 UTC (rev 408631)
@@ -0,0 +1,84 @@
+# Maintainer : Daniel Bermond < gmail-com: danielbermond >
+# Maintainer : Santiago Torres-Arias <santiago at archlinux.org>
+# Contributor: Matthew Ellison <matt+aur at arroyonetworks.com>
+
+pkgname=pybind11
+pkgver=2.2.4
+pkgrel=5
+pkgdesc='A lightweight header-only library that exposes C++ types in Python and vice versa'
+arch=('any')
+url='https://pybind11.readthedocs.org/'
+license=('BSD')
+optdepends=('python: to target bindings supporting python 3'
+ 'python2: to target bindings supporting python 2')
+makedepends=('cmake' 'boost' 'eigen' 'python' 'python-setuptools' 'python-pytest'
+'python-sphinx' 'python2' 'python2-setuptools' 'python2-pytest' 'python-breathe')
+checkdepends=('python-numpy' 'python-scipy' 'python2-numpy' 'python2-scipy')
+source=("${pkgname}-${pkgver}.tar.gz"::"https://github.com/pybind/pybind11/archive/v${pkgver}.tar.gz")
+sha256sums=('b69e83658513215b8d1443544d0549b7d231b9f201f6fc787a2b2218b408181e')
+
+prepare() {
+ cd "${pkgname}-${pkgver}"
+
+ mkdir -p build-cmake{,-py2}
+}
+
+build () {
+ local _pythonver
+ _pythonver="$(python -c 'import sys; print("%s.%s" %sys.version_info[0:2])')"
+
+ # python modules
+ cd "${pkgname}-${pkgver}"
+ python setup.py build
+
+ # cmake files and tests
+ cd build-cmake
+ cmake \
+ -DCMAKE_INSTALL_PREFIX='/usr' \
+ -DPYTHON_EXECUTABLE:FILEPATH="/usr/bin/python${_pythonver}" \
+ -Wno-dev \
+ ..
+ make all mock_install
+ cd "${srcdir}/${pkgname}-${pkgver}/build-cmake-py2"
+ cmake \
+ -DCMAKE_INSTALL_PREFIX='/usr' \
+ -DPYTHON_EXECUTABLE:FILEPATH='/usr/bin/python2.7' \
+ -Wno-dev \
+ ..
+ make all mock_install
+
+ # manpage
+ cd "${srcdir}/${pkgname}-${pkgver}/docs"
+ make man
+}
+
+check() {
+ cd "${pkgname}-${pkgver}"
+
+ make -C build-cmake check # python3 tests
+ make -C build-cmake-py2 check # python2 tests
+}
+
+package() {
+ cd "${pkgname}-${pkgver}"
+
+ local _pythonver
+ _pythonver="$(python -c 'import sys; print("%s.%s" %sys.version_info[0:2])')"
+
+ # python modules
+ python setup.py install --root="$pkgdir" --install-headers='/usr/include/pybind11' --skip-build --optimize='1'
+ python2 setup.py install --root="$pkgdir" --install-headers='/usr/include/pybind11' --skip-build --optimize='1'
+
+ # cmake files
+ mkdir -p "${pkgdir}/usr/share/cmake/${pkgname}"
+ cd build-cmake/mock_install/share/cmake/pybind11
+ install -m644 *.cmake "${pkgdir}/usr/share/cmake/${pkgname}"
+
+ # manpage
+ cd "${srcdir}/${pkgname}-${pkgver}/docs/.build/man"
+ install -D -m644 "${pkgname}.1" -t "${pkgdir}/usr/share/man/man1"
+
+ # license
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ install -D -m644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
+}
More information about the arch-commits
mailing list