14
0
forked from pool/python-py7zr

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
This commit is contained in:
2022-07-15 06:56:08 +00:00
committed by Git OBS Bridge
parent 9cbccbece9
commit c965e2733e
2 changed files with 26 additions and 16 deletions

View File

@@ -1,3 +1,12 @@
-------------------------------------------------------------------
Thu Jul 14 18:23:24 UTC 2022 - Ben Greiner <code@bnavigator.de>
- 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 <idonmez@suse.com>

View File

@@ -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