summaryrefslogtreecommitdiff
blob: bc753e7fb7965d301003bd219d5f658e6c6c8f34 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

DISTUTILS_USE_PEP517=setuptools
PYPI_NO_NORMALIZE=1
PYTHON_COMPAT=( python3_{9..11} )

inherit distutils-r1 pypi

DESCRIPTION="Improved build system generator for Python C/C++/Fortran/Cython extensions"
HOMEPAGE="
	https://github.com/scikit-build/scikit-build/
	https://pypi.org/project/scikit-build/
"

SLOT="0"
LICENSE="MIT"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"

RDEPEND="
	dev-python/distro[${PYTHON_USEDEP}]
	dev-python/packaging[${PYTHON_USEDEP}]
	>=dev-python/setuptools-42.0.0[${PYTHON_USEDEP}]
	>=dev-python/wheel-0.32.0[${PYTHON_USEDEP}]
"

BDEPEND="
	test? (
		>=dev-python/cython-0.25.1[${PYTHON_USEDEP}]
		>=dev-python/pytest-mock-1.10.4[${PYTHON_USEDEP}]
		>=dev-python/pytest-virtualenv-1.2.5[${PYTHON_USEDEP}]
		dev-python/requests[${PYTHON_USEDEP}]
		dev-python/virtualenv[${PYTHON_USEDEP}]
	)
"

distutils_enable_sphinx docs \
	dev-python/sphinx-rtd-theme \
	dev-python/sphinx-issues
distutils_enable_tests pytest

src_prepare() {
	# not packaged
	sed -i -e '/cmakedomain/d' docs/conf.py || die
	distutils-r1_src_prepare
}

python_test() {
	local EPYTEST_DESELECT=(
		# sandbox violations
		tests/test_hello_cpp.py::test_hello_develop
		tests/test_issue274_support_default_package_dir.py
		tests/test_issue274_support_one_package_without_package_dir.py
		tests/test_issue334_configure_cmakelists_non_cp1252_encoding.py
		tests/test_pep518.py
		# This fails because of additional item setup.py in sources
		tests/test_include_exclude_data.py::test_hello_sdist
		tests/test_include_exclude_data.py::test_hello_sdist_with_base
		tests/test_issue401_sdist_with_symlinks.py::test_sdist_with_symlinks
		tests/test_manifest_in.py::test_manifest_in_sdist
		# Wants internet to install things with pip
		tests/test_numpy.py::test_pep518_findpython
		# TODO
		"tests/test_command_line.py::test_hide_listing[True-bdist_wheel]"
	)
	epytest
	rm -r "${BUILD_DIR}/install$(python_get_sitedir)"/{easy-install.pth,*.egg} || die
}