diff options
author | V3n3RiX <venerix@koprulu.sector> | 2024-06-15 00:09:17 +0100 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2024-06-15 00:09:17 +0100 |
commit | 6a7029e0f7370d4d5dfe9e31cc2719a870482392 (patch) | |
tree | 28c6c747114eaedfd2db81f86ac2ff3d7d13111e /dev-python/scikit-build | |
parent | 5e41a38157bb40e8513e8e34426e85faba672fe7 (diff) |
gentoo auto-resync : 15:06:2024 - 00:09:17
Diffstat (limited to 'dev-python/scikit-build')
-rw-r--r-- | dev-python/scikit-build/Manifest | 3 | ||||
-rw-r--r-- | dev-python/scikit-build/files/scikit-build-0.17.6-setuptools-69.3.patch | 164 | ||||
-rw-r--r-- | dev-python/scikit-build/scikit-build-0.17.6.ebuild | 15 |
3 files changed, 178 insertions, 4 deletions
diff --git a/dev-python/scikit-build/Manifest b/dev-python/scikit-build/Manifest index af14b3b87999..4edd8ef13549 100644 --- a/dev-python/scikit-build/Manifest +++ b/dev-python/scikit-build/Manifest @@ -1,3 +1,4 @@ +AUX scikit-build-0.17.6-setuptools-69.3.patch 6448 BLAKE2B d7a964b05468da5d81d08435c1c6d38b1096814693d27c9eb6467dab1809ff63b79a778b4ba07ac357d4128549a5318b312aec1d6f1c702a8fca4e1ddc189579 SHA512 6bb096d4b4c6d451d4c1ef1f4792a8e72e624cbcff5219bb7d4eed1459454c9618bb3bb9a03c39c7ef79f9fa0054ca337da3a1c4ed4cdcc007b8d054f20fbdbb DIST scikit_build-0.17.6.tar.gz 272208 BLAKE2B 9e3f908041eca89182f798c54a1a248934dc026816f7cd041a8debc97be27096942dda42a0ae63e87b9337304a478d6f520edcd5ea7a45aae6a195d1f769eed2 SHA512 92b97146f40d8222bd8415ef8439497d5075b72e5bafc40aba0a3e2911d269a118f2f7d41f468f7add8949f550b1fd7d5a9113d249e42dfac431108182ca9198 -EBUILD scikit-build-0.17.6.ebuild 1701 BLAKE2B 6a7f20357770c376104df9b82cb2f6970e202891750868c6635d389729238aaf249fbacd59daa3cb8208dd6135d2ac56d1e365c741667ccdd0d51402d6f8ce1a SHA512 c5f60beaf5fb87b5e605a1d1eba215c4bdd4457cbf0ba32022ed8f1c4a473f20b427baa34746056b274bfd9ea0034126baed6278e3e9ad7ed5ea96d0809ca7ca +EBUILD scikit-build-0.17.6.ebuild 1953 BLAKE2B 507c00500aeac432556d057175eb7333e4a3f3e4a04b16051ac72be9f3fdb502535e94f285ccf54bd29461ef54d968fe06ae7e9af33f761914548b814df9e72a SHA512 3bdfe867cb6b1c36fdc4bd5cf75fcf75b6c87b430a72a4ed0dbcddbbdf4d2e2703b42d43650827244250073502918fbb6bc042f2e7d354f09e01ee85fa16c3a2 MISC metadata.xml 473 BLAKE2B 9d02a79439618fa413f74e4a617b8af042879be7a44c8f1c33e254e985d4f24057321fb2ec0b73074be1f6b67af3984190e48669e19985d6297411c0c5b61a79 SHA512 afc398c6287ce67eb85402832684fd006385e70d28a738ca8c5f1e2d008526621121cd9107a7fbc217a1a5857b54fa1dce3de69c47db58fc76990764b814a36d 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 4fd7566b71cb..13aa6fbe700a 100644 --- a/dev-python/scikit-build/scikit-build-0.17.6.ebuild +++ b/dev-python/scikit-build/scikit-build-0.17.6.ebuild @@ -4,7 +4,7 @@ EAPI=8 DISTUTILS_USE_PEP517=hatchling -PYTHON_COMPAT=( pypy3 python3_{10..12} ) +PYTHON_COMPAT=( pypy3 python3_{10..13} ) inherit distutils-r1 pypi @@ -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 } |