Accepting request 989964 from devel:languages:python
- Add BR of wcag-contrast-ratio to enable more tests. - Removing a test file is too much a hack for me - 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/989964 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-Pygments?expand=0&rev=37
This commit is contained in:
@@ -1,3 +1,20 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Jul 18 12:58:46 UTC 2022 - Matej Cepl <mcepl@suse.com>
|
||||
|
||||
- Add BR of wcag-contrast-ratio to enable more tests.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Jul 18 12:11:36 UTC 2022 - Matej Cepl <mcepl@suse.com>
|
||||
|
||||
- Removing a test file is too much a hack for me
|
||||
|
||||
-------------------------------------------------------------------
|
||||
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>
|
||||
|
||||
|
@@ -34,14 +34,16 @@ 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: %{python_module wcag-contrast-ratio}
|
||||
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 +83,9 @@ 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
|
||||
%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
|
||||
|
Reference in New Issue
Block a user