From c965e2733ebabf5406d3646debeb0a91d8182f671d0e7bb35c16a507745e98b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mark=C3=A9ta=20Machov=C3=A1?= Date: Fri, 15 Jul 2022 06:56:08 +0000 Subject: [PATCH] Accepting request 989252 from home:bnavigator:branches:devel:languages:python:py7zrminimal - Remove ancient python-pathlib from the build requirements but leave the version as is. An update to the latest version 0.19.0 would require to package many more dependencies. - Clean up the spec-file a little bit - Use pytest. No pure python package should ever be untested. OBS-URL: https://build.opensuse.org/request/show/989252 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-py7zr?expand=0&rev=5 --- python-py7zr.changes | 9 +++++++++ python-py7zr.spec | 33 +++++++++++++++++---------------- 2 files changed, 26 insertions(+), 16 deletions(-) diff --git a/python-py7zr.changes b/python-py7zr.changes index ad8c67c..0494524 100644 --- a/python-py7zr.changes +++ b/python-py7zr.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Thu Jul 14 18:23:24 UTC 2022 - Ben Greiner + +- Remove ancient python-pathlib from the build requirements but + leave the version as is. An update to the latest version 0.19.0 + would require to package many more dependencies. +- Clean up the spec-file a little bit +- Use pytest. No pure python package should ever be untested. + ------------------------------------------------------------------- Sat Apr 3 12:20:11 UTC 2021 - Ismail Dönmez diff --git a/python-py7zr.spec b/python-py7zr.spec index e000bed..0f913c7 100644 --- a/python-py7zr.spec +++ b/python-py7zr.spec @@ -1,7 +1,7 @@ # # spec file for package python-py7zr # -# Copyright (c) 2021 SUSE LLC +# Copyright (c) 2022 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -26,27 +26,27 @@ License: LGPL-2.1-or-later Group: Development/Languages/Python URL: https://github.com/miurahr/py7zr Source0: https://files.pythonhosted.org/packages/source/p/py7zr/py7zr-%{version}.tar.gz -BuildRequires: %{python_module devel} BuildRequires: %{python_module pep517} -BuildRequires: %{python_module setuptools_scm} -BuildRequires: %{python_module setuptools} -BuildRequires: %{python_module wheel} -# begin test -BuildRequires: %{python_module pytest} -BuildRequires: %{python_module coverage} -BuildRequires: %{python_module pathlib} +BuildRequires: %{python_module pyannotate} BuildRequires: %{python_module pycryptodome} BuildRequires: %{python_module pylzma} +BuildRequires: %{python_module setuptools_scm} +BuildRequires: %{python_module setuptools} BuildRequires: %{python_module texttable} BuildRequires: %{python_module toml} -# end test +BuildRequires: %{python_module wheel} +# SECTION test requirements +BuildRequires: %{python_module pytest-remotedata} +BuildRequires: %{python_module pytest-timeout} +BuildRequires: %{python_module pytest} +# /SECTION BuildRequires: fdupes BuildRequires: python-rpm-macros Requires: python-pycryptodome Requires: python-texttable Requires(post): update-alternatives Requires(postun):update-alternatives -#BuildArch: noarch +BuildArch: noarch %python_subpackages %description @@ -60,10 +60,9 @@ find . -type f -name "*.py" -exec sed -i \ {} \; sed -i -e 's|setuptools-scm>=3.5.0|setuptools-scm|g' setup.cfg +sed -i -e '/addopts/d' tox.ini %build -# Remove export CFLAGS=... for noarch packages (unneeded) -export CFLAGS="%{optflags}" %python_build %install @@ -81,13 +80,15 @@ done %python_uninstall_alternative py7zr %check -#%%python_expand $python setup.py test +# different format of argparse in python3.10 +python310_donttest=("-k" "not (test_cli_help or test_cli_no_subcommand)") +%pytest -m "not benchmark" "${$python_donttest[@]}" %files %{python_files} %license LICENSE %doc README.rst Changelog.rst -%{python_sitelib}/* -%pycache_only %{python_sitelib}/py7zr/__pycache__ +%{python_sitelib}/py7zr +%{python_sitelib}/py7zr-%{version}*-info %python_alternative %{_bindir}/py7zr %changelog