public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: dev-python/scikit-build/, dev-python/scikit-build/files/
@ 2022-07-15  7:24 Michał Górny
  0 siblings, 0 replies; 2+ messages in thread
From: Michał Górny @ 2022-07-15  7:24 UTC (permalink / raw
  To: gentoo-commits

commit:     998128b2c64ee399d18d7cdcf43bb1483877cbaf
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Fri Jul 15 07:23:09 2022 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Fri Jul 15 07:24:21 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=998128b2

dev-python/scikit-build: Remove old

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 dev-python/scikit-build/Manifest                   |  1 -
 .../scikit-build-0.12.0-tests-no-coverage.patch    | 11 ----
 dev-python/scikit-build/scikit-build-0.14.1.ebuild | 68 ----------------------
 3 files changed, 80 deletions(-)

diff --git a/dev-python/scikit-build/Manifest b/dev-python/scikit-build/Manifest
index 85bdaf8cb8d2..68d0041c10b9 100644
--- a/dev-python/scikit-build/Manifest
+++ b/dev-python/scikit-build/Manifest
@@ -1,2 +1 @@
-DIST scikit-build-0.14.1.tar.gz 266776 BLAKE2B cb674412ef000fa961b85b32bf7759430cc5ff1b175e29017219ae3b941bfefee5760742cf17549fe7868fa0fc80f72e027aa683cd07bec53c1578e27b1ea0a7 SHA512 c9c3caaab969e83739cb3be718fc7190ef25372fbbf689ea84f9b9725bfc8329640c26038d875ecf3ccdbab0637ef77d6a30c05dcdaaecf441f631c8601d3b63
 DIST scikit-build-0.15.0.tar.gz 268691 BLAKE2B f4cb51ee2367bd4ba6f6c1cada15e1e6be731998a914b28edcf703c5a92c409b78b17dddf04a29b24d40f249ffa06eb9d05d36dc30c0e62ee001519c3ca03f58 SHA512 4d9b1d06d48708ff4f2f5fa8c8f264c7ca85946d5842a1254930d9449d6b6386c17392473c3c85147f6573f7256c94c927962cb56fa23a90a5b442de8de8d727

diff --git a/dev-python/scikit-build/files/scikit-build-0.12.0-tests-no-coverage.patch b/dev-python/scikit-build/files/scikit-build-0.12.0-tests-no-coverage.patch
deleted file mode 100644
index 993258961f35..000000000000
--- a/dev-python/scikit-build/files/scikit-build-0.12.0-tests-no-coverage.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/setup.cfg
-+++ b/setup.cfg
-@@ -10,7 +10,7 @@
- 
- [tool:pytest]
- testpaths = tests
--addopts = -v --cov --cov-report xml -ra --strict-markers --showlocals --color=yes
-+addopts = -v -ra --strict-markers --showlocals --color=yes
- markers = 
- 	fortran: fortran testing
- 

diff --git a/dev-python/scikit-build/scikit-build-0.14.1.ebuild b/dev-python/scikit-build/scikit-build-0.14.1.ebuild
deleted file mode 100644
index 51a4443468d2..000000000000
--- a/dev-python/scikit-build/scikit-build-0.14.1.ebuild
+++ /dev/null
@@ -1,68 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_{8..11} )
-DISTUTILS_USE_PEP517=setuptools
-inherit distutils-r1
-
-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/
-"
-SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
-
-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[${PYTHON_USEDEP}]
-	dev-python/wheel[${PYTHON_USEDEP}]
-"
-
-DEPEND="
-	test? (
-		dev-python/cython[${PYTHON_USEDEP}]
-		dev-python/path-py[${PYTHON_USEDEP}]
-		dev-python/pytest-mock[${PYTHON_USEDEP}]
-		dev-python/pytest-virtualenv[${PYTHON_USEDEP}]
-		dev-python/requests[${PYTHON_USEDEP}]
-		dev-python/six[${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
-	# no pytest-cov
-	sed -i -e '/addopts =/d' setup.cfg || die
-	distutils-r1_src_prepare
-}
-
-python_test() {
-	local 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
-	)
-	epytest ${deselect[@]/#/--deselect }
-}


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-python/scikit-build/, dev-python/scikit-build/files/
@ 2024-06-14 15:07 Michał Górny
  0 siblings, 0 replies; 2+ messages in thread
From: Michał Górny @ 2024-06-14 15:07 UTC (permalink / raw
  To: gentoo-commits

commit:     26f39f2f8320556c2515ac88643e338757d9c9d3
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Fri Jun 14 14:43:57 2024 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Fri Jun 14 15:07:12 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=26f39f2f

dev-python/scikit-build: Fix tests

Thanks to arkamar for digging the patch up.

Closes: https://bugs.gentoo.org/933655
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 .../scikit-build-0.17.6-setuptools-69.3.patch      | 164 +++++++++++++++++++++
 dev-python/scikit-build/scikit-build-0.17.6.ebuild |  13 +-
 2 files changed, 175 insertions(+), 2 deletions(-)

diff --git a/dev-python/scikit-build/files/scikit-build-0.17.6-setuptools-69.3.patch b/dev-python/scikit-build/files/scikit-build-0.17.6-setuptools-69.3.patch
new file mode 100644
index 000000000000..ce5121bea72f
--- /dev/null
+++ b/dev-python/scikit-build/files/scikit-build-0.17.6-setuptools-69.3.patch
@@ -0,0 +1,164 @@
+From acee12430753e8350435d4304196e8eaa654ccd6 Mon Sep 17 00:00:00 2001
+From: Steve Kowalik <steven@wedontsleep.org>
+Date: Mon, 3 Jun 2024 20:47:20 +1000
+Subject: [PATCH] Support setuptools 69.3.0 changes in four tests
+
+setuptools 69.3.0 now canonicalizes package names in filenames, which
+means all dashes are now converted to underscores, leading to test
+failures due to FileNotFoundErrors. Handle both cases to support older
+and newer setuptools.
+---
+ tests/test_hello_cython.py  | 23 ++++++++++++++---------
+ tests/test_hello_fortran.py | 29 +++++++++++++++++------------
+ tests/test_hello_pure.py    | 15 ++++++++++-----
+ tests/test_manifest_in.py   | 17 +++++++++++------
+ 4 files changed, 52 insertions(+), 32 deletions(-)
+
+diff --git a/tests/test_hello_cython.py b/tests/test_hello_cython.py
+index dc95f697..1d9e944d 100644
+--- a/tests/test_hello_cython.py
++++ b/tests/test_hello_cython.py
+@@ -29,20 +29,25 @@ def test_hello_cython_sdist():
+     sdists_zip = glob.glob("dist/*.zip")
+     assert sdists_tar or sdists_zip
+ 
++    dirname = "hello-cython-1.2.3"
++    # setuptools 69.3.0 and above now canonicalize the filename as well.
++    if any("hello_cython" in x for x in sdists_zip + sdists_tar):
++        dirname = "hello_cython-1.2.3"
++
+     expected_content = [
+-        "hello-cython-1.2.3/CMakeLists.txt",
+-        "hello-cython-1.2.3/hello/_hello.pyx",
+-        "hello-cython-1.2.3/hello/CMakeLists.txt",
+-        "hello-cython-1.2.3/hello/__init__.py",
+-        "hello-cython-1.2.3/hello/__main__.py",
+-        "hello-cython-1.2.3/setup.py",
++        f"{dirname}/CMakeLists.txt",
++        f"{dirname}/hello/_hello.pyx",
++        f"{dirname}/hello/CMakeLists.txt",
++        f"{dirname}/hello/__init__.py",
++        f"{dirname}/hello/__main__.py",
++        f"{dirname}/setup.py",
+     ]
+ 
+-    sdist_archive = "dist/hello-cython-1.2.3.zip"
++    sdist_archive = f"dist/{dirname}.zip"
+     if sdists_tar:
+-        sdist_archive = "dist/hello-cython-1.2.3.tar.gz"
++        sdist_archive = f"dist/{dirname}.tar.gz"
+ 
+-    check_sdist_content(sdist_archive, "hello-cython-1.2.3", expected_content, package_dir="hello")
++    check_sdist_content(sdist_archive, dirname, expected_content, package_dir="hello")
+ 
+ 
+ @project_setup_py_test("hello-cython", ["bdist_wheel"])
+diff --git a/tests/test_hello_fortran.py b/tests/test_hello_fortran.py
+index 41f5f444..be9cede9 100644
+--- a/tests/test_hello_fortran.py
++++ b/tests/test_hello_fortran.py
+@@ -33,23 +33,28 @@ def test_hello_fortran_sdist():
+     sdists_zip = glob.glob("dist/*.zip")
+     assert sdists_tar or sdists_zip
+ 
++    dirname = "hello-fortran-1.2.3"
++    # setuptools 69.3.0 and above now canonicalize the filename as well.
++    if any("hello_fortran" in x for x in sdists_zip + sdists_tar):
++        dirname = "hello_fortran-1.2.3"
++
+     expected_content = [
+-        "hello-fortran-1.2.3/bonjour/_bonjour.f90",
+-        "hello-fortran-1.2.3/bonjour/_bonjour.pyf",
+-        "hello-fortran-1.2.3/bonjour/CMakeLists.txt",
+-        "hello-fortran-1.2.3/CMakeLists.txt",
+-        "hello-fortran-1.2.3/hello/_hello.f90",
+-        "hello-fortran-1.2.3/hello/CMakeLists.txt",
+-        "hello-fortran-1.2.3/hello/__init__.py",
+-        "hello-fortran-1.2.3/hello/__main__.py",
+-        "hello-fortran-1.2.3/setup.py",
++        f"{dirname}/bonjour/_bonjour.f90",
++        f"{dirname}/bonjour/_bonjour.pyf",
++        f"{dirname}/bonjour/CMakeLists.txt",
++        f"{dirname}/CMakeLists.txt",
++        f"{dirname}/hello/_hello.f90",
++        f"{dirname}/hello/CMakeLists.txt",
++        f"{dirname}/hello/__init__.py",
++        f"{dirname}/hello/__main__.py",
++        f"{dirname}/setup.py",
+     ]
+ 
+-    sdist_archive = "dist/hello-fortran-1.2.3.zip"
++    sdist_archive = f"dist/{dirname}.zip"
+     if sdists_tar:
+-        sdist_archive = "dist/hello-fortran-1.2.3.tar.gz"
++        sdist_archive = f"dist/{dirname}.tar.gz"
+ 
+-    check_sdist_content(sdist_archive, "hello-fortran-1.2.3", expected_content)
++    check_sdist_content(sdist_archive, dirname, expected_content)
+ 
+ 
+ @pytest.mark.fortran()
+diff --git a/tests/test_hello_pure.py b/tests/test_hello_pure.py
+index 21b0840b..cc176854 100644
+--- a/tests/test_hello_pure.py
++++ b/tests/test_hello_pure.py
+@@ -27,16 +27,21 @@ def test_hello_pure_sdist():
+     sdists_zip = glob.glob("dist/*.zip")
+     assert sdists_tar or sdists_zip
+ 
++    dirname = "hello-pure-1.2.3"
++    # setuptools 69.3.0 and above now canonicalize the filename as well.
++    if any("hello_pure" in x for x in sdists_zip + sdists_tar):
++        dirname = "hello_pure-1.2.3"
++
+     expected_content = [
+-        "hello-pure-1.2.3/hello/__init__.py",
+-        "hello-pure-1.2.3/setup.py",
++        f"{dirname}/hello/__init__.py",
++        f"{dirname}/setup.py",
+     ]
+ 
+-    sdist_archive = "dist/hello-pure-1.2.3.zip"
++    sdist_archive = f"dist/{dirname}.zip"
+     if sdists_tar:
+-        sdist_archive = "dist/hello-pure-1.2.3.tar.gz"
++        sdist_archive = f"dist/{dirname}.tar.gz"
+ 
+-    check_sdist_content(sdist_archive, "hello-pure-1.2.3", expected_content)
++    check_sdist_content(sdist_archive, dirname, expected_content)
+ 
+ 
+ @project_setup_py_test("hello-pure", ["bdist_wheel"], disable_languages_test=True)
+diff --git a/tests/test_manifest_in.py b/tests/test_manifest_in.py
+index 86652308..65c23d1a 100644
+--- a/tests/test_manifest_in.py
++++ b/tests/test_manifest_in.py
+@@ -21,17 +21,22 @@ def test_manifest_in_sdist():
+     sdists_zip = glob.glob("dist/*.zip")
+     assert sdists_tar or sdists_zip
+ 
++    dirname = "manifest-in-1.2.3"
++    # setuptools 69.3.0 and above now canonicalize the filename as well.
++    if any("manifest_in" in x for x in sdists_zip + sdists_tar):
++        dirname = "manifest_in-1.2.3"
++
+     expected_content = [
+-        "manifest-in-1.2.3/hello/__init__.py",
+-        "manifest-in-1.2.3/setup.py",
+-        "manifest-in-1.2.3/MANIFEST.in",
++        f"{dirname}/hello/__init__.py",
++        f"{dirname}/setup.py",
++        f"{dirname}/MANIFEST.in",
+     ]
+ 
+-    sdist_archive = "dist/manifest-in-1.2.3.zip"
++    sdist_archive = f"dist/{dirname}.zip"
+     if sdists_tar:
+-        sdist_archive = "dist/manifest-in-1.2.3.tar.gz"
++        sdist_archive = f"dist/{dirname}.tar.gz"
+ 
+-    check_sdist_content(sdist_archive, "manifest-in-1.2.3", expected_content)
++    check_sdist_content(sdist_archive, dirname, expected_content)
+ 
+ 
+ @project_setup_py_test("manifest-in", ["bdist_wheel"], disable_languages_test=True)

diff --git a/dev-python/scikit-build/scikit-build-0.17.6.ebuild b/dev-python/scikit-build/scikit-build-0.17.6.ebuild
index 90df4c6ec5e5..13aa6fbe700a 100644
--- a/dev-python/scikit-build/scikit-build-0.17.6.ebuild
+++ b/dev-python/scikit-build/scikit-build-0.17.6.ebuild
@@ -24,7 +24,7 @@ RDEPEND="
 	>=dev-python/setuptools-42.0.0[${PYTHON_USEDEP}]
 	$(python_gen_cond_dep '
 		dev-python/tomli[${PYTHON_USEDEP}]
-	' 3.{9..10})
+	' 3.10)
 	>=dev-python/wheel-0.32.0[${PYTHON_USEDEP}]
 "
 
@@ -43,9 +43,15 @@ BDEPEND="
 distutils_enable_sphinx docs \
 	dev-python/sphinx-rtd-theme \
 	dev-python/sphinx-issues
+# note: tests are unstable with xdist
 distutils_enable_tests pytest
 
 src_prepare() {
+	local PATCHES=(
+		# https://github.com/scikit-build/scikit-build/pull/1087
+		"${FILESDIR}/${P}-setuptools-69.3.patch"
+	)
+
 	# not packaged
 	sed -i -e '/cmakedomain/d' docs/conf.py || die
 	distutils-r1_src_prepare
@@ -63,6 +69,9 @@ python_test() {
 			;;
 	esac
 
-	epytest -m "not isolated and not nosetuptoolsscm"
+	local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
+	epytest -p pytest_mock \
+		-m "not isolated and not nosetuptoolsscm" \
+		-o tmp_path_retention_count=1
 	rm -r "${BUILD_DIR}/install$(python_get_sitedir)"/{easy-install.pth,*.egg,*.egg-link} || die
 }


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-06-14 15:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-14 15:07 [gentoo-commits] repo/gentoo:master commit in: dev-python/scikit-build/, dev-python/scikit-build/files/ Michał Górny
  -- strict thread matches above, loose matches on Subject: below --
2022-07-15  7:24 Michał Górny

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox