14
0
forked from pool/python-pylzma

- Switch to autosetup and pyproject macro.

- Less globs in %files.

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pylzma?expand=0&rev=13
This commit is contained in:
2024-03-08 04:18:48 +00:00
committed by Git OBS Bridge
parent c7b6dfef98
commit 36ddcd56d1
2 changed files with 19 additions and 9 deletions

View File

@@ -1,3 +1,9 @@
-------------------------------------------------------------------
Fri Mar 8 04:17:08 UTC 2024 - Steve Kowalik <steven.kowalik@suse.com>
- Switch to autosetup and pyproject macro.
- Less globs in %files.
------------------------------------------------------------------- -------------------------------------------------------------------
Wed Sep 15 12:08:00 UTC 2021 - Matej Cepl <mcepl@suse.com> Wed Sep 15 12:08:00 UTC 2021 - Matej Cepl <mcepl@suse.com>

View File

@@ -1,7 +1,7 @@
# #
# spec file for package python-pylzma # spec file for package python-pylzma
# #
# Copyright (c) 2021 SUSE LLC # Copyright (c) 2024 SUSE LLC
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@@ -17,20 +17,20 @@
%define oname pylzma %define oname pylzma
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-pylzma Name: python-pylzma
Version: 0.5.0 Version: 0.5.0
Release: 0 Release: 0
Summary: Python bindings for the LZMA compression library Summary: Python bindings for the LZMA compression library
License: LGPL-2.1-only License: LGPL-2.1-only
Group: Development/Languages/Python
URL: https://github.com/fancycode/pylzma URL: https://github.com/fancycode/pylzma
Source0: https://github.com/fancycode/pylzma/archive/v%{version}.tar.gz Source0: https://github.com/fancycode/pylzma/archive/v%{version}.tar.gz
# PATCH-FIX-UPSTREAM python-pylzma-test-python3.patch gh#fancycode/pylzma#76 mcepl@suse.com # PATCH-FIX-UPSTREAM python-pylzma-test-python3.patch gh#fancycode/pylzma#76 mcepl@suse.com
# use python3 syntax in test_usage.py # use python3 syntax in test_usage.py
Patch0: python-pylzma-test-python3.patch Patch0: python-pylzma-test-python3.patch
BuildRequires: %{python_module devel} BuildRequires: %{python_module devel}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module setuptools} BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module wheel}
BuildRequires: fdupes BuildRequires: fdupes
BuildRequires: python-rpm-macros BuildRequires: python-rpm-macros
%python_subpackages %python_subpackages
@@ -40,17 +40,19 @@ PyLZMA provides a platform independent way to read and write data
that has been compressed or can be decompressed by the LZMA library. that has been compressed or can be decompressed by the LZMA library.
%prep %prep
%setup -q -n %{oname}-%{version} %autosetup -p1 -n %{oname}-%{version}
%patch0 -p1 # No .dev0 builds please
rm -rf pylzma.egg-info setup.cfg
# Remove Shebang # Remove Shebang
sed -i '1d' py7zlib.py sed -i '1d' py7zlib.py
%build %build
%python_build echo %{version} > RELEASE-VERSION
%pyproject_wheel
%install %install
%python_install %pyproject_install
%python_expand %fdupes %{buildroot}%{$python_sitearch} %python_expand %fdupes %{buildroot}%{$python_sitearch}
%check %check
@@ -59,7 +61,9 @@ sed -i '1d' py7zlib.py
%files %{python_files} %files %{python_files}
%license LICENSE %license LICENSE
%doc README.md %doc README.md
%{python_sitearch}/* %{python_sitearch}/py7zlib.py
%{python_sitearch}/%{oname}* %pycache_only %{python_sitearch}/__pycache__/py7zlib.*.py*
%{python_sitearch}/%{oname}.cpython-*.so
%{python_sitearch}/%{oname}-%{version}.dist-info
%changelog %changelog