mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2025-01-17 23:34:07 +00:00
community/pybind11 to 2.3.0-1
This commit is contained in:
parent
c38d617baa
commit
4548f3c4ae
1 changed files with 13 additions and 34 deletions
|
@ -1,4 +1,4 @@
|
|||
# Maintainer : Daniel Bermond < gmail-com: danielbermond >
|
||||
# Maintainer : Daniel Bermond <dbermond@archlinux.org>
|
||||
# Maintainer : Santiago Torres-Arias <santiago@archlinux.org>
|
||||
# Contributor: Matthew Ellison <matt+aur@arroyonetworks.com>
|
||||
|
||||
|
@ -6,50 +6,33 @@
|
|||
# - disable lto via -DPYBIND11_LTO_CXX_FLAGS=""
|
||||
|
||||
pkgname=pybind11
|
||||
pkgver=2.2.4
|
||||
pkgrel=5
|
||||
pkgver=2.3.0
|
||||
pkgrel=1
|
||||
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')
|
||||
optdepends=('python: for python bindings')
|
||||
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')
|
||||
'python-sphinx' 'python-sphinx_rtd_theme' 'python-breathe')
|
||||
checkdepends=('python-py' 'python-pluggy' 'python-hypothesis' 'python-numpy' 'python-scipy')
|
||||
source=("${pkgname}-${pkgver}.tar.gz"::"https://github.com/pybind/pybind11/archive/v${pkgver}.tar.gz")
|
||||
sha256sums=('b69e83658513215b8d1443544d0549b7d231b9f201f6fc787a2b2218b408181e')
|
||||
sha256sums=('0f34838f2c8024a6765168227ba587b3687729ebf03dc912f88ff75c7aa9cfe8')
|
||||
|
||||
prepare() {
|
||||
cd "${pkgname}-${pkgver}"
|
||||
|
||||
mkdir -p build-cmake{,-py2}
|
||||
mkdir -p build-cmake
|
||||
}
|
||||
|
||||
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' \
|
||||
-DPYBIND11_LTO_CXX_FLAGS="" \
|
||||
-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' \
|
||||
-DPYBIND11_LTO_CXX_FLAGS="" \
|
||||
-DPYTHON_EXECUTABLE:FILEPATH='/usr/bin/python2.7' \
|
||||
-Wno-dev \
|
||||
..
|
||||
cmake -DCMAKE_INSTALL_PREFIX:PATH='/usr' -DPYBIND11_LTO_CXX_FLAGS="" -Wno-dev ..
|
||||
make all mock_install
|
||||
|
||||
# manpage
|
||||
|
@ -60,28 +43,24 @@ build () {
|
|||
check() {
|
||||
cd "${pkgname}-${pkgver}"
|
||||
|
||||
make -C build-cmake check # python3 tests
|
||||
make -C build-cmake-py2 check # python2 tests
|
||||
make -C build-cmake check
|
||||
}
|
||||
|
||||
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
|
||||
# man page
|
||||
cd "${srcdir}/${pkgname}-${pkgver}/docs/.build/man"
|
||||
install -D -m644 "${pkgname}.1" -t "${pkgdir}/usr/share/man/man1"
|
||||
install -D -m644 "${pkgname}.1" "${pkgdir}/usr/share/man/man7/${pkgname}.7"
|
||||
sed -i '/^\.TH/s/"1"/"7"/' "${pkgdir}/usr/share/man/man7/${pkgname}.7"
|
||||
|
||||
# license
|
||||
cd "${srcdir}/${pkgname}-${pkgver}"
|
||||
|
|
Loading…
Reference in a new issue