Accepting request 1178218 from devel:languages:python:numeric
- Add patch support-setuptools-69-3.patch: * Support changes introduced by setuptools 69.3.0. OBS-URL: https://build.opensuse.org/request/show/1178218 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-scikit-build?expand=0&rev=21
This commit is contained in:
commit
800f35f480
@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Jun 3 06:10:14 UTC 2024 - Steve Kowalik <steven.kowalik@suse.com>
|
||||
|
||||
- Add patch support-setuptools-69-3.patch:
|
||||
* Support changes introduced by setuptools 69.3.0.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Jul 1 13:49:46 UTC 2023 - Ben Greiner <code@bnavigator.de>
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file
|
||||
# spec file for package python-scikit-build
|
||||
#
|
||||
# Copyright (c) 2023 SUSE LLC
|
||||
# Copyright (c) 2024 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@ -34,6 +34,8 @@ 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 gh#scikit-build/scikit-build#1087
|
||||
Patch0: support-setuptools-69-3.patch
|
||||
BuildRequires: %{python_module devel >= 3.7}
|
||||
BuildRequires: %{python_module hatch-fancy-pypi-readme}
|
||||
BuildRequires: %{python_module hatch-vcs}
|
||||
|
84
support-setuptools-69-3.patch
Normal file
84
support-setuptools-69-3.patch
Normal file
@ -0,0 +1,84 @@
|
||||
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)
|
Loading…
Reference in New Issue
Block a user