2018-05-16 17:36:46 +00:00
|
|
|
#
|
|
|
|
# spec file for package python-libarchive
|
|
|
|
#
|
2024-04-08 11:18:28 +00:00
|
|
|
# Copyright (c) 2024 SUSE LLC
|
2018-05-16 17:36:46 +00:00
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
2018-12-04 13:38:24 +00:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2018-05-18 12:14:06 +00:00
|
|
|
#
|
2018-05-16 17:36:46 +00:00
|
|
|
|
|
|
|
|
2018-05-18 14:33:53 +00:00
|
|
|
%define oldpython python
|
2018-05-16 17:36:46 +00:00
|
|
|
Name: python-libarchive
|
2019-07-24 08:10:35 +00:00
|
|
|
Version: 0.4.7
|
2018-05-16 17:36:46 +00:00
|
|
|
Release: 0
|
|
|
|
Summary: Python adapter for universal, libarchive-based archive access
|
2018-05-18 12:14:06 +00:00
|
|
|
License: GPL-2.0-only
|
2019-07-24 08:10:35 +00:00
|
|
|
URL: https://github.com/dsoprea/PyEasyArchive
|
2018-05-16 17:36:46 +00:00
|
|
|
Source: https://files.pythonhosted.org/packages/source/l/libarchive/libarchive-%{version}.tar.gz
|
2020-07-30 15:44:34 +00:00
|
|
|
# PATCH-FEATURE-UPSTREAM denose_tests.patch gh#dsoprea/PyEasyArchive#44 mcepl@suse.com
|
|
|
|
# Removes the need for nose test requirement
|
|
|
|
Patch0: denose_tests.patch
|
2018-05-16 17:36:46 +00:00
|
|
|
BuildRequires: %{python_module setuptools}
|
|
|
|
BuildRequires: fdupes
|
|
|
|
BuildRequires: libarchive-devel
|
|
|
|
BuildRequires: python-rpm-macros
|
2019-07-24 08:10:35 +00:00
|
|
|
Requires: libarchive-devel
|
|
|
|
Conflicts: python-libarchive-c
|
|
|
|
BuildArch: noarch
|
2018-05-16 17:36:46 +00:00
|
|
|
# SECTION test requirements
|
2020-07-30 15:44:34 +00:00
|
|
|
BuildRequires: %{python_module pytest}
|
2018-05-16 17:36:46 +00:00
|
|
|
# /SECTION
|
2018-05-18 14:33:53 +00:00
|
|
|
%ifpython2
|
|
|
|
Conflicts: %{oldpython}-libarchive-c
|
|
|
|
%endif
|
2018-05-16 17:36:46 +00:00
|
|
|
%python_subpackages
|
|
|
|
|
|
|
|
%description
|
2018-05-18 12:14:06 +00:00
|
|
|
A ctypes-based adapter to libarchive.
|
|
|
|
7-Zip is supported for both reading and writing.
|
2018-05-16 17:36:46 +00:00
|
|
|
|
|
|
|
%prep
|
2024-04-08 11:18:28 +00:00
|
|
|
%autosetup -p1 -n libarchive-%{version}
|
|
|
|
# do not distribute any test file
|
|
|
|
sed -i "s/'tests'/'tests','tests.adapters','tests.types'/" setup.py
|
|
|
|
# test_read_symlinks expects README.rst to be symlink
|
|
|
|
ln -sf libarchive/resources/README.rst README.rst
|
2018-05-16 17:36:46 +00:00
|
|
|
|
|
|
|
%build
|
|
|
|
%python_build
|
|
|
|
|
2019-04-10 06:34:14 +00:00
|
|
|
%check
|
2020-03-03 12:13:55 +00:00
|
|
|
export LANG=en_US.UTF8
|
2020-08-12 10:40:47 +00:00
|
|
|
%pytest
|
2019-04-10 06:34:14 +00:00
|
|
|
|
2018-05-16 17:36:46 +00:00
|
|
|
%install
|
|
|
|
%python_install
|
|
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
|
|
|
|
|
|
|
%files %{python_files}
|
|
|
|
%doc README.rst
|
|
|
|
%license LICENSE
|
2024-04-08 11:18:28 +00:00
|
|
|
%{python_sitelib}/libarchive
|
|
|
|
%{python_sitelib}/libarchive-%{version}*-info
|
2018-05-16 17:36:46 +00:00
|
|
|
|
|
|
|
%changelog
|