From 55d1fca950112f2cc39cb6cef6031029426c48bd98bd5f39e63a24102e61a69b Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Mon, 18 Jul 2022 06:21:35 +0000 Subject: [PATCH 1/5] Accepting request 989766 from home:apersaud:branches:devel:languages:python updated tests - specfile: * update setuptools requirement to 62.4 * require pyparsing * be mor specific in %files section * use pytest - update to version 1.4.1: * Fixed + Fix crash when checking Rust version. #263 - changes from version 1.4.0: * Packaging + Increase minimum setuptools version to 62.4. #246 * Added + Add cargo_manifest_args to support locked, frozen and offline builds. #234 + Add RustBin for packaging binaries in scripts data directory. #248 * Changed + Exec binding RustExtension with script=True is deprecated in favor of RustBin. #248 + Errors while calling cargo metadata are now reported back to the user #254 + quiet option will now suppress output of cargo metadata. #256 + setuptools-rust will now match cargo behavior of not setting --target when the selected target is the rust host. #258 + Deprecate native option of RustExtension. #258 * Fixed + If the sysconfig for BLDSHARED has no flags, setuptools-rust won't crash anymore. #241 OBS-URL: https://build.opensuse.org/request/show/989766 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-setuptools-rust?expand=0&rev=10 --- python-setuptools-rust.changes | 34 ++++++++++++++++++++++++++++++++++ python-setuptools-rust.spec | 18 +++++++++++++----- setuptools-rust-1.3.0.tar.gz | 3 --- setuptools-rust-1.4.1.tar.gz | 3 +++ 4 files changed, 50 insertions(+), 8 deletions(-) delete mode 100644 setuptools-rust-1.3.0.tar.gz create mode 100644 setuptools-rust-1.4.1.tar.gz diff --git a/python-setuptools-rust.changes b/python-setuptools-rust.changes index 38075d9..f781756 100644 --- a/python-setuptools-rust.changes +++ b/python-setuptools-rust.changes @@ -1,3 +1,37 @@ +------------------------------------------------------------------- +Sat Jul 16 15:56:02 UTC 2022 - Arun Persaud + +- specfile: + * update setuptools requirement to 62.4 + * require pyparsing + * be mor specific in %files section + * use pytest + +- update to version 1.4.1: + * Fixed + + Fix crash when checking Rust version. #263 + +- changes from version 1.4.0: + * Packaging + + Increase minimum setuptools version to 62.4. #246 + * Added + + Add cargo_manifest_args to support locked, frozen and offline + builds. #234 + + Add RustBin for packaging binaries in scripts data + directory. #248 + * Changed + + Exec binding RustExtension with script=True is deprecated in + favor of RustBin. #248 + + Errors while calling cargo metadata are now reported back to the + user #254 + + quiet option will now suppress output of cargo metadata. #256 + + setuptools-rust will now match cargo behavior of not setting + --target when the selected target is the rust host. #258 + + Deprecate native option of RustExtension. #258 + * Fixed + + If the sysconfig for BLDSHARED has no flags, setuptools-rust + won't crash anymore. #241 + ------------------------------------------------------------------- Sun May 15 19:16:43 UTC 2022 - Dirk Müller diff --git a/python-setuptools-rust.spec b/python-setuptools-rust.spec index b9f88ae..1ff9779 100644 --- a/python-setuptools-rust.spec +++ b/python-setuptools-rust.spec @@ -19,7 +19,7 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} %global skip_python2 1 Name: python-setuptools-rust -Version: 1.3.0 +Version: 1.4.1 Release: 0 Summary: Setuptools plugin for Rust extensions License: BSD-3-Clause @@ -27,11 +27,16 @@ Group: Development/Languages/Python URL: https://github.com/PyO3/setuptools-rust Source: https://files.pythonhosted.org/packages/source/s/setuptools-rust/setuptools-rust-%{version}.tar.gz BuildRequires: %{python_module pip} +BuildRequires: %{python_module pyparsing} BuildRequires: %{python_module semantic_version >= 2.8.2} +BuildRequires: %{python_module setuptools >= 62.4} BuildRequires: %{python_module setuptools_scm} -BuildRequires: %{python_module setuptools} BuildRequires: %{python_module typing_extensions >= 3.7.4.3} BuildRequires: %{python_module wheel} +# test requirements +BuildRequires: %{python_module pytest} +BuildRequires: %{python_module nox} +BuildRequires: %{python_module Sphinx} BuildRequires: python-rpm-macros Requires: python-semantic_version >= 2.8.2 Requires: python-typing_extensions >= 3.7.4.3 @@ -56,11 +61,14 @@ were written in C. %check export LANG=en_US.UTF-8 -%python_exec setup.py test - +%pytest tests/ + %files %{python_files} %license LICENSE %doc README.md -%{python_sitelib}/* +%{python_sitelib}/setuptools_rust-%{version}-py*.egg-info +%dir %{python_sitelib}/setuptools_rust +%{python_sitelib}/setuptools_rust/*py +%pycache_only %{python_sitelib}/setuptools_rust/__pycache__ %changelog diff --git a/setuptools-rust-1.3.0.tar.gz b/setuptools-rust-1.3.0.tar.gz deleted file mode 100644 index 358a522..0000000 --- a/setuptools-rust-1.3.0.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:958c5bf4ab6483d59dab888538121871cc5006354a42fb0fbd50acf03caad1de -size 285698 diff --git a/setuptools-rust-1.4.1.tar.gz b/setuptools-rust-1.4.1.tar.gz new file mode 100644 index 0000000..f804fcc --- /dev/null +++ b/setuptools-rust-1.4.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:18ff850831f58ee21d5783825c99fad632da21e47645e9427fd7dec048029e76 +size 288848 From 2ae40a6161dbecce70b63e20b55bba3f0dbb5e9c5e53c83492651feeeed746e0 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Mon, 18 Jul 2022 07:35:58 +0000 Subject: [PATCH 2/5] - Deduplicate files in python_sitelib. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-setuptools-rust?expand=0&rev=11 --- python-setuptools-rust.changes | 5 +++++ python-setuptools-rust.spec | 6 ++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/python-setuptools-rust.changes b/python-setuptools-rust.changes index f781756..6c8a2a4 100644 --- a/python-setuptools-rust.changes +++ b/python-setuptools-rust.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Jul 18 07:35:46 UTC 2022 - Matej Cepl + +- Deduplicate files in python_sitelib. + ------------------------------------------------------------------- Sat Jul 16 15:56:02 UTC 2022 - Arun Persaud diff --git a/python-setuptools-rust.spec b/python-setuptools-rust.spec index 1ff9779..e11921e 100644 --- a/python-setuptools-rust.spec +++ b/python-setuptools-rust.spec @@ -35,8 +35,9 @@ BuildRequires: %{python_module typing_extensions >= 3.7.4.3} BuildRequires: %{python_module wheel} # test requirements BuildRequires: %{python_module pytest} -BuildRequires: %{python_module nox} BuildRequires: %{python_module Sphinx} +BuildRequires: %{python_module nox} +BuildRequires: fdupes BuildRequires: python-rpm-macros Requires: python-semantic_version >= 2.8.2 Requires: python-typing_extensions >= 3.7.4.3 @@ -58,11 +59,12 @@ were written in C. %install %python_install +%python_expand %fdupes %{buildroot}%{$python_sitelib} %check export LANG=en_US.UTF-8 %pytest tests/ - + %files %{python_files} %license LICENSE %doc README.md From fb95f418315ef75f1e2bdca5ebd1eaa4b1de7da17446d23fc722f39893754343 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Mon, 18 Jul 2022 07:36:20 +0000 Subject: [PATCH 3/5] Run spec-cleaner OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-setuptools-rust?expand=0&rev=12 --- python-setuptools-rust.spec | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/python-setuptools-rust.spec b/python-setuptools-rust.spec index e11921e..47fe996 100644 --- a/python-setuptools-rust.spec +++ b/python-setuptools-rust.spec @@ -26,17 +26,17 @@ License: BSD-3-Clause Group: Development/Languages/Python URL: https://github.com/PyO3/setuptools-rust Source: https://files.pythonhosted.org/packages/source/s/setuptools-rust/setuptools-rust-%{version}.tar.gz +BuildRequires: %{python_module Sphinx} +BuildRequires: %{python_module nox} BuildRequires: %{python_module pip} BuildRequires: %{python_module pyparsing} +# test requirements +BuildRequires: %{python_module pytest} BuildRequires: %{python_module semantic_version >= 2.8.2} BuildRequires: %{python_module setuptools >= 62.4} BuildRequires: %{python_module setuptools_scm} BuildRequires: %{python_module typing_extensions >= 3.7.4.3} BuildRequires: %{python_module wheel} -# test requirements -BuildRequires: %{python_module pytest} -BuildRequires: %{python_module Sphinx} -BuildRequires: %{python_module nox} BuildRequires: fdupes BuildRequires: python-rpm-macros Requires: python-semantic_version >= 2.8.2 From 2016c9804b21c3eaba2964544e400930a12d2aedf13ffd8ff2bd15607dff62d3 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Mon, 18 Jul 2022 07:38:57 +0000 Subject: [PATCH 4/5] Run spec-cleaner OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-setuptools-rust?expand=0&rev=13 --- python-setuptools-rust.spec | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/python-setuptools-rust.spec b/python-setuptools-rust.spec index 47fe996..0a7b2e5 100644 --- a/python-setuptools-rust.spec +++ b/python-setuptools-rust.spec @@ -26,12 +26,8 @@ License: BSD-3-Clause Group: Development/Languages/Python URL: https://github.com/PyO3/setuptools-rust Source: https://files.pythonhosted.org/packages/source/s/setuptools-rust/setuptools-rust-%{version}.tar.gz -BuildRequires: %{python_module Sphinx} -BuildRequires: %{python_module nox} BuildRequires: %{python_module pip} BuildRequires: %{python_module pyparsing} -# test requirements -BuildRequires: %{python_module pytest} BuildRequires: %{python_module semantic_version >= 2.8.2} BuildRequires: %{python_module setuptools >= 62.4} BuildRequires: %{python_module setuptools_scm} @@ -42,6 +38,11 @@ BuildRequires: python-rpm-macros Requires: python-semantic_version >= 2.8.2 Requires: python-typing_extensions >= 3.7.4.3 BuildArch: noarch +# SECTION test requirements +BuildRequires: %{python_module Sphinx} +BuildRequires: %{python_module nox} +BuildRequires: %{python_module pytest} +# /SECTION %python_subpackages %description From 8b410919caba1f8659f23d28584b77fa7f5e152e8f50f5c226f01af1ad42718f Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Wed, 20 Jul 2022 10:10:13 +0000 Subject: [PATCH 5/5] Accepting request 990375 from home:bnavigator:branches:devel:languages:python - Fix requirements * Don't need sphinx * Needs rust and cargo * Don't need nox; can't use it in obs as it wants to install wheels. - Fix tests: * Plain pytest test suite without is rudimentary * At least build the hello-world example - Use PEP517 OBS-URL: https://build.opensuse.org/request/show/990375 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-setuptools-rust?expand=0&rev=14 --- python-setuptools-rust.changes | 13 +++++++++++++ python-setuptools-rust.spec | 30 +++++++++++++++++++----------- 2 files changed, 32 insertions(+), 11 deletions(-) diff --git a/python-setuptools-rust.changes b/python-setuptools-rust.changes index 6c8a2a4..dba1a97 100644 --- a/python-setuptools-rust.changes +++ b/python-setuptools-rust.changes @@ -1,3 +1,16 @@ +------------------------------------------------------------------- +Wed Jul 20 09:16:41 UTC 2022 - Ben Greiner + +- Fix requirements + * Don't need sphinx + * Needs rust and cargo + * Don't need nox; can't use it in obs as it wants to install + wheels. +- Fix tests: + * Plain pytest test suite without is rudimentary + * At least build the hello-world example +- Use PEP517 + ------------------------------------------------------------------- Mon Jul 18 07:35:46 UTC 2022 - Matej Cepl diff --git a/python-setuptools-rust.spec b/python-setuptools-rust.spec index 0a7b2e5..cb22448 100644 --- a/python-setuptools-rust.spec +++ b/python-setuptools-rust.spec @@ -16,8 +16,6 @@ # -%{?!python_module:%define python_module() python-%{**} python3-%{**}} -%global skip_python2 1 Name: python-setuptools-rust Version: 1.4.1 Release: 0 @@ -26,21 +24,25 @@ License: BSD-3-Clause Group: Development/Languages/Python URL: https://github.com/PyO3/setuptools-rust Source: https://files.pythonhosted.org/packages/source/s/setuptools-rust/setuptools-rust-%{version}.tar.gz +BuildRequires: %{python_module base >= 3.7} BuildRequires: %{python_module pip} BuildRequires: %{python_module pyparsing} BuildRequires: %{python_module semantic_version >= 2.8.2} BuildRequires: %{python_module setuptools >= 62.4} -BuildRequires: %{python_module setuptools_scm} +BuildRequires: %{python_module setuptools_scm >= 6.3.2} BuildRequires: %{python_module typing_extensions >= 3.7.4.3} BuildRequires: %{python_module wheel} +BuildRequires: cargo BuildRequires: fdupes BuildRequires: python-rpm-macros +BuildRequires: rust +Requires: cargo Requires: python-semantic_version >= 2.8.2 +Requires: python-setuptools >= 62.4 Requires: python-typing_extensions >= 3.7.4.3 +Requires: rust BuildArch: noarch # SECTION test requirements -BuildRequires: %{python_module Sphinx} -BuildRequires: %{python_module nox} BuildRequires: %{python_module pytest} # /SECTION %python_subpackages @@ -56,22 +58,28 @@ were written in C. %setup -q -n setuptools-rust-%{version} %build -%python_build +%pyproject_wheel %install -%python_install +%pyproject_install %python_expand %fdupes %{buildroot}%{$python_sitelib} %check export LANG=en_US.UTF-8 %pytest tests/ +pushd examples/hello-world +%{python_expand # See noxfile.py +# hello-world is the only example which does not need extra rust packages (via cargo_vendor) +export PYTHONPATH=%{buildroot}%{$python_sitelib} +$python -m pip install --no-build-isolation --target=$PWD/build/exampleinstall/ --no-deps --no-index . +$PWD/build/exampleinstall/bin/hello-world +} +popd %files %{python_files} %license LICENSE %doc README.md -%{python_sitelib}/setuptools_rust-%{version}-py*.egg-info -%dir %{python_sitelib}/setuptools_rust -%{python_sitelib}/setuptools_rust/*py -%pycache_only %{python_sitelib}/setuptools_rust/__pycache__ +%{python_sitelib}/setuptools_rust-%{version}*-info +%{python_sitelib}/setuptools_rust %changelog