python-zipp/python-zipp.spec
Dirk Mueller a2fd8b70c0 - update to 3.17.0:
* Added ``CompleteDirs.inject`` classmethod to make available
    for use elsewhere.
  * Avoid matching path separators for '?' in glob.
  * In ``Path.match``, Windows path separators are no longer
    honored. The fact that they were was incidental and never
    supported. (#92)
  * Fixed name/suffix/suffixes/stem operations when no filename
    is present and the Path is not at the root of the zipfile.
    (#96)
  * Reworked glob utilizing the namelist directly. (#101)
  * Replaced the ``fnmatch.translate`` with a fresh glob-to-regex
    translator for more correct matching behavior. (#98)
  * Require Python 3.8 or later.
  * Removed compatibility code.
- add python-rpm-macros buildrequires
  *  Remove news file intended only for CPython.
  * refresh packaging
  * When adding implicit dirs, ensure that ancestral directories
  * Declared package as backport.

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-zipp?expand=0&rev=38
2023-11-27 09:08:21 +00:00

85 lines
2.3 KiB
RPMSpec

#
# spec file
#
# Copyright (c) 2023 SUSE LLC
#
# 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.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%global flavor @BUILD_FLAVOR@%{nil}
%if "%{flavor}" == "test"
%define psuffix -test
%bcond_without test
%else
%define psuffix %{nil}
%bcond_with test
%endif
%{?sle15_python_module_pythons}
Name: python-zipp%{psuffix}
Version: 3.17.0
Release: 0
Summary: Pathlib-compatible object wrapper for zip files
License: MIT
Group: Development/Languages/Python
URL: https://github.com/jaraco/zipp
Source: https://files.pythonhosted.org/packages/source/z/zipp/zipp-%{version}.tar.gz
BuildRequires: %{python_module base >= 3.8}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module setuptools >= 56}
BuildRequires: %{python_module setuptools_scm >= 3.4.1}
BuildRequires: %{python_module wheel}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
BuildArch: noarch
%if %{with test}
BuildRequires: %{python_module jaraco.functools}
BuildRequires: %{python_module jaraco.itertools}
BuildRequires: %{python_module more-itertools}
BuildRequires: %{python_module pytest}
%endif
%python_subpackages
%description
A pathlib-compatible Zipfile object wrapper.
%prep
%setup -q -n zipp-%{version}
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
%build
%pyproject_wheel
%install
%if !%{with test}
%pyproject_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%endif
%if %{with test}
%check
%pytest
%endif
%if !%{with test}
%files %{python_files}
%doc README.rst
%license LICENSE
%{python_sitelib}/zipp
%{python_sitelib}/zipp-%{version}*-info
%endif
%changelog