summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2020-06-05 14:41:41 +0200
committerMichał Górny <mgorny@gentoo.org>2020-06-05 15:13:49 +0200
commit72a069bb9e59119af22fb57bd48b895db2b16b95 (patch)
tree7b769889188c5581e11ce8bbb783e2a156996e52 /dev-python/pybind11/pybind11-2.5.0.ebuild
parentmedia-libs/assimp: Drop 5.0.0 (diff)
downloadgentoo-72a069bb9e59119af22fb57bd48b895db2b16b95.tar.gz
gentoo-72a069bb9e59119af22fb57bd48b895db2b16b95.tar.bz2
gentoo-72a069bb9e59119af22fb57bd48b895db2b16b95.zip
dev-python/pybind11: Fix running tests and clean up
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'dev-python/pybind11/pybind11-2.5.0.ebuild')
-rw-r--r--dev-python/pybind11/pybind11-2.5.0.ebuild62
1 files changed, 19 insertions, 43 deletions
diff --git a/dev-python/pybind11/pybind11-2.5.0.ebuild b/dev-python/pybind11/pybind11-2.5.0.ebuild
index 4cbab835b55a..7c2d0366656e 100644
--- a/dev-python/pybind11/pybind11-2.5.0.ebuild
+++ b/dev-python/pybind11/pybind11-2.5.0.ebuild
@@ -14,74 +14,50 @@ SRC_URI="https://github.com/pybind/pybind11/archive/v${PV}.tar.gz -> ${P}.tar.gz
LICENSE="BSD"
SLOT="0"
KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
-IUSE="doc test"
-DEPEND="
- ${PYTHON_DEPS}
- doc? (
- dev-python/breathe[${PYTHON_USEDEP}]
- <dev-python/sphinx-3[${PYTHON_USEDEP}]
- dev-python/sphinx_rtd_theme[${PYTHON_USEDEP}]
- )
-"
RDEPEND="
- ${PYTHON_DEPS}
dev-cpp/eigen:3
"
-REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+distutils_enable_sphinx docs \
+ '<dev-python/sphinx-3' \
+ dev-python/breathe \
+ dev-python/sphinx_rtd_theme
+distutils_enable_tests pytest
DOCS=( README.md CONTRIBUTING.md ISSUE_TEMPLATE.md )
-#I can't make tests do anything
-RESTRICT=test
-
-pkg_setup() {
- use doc && DISTUTILS_ALL_SUBPHASE_IMPLS=( 'python3_7' )
-}
-
python_prepare_all() {
export PYBIND11_USE_CMAKE=1
+
+ # broken with scipy-1.4.1
+ sed -i -e 's:test_sparse:_&:' tests/test_eigen.py || die
+
cmake_src_prepare
distutils-r1_python_prepare_all
}
-python_configure_all() {
+python_configure() {
local mycmakeargs=(
+ # disable forced lto
+ -DPYBIND11_LTO_CXX_FLAGS=
-DPYBIND11_INSTALL=ON
-DPYBIND11_TEST=$(usex test)
)
cmake_src_configure
}
-python_compile_all() {
+python_compile() {
+ distutils-r1_python_compile
# Compilation only does anything for tests
use test && cmake_src_compile
-
- # documentation is not covered by cmake, but has it's own makefile
- # using sphinx
- if use doc; then
- python_setup 'python3_7'
- pushd "${S}"/docs || die
- emake info man html
- popd || die
- fi
}
-python_install_all() {
- cmake_src_install
- if use doc; then
- python_setup
- local HTML_DOCS=( "${S}"/docs/.build/html/. )
-
- # install man and info pages
- doman "${S}"/docs/.build/man/pybind11.1
- doinfo "${S}"/docs/.build/texinfo/pybind11.info
- fi
-
- distutils-r1_python_install_all
+python_test() {
+ cmake_build check
}
-python_test_all() {
- cmake_src_test
+python_install() {
+ distutils-r1_python_install
+ cmake_src_install
}