1 |
commit: dbcd93928d90ed3799a360c002dbf17448d975e4 |
2 |
Author: Andrew Ammerlaan <andrewammerlaan <AT> riseup <DOT> net> |
3 |
AuthorDate: Thu Jan 16 16:03:15 2020 +0000 |
4 |
Commit: Benda XU <heroxbd <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Feb 9 12:43:48 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dbcd9392 |
7 |
|
8 |
dev-python/scikit-build: Improved build system generator for CPython |
9 |
|
10 |
C, C++, Cython and Fortran extensions |
11 |
|
12 |
Bug: https://github.com/gentoo/gentoo/pull/14344 |
13 |
Bug: https://bugs.gentoo.org/705872 |
14 |
|
15 |
Package-Manager: Portage-2.3.84, Repoman-2.3.20 |
16 |
Signed-off-by: Andrew Ammerlaan <andrewammerlaan <AT> riseup.net> |
17 |
Signed-off-by: Benda Xu <heroxbd <AT> gentoo.org> |
18 |
|
19 |
dev-python/scikit-build/Manifest | 1 + |
20 |
.../files/scikit-build-0.10.0-docs.patch | 19 +++ |
21 |
...build-0.10.0-skip-sandbox-violation-tests.patch | 132 +++++++++++++++++++++ |
22 |
dev-python/scikit-build/metadata.xml | 9 ++ |
23 |
dev-python/scikit-build/scikit-build-0.10.0.ebuild | 39 ++++++ |
24 |
5 files changed, 200 insertions(+) |
25 |
|
26 |
diff --git a/dev-python/scikit-build/Manifest b/dev-python/scikit-build/Manifest |
27 |
new file mode 100644 |
28 |
index 00000000000..dcc86e2bd4e |
29 |
--- /dev/null |
30 |
+++ b/dev-python/scikit-build/Manifest |
31 |
@@ -0,0 +1 @@ |
32 |
+DIST scikit-build-0.10.0.tar.gz 132443 BLAKE2B 7e817b1b6d8ea5e663cec59c5ed51b3f58318eedf6587380eb2a1458bac772a5a02a936015027f1200f740884ba33512babb1aadc4cdbb59ea38f46bc36cbb5f SHA512 cbdc59a41c60c162be84b38d207838d5e38898871f2ef02dcb672796f01f7a31645892770172e9891a4dd7aa02a85dd489b6dede4c5f717ab013dd8947d5d314 |
33 |
|
34 |
diff --git a/dev-python/scikit-build/files/scikit-build-0.10.0-docs.patch b/dev-python/scikit-build/files/scikit-build-0.10.0-docs.patch |
35 |
new file mode 100644 |
36 |
index 00000000000..f48ad934075 |
37 |
--- /dev/null |
38 |
+++ b/dev-python/scikit-build/files/scikit-build-0.10.0-docs.patch |
39 |
@@ -0,0 +1,19 @@ |
40 |
+diff --git a/docs/conf.py b/docs/conf.py |
41 |
+index 094ed23..a58cb85 100644 |
42 |
+--- a/docs/conf.py |
43 |
++++ b/docs/conf.py |
44 |
+@@ -41,7 +41,6 @@ import skbuild |
45 |
+ # Add any Sphinx extension module names here, as strings. They can be |
46 |
+ # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones. |
47 |
+ extensions = [ |
48 |
+- 'cmake', |
49 |
+ 'sphinx.ext.autodoc', |
50 |
+ 'sphinx.ext.viewcode', |
51 |
+ 'sphinx_issues' |
52 |
+@@ -291,4 +290,4 @@ on_rtd = os.environ.get('READTHEDOCS', None) == 'True' |
53 |
+ if not on_rtd: # only import and set the theme if we're building docs locally |
54 |
+ import sphinx_rtd_theme |
55 |
+ html_theme = 'sphinx_rtd_theme' |
56 |
+- html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] |
57 |
+\ No newline at end of file |
58 |
++ html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] |
59 |
|
60 |
diff --git a/dev-python/scikit-build/files/scikit-build-0.10.0-skip-sandbox-violation-tests.patch b/dev-python/scikit-build/files/scikit-build-0.10.0-skip-sandbox-violation-tests.patch |
61 |
new file mode 100644 |
62 |
index 00000000000..9148db88660 |
63 |
--- /dev/null |
64 |
+++ b/dev-python/scikit-build/files/scikit-build-0.10.0-skip-sandbox-violation-tests.patch |
65 |
@@ -0,0 +1,132 @@ |
66 |
+This patch removes coverage tests (dep on pytest-cov which is deprecated) |
67 |
+It also removes the tests that test the setup.py file |
68 |
+These tests give 'permission denied' exceptions because it calls commands like 'setup.py install' |
69 |
+diff --git a/tests/test_hello_cpp.py b/tests/test_hello_cpp.py |
70 |
+index d39c8ef..0419b88 100644 |
71 |
+--- a/tests/test_hello_cpp.py |
72 |
++++ b/tests/test_hello_cpp.py |
73 |
+@@ -182,24 +182,3 @@ def test_hello_cleans(capfd): |
74 |
+ assert "removing '{}'".format(SKBUILD_DIR()) == clean1_out.splitlines()[3] |
75 |
+ |
76 |
+ assert "running clean" == clean2_out |
77 |
+- |
78 |
+- |
79 |
+-@project_setup_py_test("hello-cpp", ["develop"]) |
80 |
+-def test_hello_develop(): |
81 |
+- for expected_file in [ |
82 |
+- # These files are the "regular" source files |
83 |
+- 'setup.py', |
84 |
+- 'CMakeLists.txt', |
85 |
+- 'bonjour/__init__.py', |
86 |
+- 'bonjourModule.py', |
87 |
+- 'hello/__init__.py', |
88 |
+- 'hello/__main__.py', |
89 |
+- 'hello/_hello.cxx', |
90 |
+- 'hello/CMakeLists.txt', |
91 |
+- # These files are "generated" by CMake and |
92 |
+- # are copied from CMAKE_INSTALL_DIR |
93 |
+- 'hello/_hello%s' % (sysconfig.get_config_var('SO')), |
94 |
+- 'hello/world.py', |
95 |
+- 'helloModule.py' |
96 |
+- ]: |
97 |
+- assert os.path.exists(expected_file) |
98 |
+diff --git a/tests/test_issue274_support_default_package_dir.py b/tests/test_issue274_support_default_package_dir.py |
99 |
+deleted file mode 100644 |
100 |
+index 536f7b2..0000000 |
101 |
+--- a/tests/test_issue274_support_default_package_dir.py |
102 |
++++ /dev/null |
103 |
+@@ -1,27 +0,0 @@ |
104 |
+- |
105 |
+-from . import ( |
106 |
+- _tmpdir, execute_setup_py, initialize_git_repo_and_commit, |
107 |
+- prepare_project, project_setup_py_test, push_dir |
108 |
+-) |
109 |
+- |
110 |
+- |
111 |
+-@project_setup_py_test("issue-274-support-default-package-dir", ["install"], disable_languages_test=True) |
112 |
+-def test_install_command(): |
113 |
+- pass |
114 |
+- |
115 |
+- |
116 |
+-def test_test_command(): |
117 |
+- with push_dir(): |
118 |
+- |
119 |
+- tmp_dir = _tmpdir('test_test_command') |
120 |
+- project = "issue-274-support-default-package-dir" |
121 |
+- prepare_project(project, tmp_dir) |
122 |
+- initialize_git_repo_and_commit(tmp_dir, verbose=True) |
123 |
+- |
124 |
+- try: |
125 |
+- with execute_setup_py(tmp_dir, ["test"], disable_languages_test=True): |
126 |
+- pass |
127 |
+- except SystemExit as exc: |
128 |
+- assert exc.code == 0 |
129 |
+- |
130 |
+- assert tmp_dir.join("test_hello.completed.txt").exists() |
131 |
+diff --git a/tests/test_issue274_support_one_package_without_package_dir.py b/tests/test_issue274_support_one_package_without_package_dir.py |
132 |
+deleted file mode 100644 |
133 |
+index 6612087..0000000 |
134 |
+--- a/tests/test_issue274_support_one_package_without_package_dir.py |
135 |
++++ /dev/null |
136 |
+@@ -1,27 +0,0 @@ |
137 |
+- |
138 |
+-from . import ( |
139 |
+- _tmpdir, execute_setup_py, initialize_git_repo_and_commit, |
140 |
+- prepare_project, project_setup_py_test, push_dir |
141 |
+-) |
142 |
+- |
143 |
+- |
144 |
+-@project_setup_py_test("issue-274-support-one-package-without-package-dir", ["install"], disable_languages_test=True) |
145 |
+-def test_install_command(): |
146 |
+- pass |
147 |
+- |
148 |
+- |
149 |
+-def test_test_command(): |
150 |
+- with push_dir(): |
151 |
+- |
152 |
+- tmp_dir = _tmpdir('test_test_command') |
153 |
+- project = "issue-274-support-one-package-without-package-dir" |
154 |
+- prepare_project(project, tmp_dir) |
155 |
+- initialize_git_repo_and_commit(tmp_dir, verbose=True) |
156 |
+- |
157 |
+- try: |
158 |
+- with execute_setup_py(tmp_dir, ["test"], disable_languages_test=True): |
159 |
+- pass |
160 |
+- except SystemExit as exc: |
161 |
+- assert exc.code == 0 |
162 |
+- |
163 |
+- assert tmp_dir.join("test_hello.completed.txt").exists() |
164 |
+diff --git a/tests/test_issue284_build_ext_inplace.py b/tests/test_issue284_build_ext_inplace.py |
165 |
+deleted file mode 100644 |
166 |
+index 78dd3dd..0000000 |
167 |
+--- a/tests/test_issue284_build_ext_inplace.py |
168 |
++++ /dev/null |
169 |
+@@ -1,15 +0,0 @@ |
170 |
+- |
171 |
+-import os |
172 |
+-import sysconfig |
173 |
+- |
174 |
+-from distutils import sysconfig as du_sysconfig |
175 |
+- |
176 |
+-from . import project_setup_py_test |
177 |
+- |
178 |
+- |
179 |
+-@project_setup_py_test("issue-284-build-ext-inplace", ["build_ext", "--inplace"], disable_languages_test=True) |
180 |
+-def test_build_ext_inplace_command(): |
181 |
+- assert os.path.exists('hello/_hello_sk%s' % sysconfig.get_config_var('SO')) |
182 |
+- |
183 |
+- # See issue scikit-build #383 |
184 |
+- assert os.path.exists('hello/_hello_ext%s' % du_sysconfig.get_config_var('SO')) |
185 |
+diff --git a/tests/test_issue334_configure_cmakelists_non_cp1252_encoding.py b/tests/test_issue334_configure_cmakelists_non_cp1252_encoding.py |
186 |
+deleted file mode 100644 |
187 |
+index 2285bfb..0000000 |
188 |
+--- a/tests/test_issue334_configure_cmakelists_non_cp1252_encoding.py |
189 |
++++ /dev/null |
190 |
+@@ -1,7 +0,0 @@ |
191 |
+- |
192 |
+-from . import project_setup_py_test |
193 |
+- |
194 |
+- |
195 |
+-@project_setup_py_test("issue-334-configure-cmakelist-non-cp1252-encoding", ["install"], disable_languages_test=True) |
196 |
+-def test_install_command(): |
197 |
+- pass |
198 |
|
199 |
diff --git a/dev-python/scikit-build/metadata.xml b/dev-python/scikit-build/metadata.xml |
200 |
new file mode 100644 |
201 |
index 00000000000..ca93985fb0d |
202 |
--- /dev/null |
203 |
+++ b/dev-python/scikit-build/metadata.xml |
204 |
@@ -0,0 +1,9 @@ |
205 |
+<?xml version="1.0" encoding="UTF-8"?> |
206 |
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> |
207 |
+ |
208 |
+<pkgmetadata> |
209 |
+ <maintainer type="project"> |
210 |
+ <email>sci@g.o</email> |
211 |
+ <name>Gentoo Science Project</name> |
212 |
+ </maintainer> |
213 |
+</pkgmetadata> |
214 |
|
215 |
diff --git a/dev-python/scikit-build/scikit-build-0.10.0.ebuild b/dev-python/scikit-build/scikit-build-0.10.0.ebuild |
216 |
new file mode 100644 |
217 |
index 00000000000..f4eb8f1ef3e |
218 |
--- /dev/null |
219 |
+++ b/dev-python/scikit-build/scikit-build-0.10.0.ebuild |
220 |
@@ -0,0 +1,39 @@ |
221 |
+# Copyright 1999-2020 Gentoo Authors |
222 |
+# Distributed under the terms of the GNU General Public License v2 |
223 |
+ |
224 |
+EAPI=7 |
225 |
+ |
226 |
+PYTHON_COMPAT=( python3_{6,7} ) |
227 |
+ |
228 |
+inherit distutils-r1 |
229 |
+ |
230 |
+DESCRIPTION="Improved build system generator for Python C/C++/Fortran/Cython extensions" |
231 |
+HOMEPAGE="https://github.com/scikit-build/scikit-build" |
232 |
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" |
233 |
+ |
234 |
+SLOT="0" |
235 |
+LICENSE="MIT" |
236 |
+KEYWORDS="~amd64 ~x86" |
237 |
+ |
238 |
+RDEPEND="dev-python/distro[${PYTHON_USEDEP}] |
239 |
+ dev-python/packaging[${PYTHON_USEDEP}] |
240 |
+ dev-python/wheel[${PYTHON_USEDEP}]" |
241 |
+ |
242 |
+DEPEND="test? ( |
243 |
+ dev-python/coverage[${PYTHON_USEDEP}] |
244 |
+ dev-python/cython[${PYTHON_USEDEP}] |
245 |
+ dev-python/flake8[${PYTHON_USEDEP}] |
246 |
+ dev-python/path-py[${PYTHON_USEDEP}] |
247 |
+ dev-python/pytest-mock[${PYTHON_USEDEP}] |
248 |
+ dev-python/pytest-runner[${PYTHON_USEDEP}] |
249 |
+ dev-python/pytest-virtualenv[${PYTHON_USEDEP}] |
250 |
+ dev-python/PyQt5[testlib,${PYTHON_USEDEP}] |
251 |
+ dev-python/requests[${PYTHON_USEDEP}] |
252 |
+ dev-python/six[${PYTHON_USEDEP}] |
253 |
+ dev-python/virtualenv[${PYTHON_USEDEP}] )" |
254 |
+ |
255 |
+PATCHES=( "${FILESDIR}/${P}-docs.patch" |
256 |
+ "${FILESDIR}/${P}-skip-sandbox-violation-tests.patch" ) |
257 |
+ |
258 |
+distutils_enable_sphinx docs dev-python/sphinx_rtd_theme dev-python/sphinx-issues |
259 |
+distutils_enable_tests pytest |