820b3b9
%global pypi_name zipp
820b3b9
820b3b9
Name:           python-%{pypi_name}
e22f6ce
Version:        3.16.2
18c2e6a
Release:        %autorelease
820b3b9
Summary:        Backport of pathlib-compatible object wrapper for zip files
820b3b9
e22f6ce
# SPDX
820b3b9
License:        MIT
820b3b9
URL:            https://github.com/jaraco/zipp
820b3b9
Source0:        %{pypi_source}
820b3b9
BuildArch:      noarch
820b3b9
820b3b9
BuildRequires:  python3-devel
7b6eeb7
BuildRequires:  pyproject-rpm-macros
eda7a99
# Not using test dependencies because the list
eda7a99
# is full of linters and static code checkers
7b6eeb7
BuildRequires:  python3dist(pytest)
eda7a99
BuildRequires:  python3dist(jaraco-functools)
820b3b9
820b3b9
%description
820b3b9
A pathlib-compatible Zipfile object wrapper. A backport of the Path object.
820b3b9
820b3b9
820b3b9
%package -n     python3-%{pypi_name}
820b3b9
Summary:        %{summary}
820b3b9
820b3b9
%description -n python3-%{pypi_name}
820b3b9
A pathlib-compatible Zipfile object wrapper. A backport of the Path object.
820b3b9
820b3b9
820b3b9
%prep
820b3b9
%autosetup -n %{pypi_name}-%{version}
7b6eeb7
# jaraco.itertools and func_timeout are not available in Fedora yet
086ac7d
sed -i "/import jaraco.itertools/d" tests/test_zipp.py
7b6eeb7
7b6eeb7
%generate_buildrequires
7b6eeb7
%pyproject_buildrequires -r
820b3b9
820b3b9
%build
7b6eeb7
%pyproject_wheel
820b3b9
820b3b9
%install
7b6eeb7
%pyproject_install
7b6eeb7
%pyproject_save_files %{pypi_name}
820b3b9
820b3b9
%check
7b6eeb7
# Skipped test needs jaraco.itertools
7b6eeb7
%pytest -k "not test_joinpath_constant_time"
820b3b9
7b6eeb7
%files -n python3-%{pypi_name} -f %{pyproject_files}
820b3b9
%license LICENSE
820b3b9
%doc README.rst
820b3b9
820b3b9
%changelog
18c2e6a
%autochangelog