[packages/python3-libarchive-c] - python-libarchive-c.spec updated to 5.1 for python 3.8+

qboosh qboosh at pld-linux.org
Mon May 20 07:54:01 CEST 2024


commit 6429ca6c5259b589d3a7afda2288c9f2cced3549
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Mon May 20 06:30:26 2024 +0200

    - python-libarchive-c.spec updated to 5.1 for python 3.8+

 libarchive-c-mock.patch   |  14 ------
 python-libarchive-c.spec  | 119 ----------------------------------------------
 python3-libarchive-c.spec |  61 ++++++++++++++++++++++++
 3 files changed, 61 insertions(+), 133 deletions(-)
---
diff --git a/python-libarchive-c.spec b/python-libarchive-c.spec
deleted file mode 100644
index 6d65fdc..0000000
--- a/python-libarchive-c.spec
+++ /dev/null
@@ -1,119 +0,0 @@
-#
-# Conditional build:
-%bcond_without	tests	# unit tests
-%bcond_without	python2 # CPython 2.x module
-%bcond_without	python3 # CPython 3.x module
-
-Summary:	Python interface to libarchive
-Summary(pl.UTF-8):	Pythonowy interfejs do libarchive
-Name:		python-libarchive-c
-# keep 2.x here for python2 support
-Version:	2.9
-Release:	1
-License:	CC0
-Group:		Libraries/Python
-#Source0Download: https://pypi.org/simple/libarchive/
-Source0:	https://files.pythonhosted.org/packages/source/l/libarchive-c/libarchive-c-%{version}.tar.gz
-# Source0-md5:	083bd2cb0043c1e22a52cb9a05e31532
-Patch0:		libarchive-c-mock.patch
-URL:		https://pypi.org/project/libarchive-c/
-BuildRequires:	libarchive-devel
-%if %{with python2}
-BuildRequires:	python-modules >= 1:2.7
-BuildRequires:	python-setuptools
-%if %{with tests}
-BuildRequires:	python-mock
-BuildRequires:	python-pytest
-%endif
-%endif
-%if %{with python3}
-BuildRequires:	python3-modules >= 1:3.4
-BuildRequires:	python3-setuptools
-%if %{with tests}
-BuildRequires:	python3-pytest
-%endif
-%endif
-BuildRequires:	rpm-pythonprov
-BuildRequires:	rpmbuild(macros) >= 1.714
-Requires:	python-modules >= 1:2.7
-BuildArch:	noarch
-BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
-
-%description
-A Python interface to libarchive. It uses the standard ctypes module
-to dynamically load and access the C library.
-
-%description -l pl.UTF-8
-Pythonowy interfejs do libarchive. Wykorzystuje standardowy moduł
-ctypes do dynamicznego ładowania i dostępu do biblioteki C.
-
-%package -n python3-libarchive-c
-Summary:	Python interface to libarchive
-Summary(pl.UTF-8):	Pythonowy interfejs do libarchive
-Group:		Libraries/Python
-Requires:	python3-modules >= 1:3.4
-
-%description -n python3-libarchive-c
-A Python interface to libarchive. It uses the standard ctypes module
-to dynamically load and access the C library.
-
-%description -n python3-libarchive-c -l pl.UTF-8
-Pythonowy interfejs do libarchive. Wykorzystuje standardowy moduł
-ctypes do dynamicznego ładowania i dostępu do biblioteki C.
-
-%prep
-%setup -q -n libarchive-c-%{version}
-%patch0 -p1
-
-%build
-%if %{with python2}
-%py_build
-
-%if %{with tests}
-LC_ALL=C.UTF-8 \
-PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
-%{__python} -m pytest tests
-%endif
-%endif
-
-%if %{with python3}
-%py3_build
-
-%if %{with tests}
-LC_ALL=C.UTF-8 \
-PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
-%{__python3} -m pytest tests
-%endif
-%endif
-
-%install
-rm -rf $RPM_BUILD_ROOT
-
-%if %{with python2}
-%py_install
-
-%py_postclean
-%endif
-
-%if %{with python3}
-%py3_install
-%endif
-
-%clean
-rm -rf $RPM_BUILD_ROOT
-
-%if %{with python2}
-%files
-%defattr(644,root,root,755)
-%doc LICENSE.md README.rst
-%{py_sitescriptdir}/libarchive
-%{py_sitescriptdir}/libarchive_c-%{version}-py*.egg-info
-%endif
-
-%if %{with python3}
-%files -n python3-libarchive-c
-%defattr(644,root,root,755)
-%doc LICENSE.md README.rst
-%{py3_sitescriptdir}/libarchive
-%{py3_sitescriptdir}/libarchive_c-%{version}-py*.egg-info
-%endif
diff --git a/python3-libarchive-c.spec b/python3-libarchive-c.spec
new file mode 100644
index 0000000..631fac9
--- /dev/null
+++ b/python3-libarchive-c.spec
@@ -0,0 +1,61 @@
+#
+# Conditional build:
+%bcond_without	tests	# unit tests
+
+Summary:	Python interface to libarchive
+Summary(pl.UTF-8):	Pythonowy interfejs do libarchive
+Name:		python3-libarchive-c
+Version:	5.1
+Release:	1
+License:	CC0
+Group:		Libraries/Python
+#Source0Download: https://pypi.org/simple/libarchive/
+Source0:	https://files.pythonhosted.org/packages/source/l/libarchive-c/libarchive-c-%{version}.tar.gz
+# Source0-md5:	b27a4239fe075732d1470950df2d3b05
+URL:		https://pypi.org/project/libarchive-c/
+BuildRequires:	libarchive-devel
+BuildRequires:	python3-modules >= 1:3.8
+BuildRequires:	python3-setuptools
+%if %{with tests}
+BuildRequires:	python3-pytest
+%endif
+BuildRequires:	rpm-pythonprov
+BuildRequires:	rpmbuild(macros) >= 1.714
+Requires:	libarchive
+Requires:	python3-modules >= 1:3.8
+BuildArch:	noarch
+BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+A Python interface to libarchive. It uses the standard ctypes module
+to dynamically load and access the C library.
+
+%description -l pl.UTF-8
+Pythonowy interfejs do libarchive. Wykorzystuje standardowy moduł
+ctypes do dynamicznego ładowania i dostępu do biblioteki C.
+
+%prep
+%setup -q -n libarchive-c-%{version}
+
+%build
+%py3_build
+
+%if %{with tests}
+LC_ALL=C.UTF-8 \
+PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
+%{__python3} -m pytest tests
+%endif
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%py3_install
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(644,root,root,755)
+%doc LICENSE.md README.rst
+%{py3_sitescriptdir}/libarchive
+%{py3_sitescriptdir}/libarchive_c-%{version}-py*.egg-info
diff --git a/libarchive-c-mock.patch b/libarchive-c-mock.patch
deleted file mode 100644
index 32a9053..0000000
--- a/libarchive-c-mock.patch
+++ /dev/null
@@ -1,14 +0,0 @@
---- libarchive-c-2.9/tests/test_rwx.py.orig	2019-10-20 14:34:28.000000000 +0200
-+++ libarchive-c-2.9/tests/test_rwx.py	2024-05-19 21:48:46.268723039 +0200
-@@ -9,7 +9,10 @@ import libarchive
- from libarchive.entry import format_time
- from libarchive.extract import EXTRACT_OWNER, EXTRACT_PERM, EXTRACT_TIME
- from libarchive.write import memory_writer
--from mock import patch
-+try:
-+    from unittest.mock import patch
-+except ImportError:
-+    from mock import patch
- import pytest
- 
- from . import check_archive, in_dir, treestat
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/python3-libarchive-c.git/commitdiff/6429ca6c5259b589d3a7afda2288c9f2cced3549



More information about the pld-cvs-commit mailing list