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

fix another typo.

- Don't fall back to setuptools but to importlib-metadata for
  plugin loading. (If a package for 15.X would be build, but
  Pytest 7 is required for testing -- gh#pygments/pygments#2080)

OBS-URL: https://build.opensuse.org/request/show/989740
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-Pygments?expand=0&rev=83
This commit is contained in:
Matej Cepl 2022-07-18 12:05:11 +00:00 committed by Git OBS Bridge
parent 4e507cda01
commit cd8449b35a
2 changed files with 18 additions and 12 deletions

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Fri Jul 15 14:30:49 UTC 2022 - Ben Greiner <code@bnavigator.de>
- Don't fall back to setuptools but to importlib-metadata for
plugin loading. (If a package for 15.X would be build, but
Pytest 7 is required for testing -- gh#pygments/pygments#2080)
-------------------------------------------------------------------
Sun May 15 18:58:34 UTC 2022 - Dirk Müller <dmueller@suse.com>

View File

@ -34,14 +34,15 @@ Group: Development/Languages/Python
URL: http://pygments.org
Source: https://files.pythonhosted.org/packages/source/P/Pygments/Pygments-%{version}.tar.gz
BuildRequires: %{python_module base >= 3.5}
# We need pytest just because of its test runner, it seems even
# python3 stdlib unittest runner doesn't work
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module lxml}
BuildRequires: %{python_module pytest >= 7}
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-macros >= 20210929
Requires: python-setuptools
# Preferred for plugin loading, see https://pygments.org/docs/plugins/
%if 0%{?python_version_nodots} < 38
Requires: python-importlib-metadata
%endif
%if %{with libalternatives}
Requires: alts
BuildRequires: alts
@ -81,7 +82,10 @@ install -Dm0644 doc/pygmentize.1 %{buildroot}%{_mandir}/man1/pygmentize.1
%fdupes %{buildroot}%{$python_sitelib}
}
%prepare_alternative pygmentize
%check
# skip test that requires wcag-contrast-ratio Python package
rm ./tests/contrast/test_contrasts.py
%pytest
%pre
# If libalternatives is used: Removing old update-alternatives entries.
@ -93,17 +97,12 @@ install -Dm0644 doc/pygmentize.1 %{buildroot}%{_mandir}/man1/pygmentize.1
%postun
%python_uninstall_alternative pygmentize
%check
# skip test that requires wcag-contrast-ratio Python package
rm ./tests/contrast/test_contrasts.py
%pytest
%files %{python_files}
%license LICENSE
%doc AUTHORS CHANGES
%python_alternative %{_bindir}/pygmentize
%python_alternative %{_mandir}/man1/pygmentize.1%{ext_man}
%{python_sitelib}/pygments/
%{python_sitelib}/Pygments-%{version}-py%{python_version}.egg-info/
%{python_sitelib}/pygments
%{python_sitelib}/Pygments-%{version}*-info
%changelog