forked from pool/python-scikit-build
Compare commits
56 Commits
Author | SHA256 | Date | |
---|---|---|---|
d877fdbaac | |||
08987776c4 | |||
417d73df46 | |||
ba486f9074 | |||
c0efdfd15b | |||
91976f47de | |||
68c7e65f47 | |||
0b9e66cd86 | |||
38df30f8ec | |||
800f35f480 | |||
4e43f5954a | |||
cfc5082dcc | |||
51607d68d4 | |||
595037b84b | |||
8443d91a12 | |||
1ad9d274e0 | |||
6352162ae6 | |||
7bb9d1fee0 | |||
4c93b00b48 | |||
fe4fe89a84 | |||
82169e3fa7 | |||
31654c9781 | |||
c6218764a0 | |||
027d18e216 | |||
145ef198bb | |||
a6579e6cf8 | |||
0f666e3967 | |||
33fbdd0165 | |||
a4badf8d8e | |||
d0d0fbb68f | |||
149d6d54e0 | |||
a22a251cad | |||
61dab7e5f6 | |||
9c7937fbef | |||
e6be69e373 | |||
120f38176c | |||
782c83df51 | |||
abcea1e5ef | |||
d6df37aba6 | |||
dda66230a1 | |||
c3dfd099ff | |||
9a22703e79 | |||
3f17518b9a | |||
42ddf6ef2b | |||
1493d56957 | |||
990e4f71c6 | |||
54de402fa3 | |||
1dde040f0f | |||
8bf21c3c95 | |||
|
a5b67af78a | ||
3bb4aaf4e4 | |||
|
78bda829d9 | ||
4917748801 | |||
|
75f442a1f2 | ||
563c94cca0 | |||
|
9ac0250122 |
@@ -1,3 +1,15 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Aug 4 02:52:33 UTC 2025 - Steve Kowalik <steven.kowalik@suse.com>
|
||||
|
||||
- Add patch support-new-cmake.patch:
|
||||
* Support newer version of cmake.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Nov 27 15:31:45 UTC 2024 - Ben Greiner <code@bnavigator.de>
|
||||
|
||||
- Add scikit-build-pr1120-upddistutils.patch
|
||||
* gh#scikit-build/scikit-build#1120
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Aug 29 13:35:59 UTC 2024 - Ben Greiner <code@bnavigator.de>
|
||||
|
||||
|
@@ -1,7 +1,8 @@
|
||||
#
|
||||
# spec file for package python-scikit-build
|
||||
#
|
||||
# Copyright (c) 2024 SUSE LLC
|
||||
# Copyright (c) 2025 SUSE LLC and contributors
|
||||
# Copyright (c) 2025 SUSE LLC and contributors
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@@ -34,6 +35,10 @@ License: MIT
|
||||
URL: https://github.com/scikit-build/scikit-build
|
||||
Source: https://files.pythonhosted.org/packages/source/s/scikit-build/scikit_build-%{version}.tar.gz
|
||||
Source99: sample-setup.cfg
|
||||
# PATCH-FIX-UPSTREAM scikit-build-pr1120-upddistutils.patch gh#scikit-build/scikit-build#1120
|
||||
Patch0: scikit-build-pr1120-upddistutils.patch
|
||||
# PATCH-FIX-OPENSUSE Support newer cmake
|
||||
Patch1: support-new-cmake.patch
|
||||
BuildRequires: %{python_module devel >= 3.8}
|
||||
BuildRequires: %{python_module hatch-fancy-pypi-readme}
|
||||
BuildRequires: %{python_module hatch-vcs}
|
||||
|
78
scikit-build-pr1120-upddistutils.patch
Normal file
78
scikit-build-pr1120-upddistutils.patch
Normal file
@@ -0,0 +1,78 @@
|
||||
From 3992485c67331097553ec8f54233c4c295943f70 Mon Sep 17 00:00:00 2001
|
||||
From: Henry Schreiner <henryschreineriii@gmail.com>
|
||||
Date: Mon, 30 Sep 2024 13:12:38 -0400
|
||||
Subject: [PATCH 1/2] fix(types): Update for newer setuptools
|
||||
|
||||
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
|
||||
---
|
||||
skbuild/platform_specifics/windows.py | 2 +-
|
||||
skbuild/setuptools_wrap.py | 2 +-
|
||||
tests/__init__.py | 6 +++++-
|
||||
3 files changed, 7 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/skbuild/platform_specifics/windows.py b/skbuild/platform_specifics/windows.py
|
||||
index 01085a3c..144dec81 100644
|
||||
--- a/skbuild/platform_specifics/windows.py
|
||||
+++ b/skbuild/platform_specifics/windows.py
|
||||
@@ -215,7 +215,7 @@ def _get_msvc_compiler_env(vs_version: int, vs_toolset: str | None = None) -> Ca
|
||||
return __get_msvc_compiler_env_cache[cache_key]
|
||||
|
||||
if hasattr(monkey, "patch_for_msvc_specialized_compiler"):
|
||||
- monkey.patch_for_msvc_specialized_compiler() # type: ignore[no-untyped-call]
|
||||
+ monkey.patch_for_msvc_specialized_compiler()
|
||||
|
||||
vc_dir = find_visual_studio(vs_version)
|
||||
vcvarsall = os.path.join(vc_dir, "vcvarsall.bat")
|
||||
diff --git a/skbuild/setuptools_wrap.py b/skbuild/setuptools_wrap.py
|
||||
index 8e59631b..f6c60cd5 100644
|
||||
--- a/skbuild/setuptools_wrap.py
|
||||
+++ b/skbuild/setuptools_wrap.py
|
||||
@@ -250,7 +250,7 @@ def _parse_setuptools_arguments(
|
||||
|
||||
return (
|
||||
display_only,
|
||||
- dist.help_commands, # type: ignore[attr-defined]
|
||||
+ bool(dist.help_commands),
|
||||
dist.commands,
|
||||
dist.hide_listing, # type: ignore[attr-defined]
|
||||
dist.force_cmake, # type: ignore[attr-defined]
|
||||
diff --git a/tests/__init__.py b/tests/__init__.py
|
||||
index 4f3c9543..e3942246 100644
|
||||
--- a/tests/__init__.py
|
||||
+++ b/tests/__init__.py
|
||||
@@ -215,7 +215,11 @@ def execute_setup_py(project_dir, setup_args, disable_languages_test=False):
|
||||
"""
|
||||
|
||||
# See https://stackoverflow.com/questions/9160227/dir-util-copy-tree-fails-after-shutil-rmtree
|
||||
- distutils.dir_util._path_created.clear() # type: ignore[attr-defined]
|
||||
+ to_clear = getattr(
|
||||
+ distutils.dir_util, "SkipRepeatAbsolutePaths", getattr(distutils.dir_util, "_path_created", None)
|
||||
+ )
|
||||
+ assert to_clear, "Must have one of the two supported clearing mechanisms"
|
||||
+ to_clear.clear()
|
||||
|
||||
# Clear _PYTHON_HOST_PLATFORM to ensure value sets in skbuild.setuptools_wrap.setup() does not
|
||||
# influence other tests.
|
||||
|
||||
From ca5bdb781816540b84a4015e3e62af4e736f7f05 Mon Sep 17 00:00:00 2001
|
||||
From: Henry Schreiner <HenrySchreinerIII@gmail.com>
|
||||
Date: Tue, 26 Nov 2024 11:06:15 -0500
|
||||
Subject: [PATCH 2/2] Update tests/__init__.py
|
||||
|
||||
---
|
||||
tests/__init__.py | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/tests/__init__.py b/tests/__init__.py
|
||||
index e3942246..381a67be 100644
|
||||
--- a/tests/__init__.py
|
||||
+++ b/tests/__init__.py
|
||||
@@ -218,7 +218,7 @@ def execute_setup_py(project_dir, setup_args, disable_languages_test=False):
|
||||
to_clear = getattr(
|
||||
distutils.dir_util, "SkipRepeatAbsolutePaths", getattr(distutils.dir_util, "_path_created", None)
|
||||
)
|
||||
- assert to_clear, "Must have one of the two supported clearing mechanisms"
|
||||
+ assert to_clear is not None, "Must have one of the two supported clearing mechanisms"
|
||||
to_clear.clear()
|
||||
|
||||
# Clear _PYTHON_HOST_PLATFORM to ensure value sets in skbuild.setuptools_wrap.setup() does not
|
BIN
scikit_build-0.17.6.tar.gz
(Stored with Git LFS)
BIN
scikit_build-0.17.6.tar.gz
(Stored with Git LFS)
Binary file not shown.
BIN
scikit_build-0.18.0.tar.gz
(Stored with Git LFS)
BIN
scikit_build-0.18.0.tar.gz
(Stored with Git LFS)
Binary file not shown.
10
support-new-cmake.patch
Normal file
10
support-new-cmake.patch
Normal file
@@ -0,0 +1,10 @@
|
||||
Index: scikit_build-0.18.1/tests/samples/issue-335-support-cmake-source-dir/CMakeLists.txt
|
||||
===================================================================
|
||||
--- scikit_build-0.18.1.orig/tests/samples/issue-335-support-cmake-source-dir/CMakeLists.txt
|
||||
+++ scikit_build-0.18.1/tests/samples/issue-335-support-cmake-source-dir/CMakeLists.txt
|
||||
@@ -1,4 +1,4 @@
|
||||
-cmake_minimum_required(VERSION 3.2)
|
||||
+cmake_minimum_required(VERSION 3.5.0)
|
||||
|
||||
project(hello NONE)
|
||||
|
@@ -1,84 +0,0 @@
|
||||
From d0655bdcb9f27b9d64c582b947a7b56732f76c82 Mon Sep 17 00:00:00 2001
|
||||
From: Steve Kowalik <steven@wedontsleep.org>
|
||||
Date: Mon, 3 Jun 2024 15:53:10 +1000
|
||||
Subject: [PATCH] Support setuptools 69.3.0 changes in two 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_pure.py | 15 ++++++++++-----
|
||||
2 files changed, 24 insertions(+), 14 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_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)
|
@@ -1,23 +0,0 @@
|
||||
From 56ad12fe568675957e87c88a7b9f318b52b07fc4 Mon Sep 17 00:00:00 2001
|
||||
From: Henry Schreiner <henryschreineriii@gmail.com>
|
||||
Date: Tue, 2 Jul 2024 08:23:03 -0400
|
||||
Subject: [PATCH] tests: fix for distutils change
|
||||
|
||||
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
|
||||
---
|
||||
tests/__init__.py | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/tests/__init__.py b/tests/__init__.py
|
||||
index 00d27289..4f3c9543 100644
|
||||
--- a/tests/__init__.py
|
||||
+++ b/tests/__init__.py
|
||||
@@ -215,7 +215,7 @@ def execute_setup_py(project_dir, setup_args, disable_languages_test=False):
|
||||
"""
|
||||
|
||||
# See https://stackoverflow.com/questions/9160227/dir-util-copy-tree-fails-after-shutil-rmtree
|
||||
- distutils.dir_util._path_created = {} # type: ignore[attr-defined]
|
||||
+ distutils.dir_util._path_created.clear() # type: ignore[attr-defined]
|
||||
|
||||
# Clear _PYTHON_HOST_PLATFORM to ensure value sets in skbuild.setuptools_wrap.setup() does not
|
||||
# influence other tests.
|
@@ -1,60 +0,0 @@
|
||||
From ed6387e8110cd78e4097dbbcf698660738ab05a4 Mon Sep 17 00:00:00 2001
|
||||
From: Steve Kowalik <steven@wedontsleep.org>
|
||||
Date: Wed, 31 Jul 2024 16:01:32 +1000
|
||||
Subject: [PATCH] test: remove test directives
|
||||
|
||||
setuptools 72 and above now raise warnings for test_suite and
|
||||
tests_require directives in setup.py as support for setup.py test is
|
||||
preparing to be removed. These directives have been deprecated for quite
|
||||
some time, so just remove them from the sample setup.py files.
|
||||
---
|
||||
tests/samples/issue-274-support-default-package-dir/setup.py | 1 -
|
||||
.../issue-274-support-one-package-without-package-dir/setup.py | 1 -
|
||||
.../issue-335-support-cmake-source-dir/wrapping/python/setup.py | 1 -
|
||||
tests/samples/test-filter-manifest/wrapping/python/setup.py | 1 -
|
||||
4 files changed, 4 deletions(-)
|
||||
|
||||
diff --git a/tests/samples/issue-274-support-default-package-dir/setup.py b/tests/samples/issue-274-support-default-package-dir/setup.py
|
||||
index 99f4c361..b880122f 100644
|
||||
--- a/tests/samples/issue-274-support-default-package-dir/setup.py
|
||||
+++ b/tests/samples/issue-274-support-default-package-dir/setup.py
|
||||
@@ -10,5 +10,4 @@
|
||||
license="MIT",
|
||||
packages=["hello"],
|
||||
package_dir={"": "src"},
|
||||
- test_suite="hello_tests",
|
||||
)
|
||||
diff --git a/tests/samples/issue-274-support-one-package-without-package-dir/setup.py b/tests/samples/issue-274-support-one-package-without-package-dir/setup.py
|
||||
index 59864c15..5946573d 100644
|
||||
--- a/tests/samples/issue-274-support-one-package-without-package-dir/setup.py
|
||||
+++ b/tests/samples/issue-274-support-one-package-without-package-dir/setup.py
|
||||
@@ -9,5 +9,4 @@
|
||||
author="The scikit-build team",
|
||||
license="MIT",
|
||||
packages=["hello"],
|
||||
- test_suite="hello_tests",
|
||||
)
|
||||
diff --git a/tests/samples/issue-335-support-cmake-source-dir/wrapping/python/setup.py b/tests/samples/issue-335-support-cmake-source-dir/wrapping/python/setup.py
|
||||
index cb5b9d19..09b23405 100644
|
||||
--- a/tests/samples/issue-335-support-cmake-source-dir/wrapping/python/setup.py
|
||||
+++ b/tests/samples/issue-335-support-cmake-source-dir/wrapping/python/setup.py
|
||||
@@ -9,7 +9,6 @@
|
||||
author="The scikit-build team",
|
||||
license="MIT",
|
||||
packages=["hello"],
|
||||
- tests_require=[],
|
||||
setup_requires=[],
|
||||
cmake_source_dir="../../",
|
||||
)
|
||||
diff --git a/tests/samples/test-filter-manifest/wrapping/python/setup.py b/tests/samples/test-filter-manifest/wrapping/python/setup.py
|
||||
index 642620f8..e1bbb440 100644
|
||||
--- a/tests/samples/test-filter-manifest/wrapping/python/setup.py
|
||||
+++ b/tests/samples/test-filter-manifest/wrapping/python/setup.py
|
||||
@@ -14,7 +14,6 @@ def exclude_dev_files(cmake_manifest):
|
||||
author="The scikit-build team",
|
||||
license="MIT",
|
||||
packages=["hello"],
|
||||
- tests_require=[],
|
||||
setup_requires=[],
|
||||
cmake_source_dir="../../",
|
||||
cmake_process_manifest_hook=exclude_dev_files,
|
Reference in New Issue
Block a user