2019-01-31 14:21:47 +01:00
|
|
|
#
|
|
|
|
# spec file for package python-zipp
|
|
|
|
#
|
2021-03-08 10:07:16 +01:00
|
|
|
# Copyright (c) 2021 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
|
|
|
#
|
|
|
|
|
|
|
|
|
|
|
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
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}
|
2021-03-08 10:07:16 +01:00
|
|
|
Version: 3.4.1
|
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
|
|
|
|
BuildRequires: %{python_module setuptools_scm >= 1.15.0}
|
|
|
|
BuildRequires: %{python_module setuptools}
|
2020-03-09 14:31:47 +01:00
|
|
|
BuildRequires: %{python_module toml}
|
2019-01-31 14:21:47 +01:00
|
|
|
BuildRequires: fdupes
|
2020-03-09 14:31:47 +01:00
|
|
|
Requires: python-more-itertools
|
2019-01-31 14:21:47 +01:00
|
|
|
BuildArch: noarch
|
2019-06-06 17:52:12 +02:00
|
|
|
%if %{with test}
|
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}
|
2019-06-06 17:52:12 +02:00
|
|
|
BuildRequires: %{python_module pytest >= 3.5}
|
|
|
|
%endif
|
2019-01-31 14:21:47 +01:00
|
|
|
%python_subpackages
|
|
|
|
|
|
|
|
%description
|
|
|
|
A pathlib-compatible Zipfile object wrapper.
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q -n zipp-%{version}
|
|
|
|
# we don't need the extensions for smoke testing
|
|
|
|
rm -f pytest.ini
|
|
|
|
|
|
|
|
%build
|
|
|
|
%python_build
|
|
|
|
|
|
|
|
%install
|
2019-06-06 17:52:12 +02:00
|
|
|
%if !%{with test}
|
2019-01-31 14:21:47 +01:00
|
|
|
%python_install
|
|
|
|
%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"):' \
|
|
|
|
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
|
|
|
|
%{python_sitelib}/*
|
2019-06-06 17:52:12 +02:00
|
|
|
%endif
|
2019-01-31 14:21:47 +01:00
|
|
|
|
|
|
|
%changelog
|