2019-01-31 14:21:47 +01:00
|
|
|
#
|
2021-07-17 15:36:33 +02:00
|
|
|
# spec file
|
2019-01-31 14:21:47 +01:00
|
|
|
#
|
2023-04-15 12:24:39 +02:00
|
|
|
# Copyright (c) 2023 SUSE LLC
|
2019-01-31 14:21:47 +01: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.
|
|
|
|
|
2019-06-06 17:52:12 +02:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2019-01-31 14:21:47 +01:00
|
|
|
#
|
|
|
|
|
|
|
|
|
2020-03-09 14:31:47 +01:00
|
|
|
%define skip_python2 1
|
2019-06-06 17:52:12 +02:00
|
|
|
%global flavor @BUILD_FLAVOR@%{nil}
|
|
|
|
%if "%{flavor}" == "test"
|
|
|
|
%define psuffix -test
|
|
|
|
%bcond_without test
|
|
|
|
%else
|
|
|
|
%define psuffix %{nil}
|
|
|
|
%bcond_with test
|
|
|
|
%endif
|
|
|
|
Name: python-zipp%{psuffix}
|
2023-04-15 12:24:39 +02:00
|
|
|
Version: 3.15.0
|
2019-01-31 14:21:47 +01:00
|
|
|
Release: 0
|
|
|
|
Summary: Pathlib-compatible object wrapper for zip files
|
|
|
|
License: MIT
|
|
|
|
Group: Development/Languages/Python
|
2019-06-06 17:52:12 +02:00
|
|
|
URL: https://github.com/jaraco/zipp
|
2019-01-31 14:21:47 +01:00
|
|
|
Source: https://files.pythonhosted.org/packages/source/z/zipp/zipp-%{version}.tar.gz
|
2022-08-29 06:59:34 +02:00
|
|
|
BuildRequires: %{python_module base >= 3.6}
|
|
|
|
BuildRequires: %{python_module pip}
|
|
|
|
BuildRequires: %{python_module setuptools >= 56}
|
|
|
|
BuildRequires: %{python_module setuptools_scm >= 3.4.1}
|
|
|
|
BuildRequires: %{python_module wheel}
|
2019-01-31 14:21:47 +01:00
|
|
|
BuildRequires: fdupes
|
2022-01-04 15:41:47 +01:00
|
|
|
BuildRequires: python-rpm-macros
|
2019-01-31 14:21:47 +01:00
|
|
|
BuildArch: noarch
|
2019-06-06 17:52:12 +02:00
|
|
|
%if %{with test}
|
2023-04-15 16:11:44 +02:00
|
|
|
BuildRequires: %{python_module jaraco.functools}
|
2020-03-09 14:31:47 +01:00
|
|
|
BuildRequires: %{python_module jaraco.itertools}
|
2019-08-30 02:48:40 +02:00
|
|
|
BuildRequires: %{python_module more-itertools}
|
2022-08-29 06:59:34 +02:00
|
|
|
BuildRequires: %{python_module pytest}
|
2019-06-06 17:52:12 +02:00
|
|
|
%endif
|
2019-01-31 14:21:47 +01:00
|
|
|
%python_subpackages
|
|
|
|
|
|
|
|
%description
|
|
|
|
A pathlib-compatible Zipfile object wrapper.
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q -n zipp-%{version}
|
2022-08-29 06:59:34 +02:00
|
|
|
sed -i '/addopts/ s/--doctest-modules//' pytest.ini
|
|
|
|
# People still want this for 15.X despite Python 3.6 is not supported upstream anymore
|
|
|
|
sed -i 's/python_requires = >=3.7/python_requires = >=3.6/' setup.cfg
|
|
|
|
rm -r zipp.egg-info
|
2019-01-31 14:21:47 +01:00
|
|
|
|
|
|
|
%build
|
2022-08-29 06:59:34 +02:00
|
|
|
%pyproject_wheel
|
2019-01-31 14:21:47 +01:00
|
|
|
|
|
|
|
%install
|
2019-06-06 17:52:12 +02:00
|
|
|
%if !%{with test}
|
2022-08-29 06:59:34 +02:00
|
|
|
%pyproject_install
|
2019-01-31 14:21:47 +01:00
|
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
2019-06-06 17:52:12 +02:00
|
|
|
%endif
|
2019-01-31 14:21:47 +01:00
|
|
|
|
2019-06-06 17:52:12 +02:00
|
|
|
%if %{with test}
|
2019-01-31 14:21:47 +01:00
|
|
|
%check
|
2020-03-09 14:31:47 +01:00
|
|
|
# skip performance test (we do not have func_timeout sofar)
|
|
|
|
sed -i -e 's:import func_timeout::' \
|
|
|
|
-e 's:@func_timeout.func_set_timeout(.):@unittest.skip("skip performance test"):' \
|
2023-04-15 16:11:44 +02:00
|
|
|
tests/test_zipp.py
|
2019-06-06 17:52:12 +02:00
|
|
|
%pytest
|
|
|
|
%endif
|
2019-01-31 14:21:47 +01:00
|
|
|
|
2019-06-06 17:52:12 +02:00
|
|
|
%if !%{with test}
|
2019-01-31 14:21:47 +01:00
|
|
|
%files %{python_files}
|
|
|
|
%doc README.rst
|
|
|
|
%license LICENSE
|
2023-04-15 12:24:39 +02:00
|
|
|
%{python_sitelib}/zipp
|
|
|
|
%{python_sitelib}/zipp-%{version}.dist-info
|
2019-06-06 17:52:12 +02:00
|
|
|
%endif
|
2019-01-31 14:21:47 +01:00
|
|
|
|
|
|
|
%changelog
|