The package rpms/python-setuptools-rust.git has added or updated architecture specific content in its spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s): https://src.fedoraproject.org/cgit/rpms/python-setuptools-rust.git/commit/?i....
Change: -ExclusiveArch: %{rust_arches}
Thanks.
Full change: ============
commit 12f6c67e271f6bd4d1767139c29b162d3971db4e Author: Maxwell G maxwell@gtmx.me Date: Thu Aug 31 01:59:03 2023 +0000
Fix inaccurate RHEL comment
diff --git a/python-setuptools-rust.spec b/python-setuptools-rust.spec index 9163ed2..124f048 100644 --- a/python-setuptools-rust.spec +++ b/python-setuptools-rust.spec @@ -21,7 +21,7 @@ BuildRequires: %{py3_dist pytest} %if 0%{?fedora} BuildRequires: rust-packaging %else -# RHEL has rust-toolset and neither setuptools-scm nor wheel +# RHEL has rust-toolset instead of rust-packaging BuildRequires: rust-toolset >= 1.45 %endif %if %{with integration_tests}
commit 0f106ab21b415a32f76a7cd1b04d18c47e0925b3 Author: Maxwell G maxwell@gtmx.me Date: Thu Aug 31 01:56:55 2023 +0000
Use pyproject_wheel instead of calling hook directly
diff --git a/python-setuptools-rust.spec b/python-setuptools-rust.spec index 5ce4eac..9163ed2 100644 --- a/python-setuptools-rust.spec +++ b/python-setuptools-rust.spec @@ -99,10 +99,11 @@ done %pytest tests/ setuptools_rust/ --import-mode importlib -k '%{test_ignores}'
%if %{with integration_tests} -export PYTHONPATH=%{buildroot}%{python3_sitelib} +export %{py3_test_envvars} +%global _pyproject_wheeldir dist for example in $(ls examples/ | grep -vE %{integration_tests_exc}); do cd "examples/${example}" - %{python3} -c 'from setuptools.build_meta import build_wheel; build_wheel("dist")' + %pyproject_wheel if [ -d "tests/" ]; then %{python3} -m venv venv --system-site-packages ./venv/bin/pip install dist/*.whl
commit dac050e91aa34064cc9210a087887a47101a8b17 Author: Maxwell G maxwell@gtmx.me Date: Thu Aug 31 01:55:57 2023 +0000
Use direct paths instead of activating venvs
diff --git a/python-setuptools-rust.spec b/python-setuptools-rust.spec index b3f5e56..5ce4eac 100644 --- a/python-setuptools-rust.spec +++ b/python-setuptools-rust.spec @@ -105,10 +105,8 @@ for example in $(ls examples/ | grep -vE %{integration_tests_exc}); do %{python3} -c 'from setuptools.build_meta import build_wheel; build_wheel("dist")' if [ -d "tests/" ]; then %{python3} -m venv venv --system-site-packages - . ./venv/bin/activate - pip install dist/*.whl - python -Pm pytest tests/ - deactivate + ./venv/bin/pip install dist/*.whl + ./venv/bin/python -Pm pytest tests/ fi cd - done
commit d6880e6c604c45f4935c286a93f3cbd70b6761c0 Author: Maxwell G maxwell@gtmx.me Date: Mon Jun 12 02:16:58 2023 +0000
Modernize the specfile and run all tests
Use pyproject macros:
- Use `%pyproject_check_import` instead of manually calling `python -c`.
- The conditional setuptools_scm stuff can be removed. python-setuptools_scm is now part of RHEL.
Run all tests:
- Always run pytest unit tests - Run all integration tests instead of just examples/hello-world.
Formatting:
- Two lines between specfile settings - Make `%description`s DRY.
diff --git a/python-setuptools-rust.spec b/python-setuptools-rust.spec index f55a915..b3f5e56 100644 --- a/python-setuptools-rust.spec +++ b/python-setuptools-rust.spec @@ -1,8 +1,10 @@ -%if 0%{?rhel} -%bcond_with tests -%else -%bcond_without tests -%endif +# RHEL does not have packaged rust libraries +%bcond packaged_rust_libraries %{undefined rhel} +# The integration tests depend on the presence of these libraries +%bcond integration_tests %{with packaged_rust_libraries} +# Regex of integration tests to skip. +# * html-py-ever requires unpackaged rust crates +%global integration_tests_exc '^(html-py-ever)'
Name: python-setuptools-rust Version: 1.7.0 @@ -15,19 +17,24 @@ Source0: %{pypi_source setuptools-rust} BuildArch: noarch
BuildRequires: python3-devel +BuildRequires: %{py3_dist pytest} %if 0%{?fedora} BuildRequires: rust-packaging %else # RHEL has rust-toolset and neither setuptools-scm nor wheel BuildRequires: rust-toolset >= 1.45 %endif -%if %{with tests} -BuildRequires: rust-pyo3+default-devel +%if %{with integration_tests} +BuildRequires: %{py3_dist cffi} %endif
-%description + +%global _description %{expand: Setuptools helpers for Rust Python extensions. Compile and distribute Python -extensions written in Rust as easily as if they were written in C. +extensions written in Rust as easily as if they were written in C.} + +%description %{_description} +
%package -n python3-setuptools-rust Summary: %{summary} @@ -37,44 +44,81 @@ Requires: rust-packaging Requires: rust-toolset >= 1.45 %endif
-%description -n python3-setuptools-rust -Setuptools helpers for Rust Python extensions. Compile and distribute Python -extensions written in Rust as easily as if they were written in C. +%description -n python3-setuptools-rust %{_description} +
%prep %autosetup -n setuptools-rust-%{version} -# Remove bundled egg-info -rm -rf setuptools-rust.egg-info
-%if ! 0%{?fedora} -# RHEL doesn't have setuptools-scm, releases come with version.py -sed 's/"setuptools_scm"//' pyproject.toml +%cargo_prep + +%if %{with integration_tests} +for example in $(ls examples/ | grep -vE %{integration_tests_exc}); do + cd "examples/${example}" + %cargo_prep + cd - +done %endif
+ %generate_buildrequires %pyproject_buildrequires +%if %{with integration_tests} +for example in $(ls examples/ | grep -vE %{integration_tests_exc}); do + cd "examples/${example}" + %cargo_generate_buildrequires + cd - >&2 +done +%endif +
%build %pyproject_wheel
+ %install %pyproject_install %pyproject_save_files setuptools_rust
+ %check -PYTHONPATH=%{buildroot}%{python3_sitelib} \ - %{__python3} -c "from setuptools_rust import RustExtension, version" +%pyproject_check_import +# Disable tests that require internet access and/or test Windows functionality +%global test_ignores %{shrink: + not test_adjusted_local_rust_target_windows_msvc + and not test_get_lib_name_namespace_package +}
-%if %{with tests} -cd examples/hello-world-setuppy -%cargo_prep -PYTHONPATH=%{buildroot}%{python3_sitelib} %{__python3} setup.py build -cd ../.. +%if %{without packaged_rust_libraries} +%global test_ignores %{shrink:%{test_ignores} + and not test_metadata_contents + and not test_metadata_cargo_log +} %endif
+%pytest tests/ setuptools_rust/ --import-mode importlib -k '%{test_ignores}' + +%if %{with integration_tests} +export PYTHONPATH=%{buildroot}%{python3_sitelib} +for example in $(ls examples/ | grep -vE %{integration_tests_exc}); do + cd "examples/${example}" + %{python3} -c 'from setuptools.build_meta import build_wheel; build_wheel("dist")' + if [ -d "tests/" ]; then + %{python3} -m venv venv --system-site-packages + . ./venv/bin/activate + pip install dist/*.whl + python -Pm pytest tests/ + deactivate + fi + cd - +done +%endif + + %files -n python3-setuptools-rust -f %{pyproject_files} %doc README.md CHANGELOG.md %license LICENSE
+ %changelog %autochangelog
commit b5cbea6e82f85814ce705bdeed5a12236a44e8ca Author: Maxwell G maxwell@gtmx.me Date: Mon Jun 12 02:14:09 2023 +0000
Remove obsolete `ExcludeArch: %{rust_arches}`
diff --git a/python-setuptools-rust.spec b/python-setuptools-rust.spec index 6d31cd8..f55a915 100644 --- a/python-setuptools-rust.spec +++ b/python-setuptools-rust.spec @@ -13,7 +13,6 @@ License: MIT URL: https://github.com/PyO3/setuptools-rust Source0: %{pypi_source setuptools-rust} BuildArch: noarch -ExclusiveArch: %{rust_arches}
BuildRequires: python3-devel %if 0%{?fedora}
commit 796d2d56b1ebde3c330d849189ceae43851c02ef Author: Christian Heimes cheimes@redhat.com Date: Wed Aug 23 06:56:42 2023 +0200
Update to 1.7.0, fixes rhbz#2233656
- modernize packaging, upstream has remove setup.py - remove setup.cfg hacks for RHEL
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
arch-excludes@lists.fedoraproject.org