From 568e1bc37e662b75645d370b7c63c5f0a028fabc Mon Sep 17 00:00:00 2001 From: Christian Heimes Date: Wed, 23 Aug 2023 06:56:42 +0200 Subject: [PATCH] Update to 1.7.0, fixes rhbz#2233656 - modernize packaging, upstream has remove setup.py - remove setup.cfg hacks for RHEL --- .gitignore | 2 ++ python-setuptools-rust.spec | 32 ++++++++++---------------------- sources | 2 +- 3 files changed, 13 insertions(+), 23 deletions(-) diff --git a/.gitignore b/.gitignore index d543ea7..02e8b0f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +/*-pyproject-* /setuptools-rust-0.11.6.tar.gz /setuptools-rust-0.12.0.tar.gz /setuptools-rust-0.12.1.tar.gz @@ -6,3 +7,4 @@ /setuptools-rust-1.2.0.tar.gz /setuptools-rust-1.5.2.tar.gz /setuptools-rust-1.6.0.tar.gz +/setuptools-rust-1.7.0.tar.gz diff --git a/python-setuptools-rust.spec b/python-setuptools-rust.spec index 81c48da..6d31cd8 100644 --- a/python-setuptools-rust.spec +++ b/python-setuptools-rust.spec @@ -5,7 +5,7 @@ %endif Name: python-setuptools-rust -Version: 1.6.0 +Version: 1.7.0 Release: %autorelease Summary: Setuptools Rust extension plugin @@ -16,11 +16,7 @@ BuildArch: noarch ExclusiveArch: %{rust_arches} BuildRequires: python3-devel -BuildRequires: python3dist(setuptools) > 46.1 -BuildRequires: python3dist(semantic-version) >= 2.8.2 -BuildRequires: python3dist(typing-extensions) >= 3.7.4.4 %if 0%{?fedora} -BuildRequires: python3dist(wheel) BuildRequires: rust-packaging %else # RHEL has rust-toolset and neither setuptools-scm nor wheel @@ -52,42 +48,34 @@ extensions written in Rust as easily as if they were written in C. rm -rf setuptools-rust.egg-info %if ! 0%{?fedora} -# RHEL doesn't have setuptools-scm -# remove setuptools-scm -rm pyproject.toml -sed -i 's/setup_requires.*//' setup.cfg - -# create version.py without setuptools-scm -cat > setuptools_rust/version.py << EOF -version = '%{VERSION}' -version_tuple = ($(echo %{VERSION} | sed 's/\./, /g')) -EOF +# RHEL doesn't have setuptools-scm, releases come with version.py +sed 's/"setuptools_scm"//' pyproject.toml %endif +%generate_buildrequires +%pyproject_buildrequires %build -%py3_build +%pyproject_wheel %install -%py3_install +%pyproject_install +%pyproject_save_files setuptools_rust %check PYTHONPATH=%{buildroot}%{python3_sitelib} \ %{__python3} -c "from setuptools_rust import RustExtension, version" %if %{with tests} -cd examples/hello-world +cd examples/hello-world-setuppy %cargo_prep PYTHONPATH=%{buildroot}%{python3_sitelib} %{__python3} setup.py build cd ../.. %endif - -%files -n python3-setuptools-rust +%files -n python3-setuptools-rust -f %{pyproject_files} %doc README.md CHANGELOG.md %license LICENSE -%{python3_sitelib}/setuptools_rust/ -%{python3_sitelib}/setuptools_rust-%{version}-py%{python3_version}.egg-info/ %changelog %autochangelog diff --git a/sources b/sources index 966c06f..6859e22 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (setuptools-rust-1.6.0.tar.gz) = cf6b2df2609f17ce261536d9bc71f2aee615eaf89a43a55c9c5cef4147f04517c169ad565bcd40347d3d6c79c120ad1fee4841afe9a91ae5588e82dbfb2c55df +SHA512 (setuptools-rust-1.7.0.tar.gz) = 19e77be4856f6517155175272e4b1ec1eca7a75f73a94ec2e9c26d6b1fe217a7dda3ee6454a30aa477dedea15d7eb723d0f8753700e2d8dec303d58b03712c6e