Accepting request 922227 from home:bnavigator:branches:devel:languages:python

- Clean requirements
- Reactivate python2 for Leap targets
  * keep backports/__init__.py for python2
    gh#jaraco/backports.entry_points_selectable#5

OBS-URL: https://build.opensuse.org/request/show/922227
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-backports.entry_points_selectable?expand=0&rev=3
This commit is contained in:
Matej Cepl 2021-09-29 21:17:27 +00:00 committed by Git OBS Bridge
parent d4e0426395
commit c10f2ae44d
2 changed files with 37 additions and 25 deletions

View File

@ -1,3 +1,11 @@
-------------------------------------------------------------------
Wed Sep 29 15:44:11 UTC 2021 - Ben Greiner <code@bnavigator.de>
- Clean requirements
- Reactivate python2 for Leap targets
* keep backports/__init__.py for python2
gh#jaraco/backports.entry_points_selectable#5
------------------------------------------------------------------- -------------------------------------------------------------------
Wed Aug 4 13:35:05 UTC 2021 - Matej Cepl <mcepl@suse.com> Wed Aug 4 13:35:05 UTC 2021 - Matej Cepl <mcepl@suse.com>

View File

@ -17,8 +17,7 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}} %{?!python_module:%define python_module() python-%{**} python3-%{**}}
# See pep#0420 ... implicit namespace packages are available only in Python 3.3 %bcond_without python2
%define skip_python2 1
Name: python-backports.entry_points_selectable Name: python-backports.entry_points_selectable
Version: 1.1.0 Version: 1.1.0
Release: 0 Release: 0
@ -26,21 +25,19 @@ Summary: Compatibility shim providing selectable entry points for older i
License: MIT License: MIT
URL: https://github.com/jaraco/backports.entry_points_selectable URL: https://github.com/jaraco/backports.entry_points_selectable
Source: https://files.pythonhosted.org/packages/source/b/backports.entry_points_selectable/backports.entry_points_selectable-%{version}.tar.gz Source: https://files.pythonhosted.org/packages/source/b/backports.entry_points_selectable/backports.entry_points_selectable-%{version}.tar.gz
BuildRequires: python-rpm-macros BuildRequires: %{python_module importlib-metadata if %python-base < 3.7}
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: %{python_module importlib_metadata}
BuildRequires: %{python_module pytest >= 4.6} BuildRequires: %{python_module pytest >= 4.6}
BuildRequires: %{python_module pytest-flake8} BuildRequires: %{python_module setuptools_scm}
BuildRequires: %{python_module pytest-cov} BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module pytest-black >= 0.3.7} BuildRequires: %{python_module toml}
BuildRequires: %{python_module pytest-mypy} %if %{with python2}
# BuildRequires: %%{python_module pytest-checkdocs >= 2.4} BuildRequires: python-backports
# BuildRequires: %%{python_module pytest-enabler >= 1.0.1} %endif
# # For docs BuildRequires: fdupes
# BuildRequires: %%{python_module Sphinx} BuildRequires: python-rpm-macros
# BuildRequires: %%{python_module jaraco.packaging >= 8.2} %ifpython2
# BuildRequires: %%{python_module rst.linker >= 1.9} Requires: python-backports
%endif
BuildArch: noarch BuildArch: noarch
%python_subpackages %python_subpackages
@ -56,23 +53,30 @@ Compatibility shim providing selectable entry points for older implementations
%install %install
%python_install %python_install
# PEP-420 allows implicit packages without an additional __init__.py # PEP-420 allows implicit packages without an additional __init__.py for python >= 3.3,
%{python_expand # remove explicit __init__.py files # gh#jaraco/backports.entry_points_selectable#5
rm -v %{buildroot}%{$python_sitelib}/backports/__init__.py \ %{python_expand # remove explicit __init__.py files (unless we need it for the python2 tests)
%{buildroot}%{$python_sitelib}/backports/__pycache__/__init__.* if [ "${python_flavor}" != "python2" ]; then
%fdupes %{buildroot}%{$python_sitelib} rm -v %{buildroot}%{$python_sitelib}/backports/__init__.py* \
%{buildroot}%{$python_sitelib}/backports/__pycache__/__init__.*
%fdupes %{buildroot}%{$python_sitelib}
fi
} }
%check %check
%pytest %pytest --pyargs backports
%files %{python_files} %files %{python_files}
%doc CHANGES.rst README.rst %doc CHANGES.rst README.rst
%license LICENSE %license LICENSE
%dir %{python_sitelib}/backports %dir %{python_sitelib}/backports
%{python_sitelib}/backports.entry_points_selectable* %ifpython2
%{python_sitelib}/backports/entry_points_selectable.py # provided by python2-backports
%dir %{python_sitelib}/backports/__pycache__ %exclude %{python_sitelib}/backports/__init__.py*
%endif
%{python_sitelib}/backports/entry_points_selectable.py*
%pycache_only %dir %{python_sitelib}/backports/__pycache__
%pycache_only %{python_sitelib}/backports/__pycache__/* %pycache_only %{python_sitelib}/backports/__pycache__/*
%{python_sitelib}/backports.entry_points_selectable-%{version}*-info
%changelog %changelog