|
|
|
@ -1,105 +1,195 @@
|
|
|
|
|
# when bootstrapping, we cannot yet use sphinx and pytest
|
|
|
|
|
%bcond_without docs
|
|
|
|
|
%bcond_without tests
|
|
|
|
|
# on RHEL, we don't need to build the documentation
|
|
|
|
|
%bcond docs %{undefined rhel}
|
|
|
|
|
%bcond tests 1
|
|
|
|
|
|
|
|
|
|
Name: python-pygments
|
|
|
|
|
Version: 2.7.4
|
|
|
|
|
Release: 4%{?dist}
|
|
|
|
|
Version: 2.17.2
|
|
|
|
|
Release: 5%{?dist}
|
|
|
|
|
Summary: Syntax highlighting engine written in Python
|
|
|
|
|
|
|
|
|
|
License: BSD
|
|
|
|
|
License: BSD-2-Clause
|
|
|
|
|
URL: https://pygments.org/
|
|
|
|
|
|
|
|
|
|
# One of the examples has a questionable licence clause, see:
|
|
|
|
|
# https://github.com/pygments/pygments/issues/1831
|
|
|
|
|
# To obtain a cleaned-up tarball, run:
|
|
|
|
|
# $ ./get-clean-tarball.sh
|
|
|
|
|
Source0: Pygments-%{version}-clean.tar.xz
|
|
|
|
|
Source1: get-clean-tarball.sh
|
|
|
|
|
Source0: %{pypi_source pygments}
|
|
|
|
|
|
|
|
|
|
BuildArch: noarch
|
|
|
|
|
|
|
|
|
|
%global _description %{expand:
|
|
|
|
|
Pygments is a generic syntax highlighter for general use in all kinds
|
|
|
|
|
of software such as forum systems, wikis or other applications that
|
|
|
|
|
need to prettify source code. Highlights are:
|
|
|
|
|
|
|
|
|
|
* a wide range of common languages and markup formats is supported
|
|
|
|
|
* special attention is paid to details that increase highlighting
|
|
|
|
|
quality
|
|
|
|
|
* support for new languages and formats are added easily; most
|
|
|
|
|
languages use a simple regex-based lexing mechanism
|
|
|
|
|
* a number of output formats is available, among them HTML, RTF,
|
|
|
|
|
LaTeX and ANSI sequences
|
|
|
|
|
* it is usable as a command-line tool and as a library
|
|
|
|
|
* ... and it highlights even Brainf*ck!}
|
|
|
|
|
|
|
|
|
|
%description %_description
|
|
|
|
|
|
|
|
|
|
%package -n python%{python3_pkgversion}-pygments
|
|
|
|
|
BuildRequires: python%{python3_pkgversion}-devel
|
|
|
|
|
BuildRequires: pyproject-rpm-macros
|
|
|
|
|
%if %{with tests}
|
|
|
|
|
BuildRequires: make
|
|
|
|
|
BuildRequires: python%{python3_pkgversion}-pytest
|
|
|
|
|
BuildRequires: python%{python3_pkgversion}-lxml
|
|
|
|
|
%if %{undefined rhel}
|
|
|
|
|
# this is only used in tests.contrast.test_contrasts
|
|
|
|
|
# to avoid pulling this package into RHEL, the test is ignored in %%check
|
|
|
|
|
BuildRequires: python%{python3_pkgversion}-wcag-contrast-ratio
|
|
|
|
|
%endif
|
|
|
|
|
%endif
|
|
|
|
|
%if %{with docs}
|
|
|
|
|
BuildRequires: make
|
|
|
|
|
BuildRequires: python%{python3_pkgversion}-sphinx
|
|
|
|
|
# the sphinx config imports tests.contrast.test_contrasts:
|
|
|
|
|
BuildRequires: python%{python3_pkgversion}-wcag-contrast-ratio
|
|
|
|
|
%endif
|
|
|
|
|
Summary: Syntax highlighting engine written in Python
|
|
|
|
|
%{?python_provide:%python_provide python%{python3_pkgversion}-pygments}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%global _description %{expand:
|
|
|
|
|
Pygments is a generic syntax highlighter suitable for use in code hosting,
|
|
|
|
|
forums, wikis or other applications that need to prettify source code.
|
|
|
|
|
|
|
|
|
|
Highlights are:
|
|
|
|
|
|
|
|
|
|
* a wide range of over 500 languages and other text formats is supported
|
|
|
|
|
* special attention is paid to details that increase highlighting quality
|
|
|
|
|
* support for new languages and formats are added easily;
|
|
|
|
|
most languages use a simple regex-based lexing mechanism
|
|
|
|
|
* a number of output formats is available, among them HTML, RTF, LaTeX
|
|
|
|
|
and ANSI sequences
|
|
|
|
|
* it is usable as a command-line tool and as a library}
|
|
|
|
|
|
|
|
|
|
%description %_description
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%package -n python%{python3_pkgversion}-pygments
|
|
|
|
|
Summary: %{summary}
|
|
|
|
|
Provides: pygmentize = %{?epoch:%{epoch}:}%{version}-%{release}
|
|
|
|
|
|
|
|
|
|
%description -n python%{python3_pkgversion}-pygments %_description
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%prep
|
|
|
|
|
%autosetup -p1 -n Pygments-%{version}
|
|
|
|
|
%autosetup -p1 -n pygments-%{version}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%generate_buildrequires
|
|
|
|
|
%pyproject_buildrequires
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%build
|
|
|
|
|
sed -i 's/\r//' LICENSE
|
|
|
|
|
%pyproject_wheel
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
|
%pyproject_install
|
|
|
|
|
%pyproject_save_files pygments
|
|
|
|
|
|
|
|
|
|
%if %{with docs}
|
|
|
|
|
%{python3} setup.py build_sphinx
|
|
|
|
|
rm -rf build/sphinx/html/.buildinfo
|
|
|
|
|
install doc/pygmentize.1 -Dt %{buildroot}%{_mandir}/man1/
|
|
|
|
|
|
|
|
|
|
%if %{with docs}
|
|
|
|
|
%make_build -C doc html
|
|
|
|
|
rm doc/_build/html/.buildinfo
|
|
|
|
|
rm -rf doc/_build/html/_sources
|
|
|
|
|
chmod -x %{buildroot}%{_mandir}/man1/*.1
|
|
|
|
|
%endif
|
|
|
|
|
cp -r doc/docs doc/reST
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%if %{with tests}
|
|
|
|
|
%check
|
|
|
|
|
make test PYTHON=%{python3}
|
|
|
|
|
%pytest %{?rhel:--ignore tests/contrast/test_contrasts.py}
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%files -n python%{python3_pkgversion}-pygments -f %{pyproject_files}
|
|
|
|
|
%doc AUTHORS CHANGES doc/reST
|
|
|
|
|
%doc AUTHORS CHANGES
|
|
|
|
|
%{?with_docs:%doc doc/_build/html}
|
|
|
|
|
%license LICENSE
|
|
|
|
|
%{_bindir}/pygmentize
|
|
|
|
|
%if %{with docs}
|
|
|
|
|
%lang(en) %{_mandir}/man1/pygmentize.1*
|
|
|
|
|
%doc build/sphinx/html
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%changelog
|
|
|
|
|
* Tue Aug 10 2021 Mohan Boddu <mboddu@redhat.com> - 2.7.4-4
|
|
|
|
|
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
|
|
|
|
|
Related: rhbz#1991688
|
|
|
|
|
* Tue Oct 29 2024 Troy Dawson <tdawson@redhat.com> - 2.17.2-5
|
|
|
|
|
- Bump release for October 2024 mass rebuild:
|
|
|
|
|
Resolves: RHEL-64018
|
|
|
|
|
|
|
|
|
|
* Fri Oct 25 2024 MSVSphere Packaging Team <packager@msvsphere-os.ru> - 2.17.2-4
|
|
|
|
|
- Rebuilt for MSVSphere 10
|
|
|
|
|
|
|
|
|
|
* Mon Jun 24 2024 Troy Dawson <tdawson@redhat.com> - 2.17.2-4
|
|
|
|
|
- Bump release for June 2024 mass rebuild
|
|
|
|
|
|
|
|
|
|
* Fri Jan 26 2024 Fedora Release Engineering <releng@fedoraproject.org> - 2.17.2-3
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Mon Jan 22 2024 Fedora Release Engineering <releng@fedoraproject.org> - 2.17.2-2
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Wed Dec 13 2023 Karolina Surma <ksurma@redhat.com> - 2.17.2-1
|
|
|
|
|
- Update to 2.17.2
|
|
|
|
|
- Fixes: rhbz#2250432
|
|
|
|
|
|
|
|
|
|
* Mon Aug 14 2023 Karolina Surma <ksurma@redhat.com> - 2.16.1-1
|
|
|
|
|
- Update to 2.16.1
|
|
|
|
|
- Fixes: rhbz#2229493
|
|
|
|
|
|
|
|
|
|
* Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 2.15.1-4
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Fri Jun 16 2023 Python Maint <python-maint@redhat.com> - 2.15.1-3
|
|
|
|
|
- Rebuilt for Python 3.12
|
|
|
|
|
|
|
|
|
|
* Tue Jun 13 2023 Python Maint <python-maint@redhat.com> - 2.15.1-2
|
|
|
|
|
- Bootstrap for Python 3.12
|
|
|
|
|
|
|
|
|
|
* Tue May 02 2023 Karolina Surma <ksurma@redhat.com> - 2.15.1-1
|
|
|
|
|
- Update to 2.15.1
|
|
|
|
|
- Fixes: rhbz#2185608
|
|
|
|
|
|
|
|
|
|
* Thu Feb 16 2023 Miro Hrončok <mhroncok@redhat.com> - 2.14.0-2
|
|
|
|
|
- Don't build the documentation (and drop undesired dependencies) in Fedora ELN
|
|
|
|
|
|
|
|
|
|
* Mon Jan 30 2023 Parag Nemade <pnemade AT redhat DOT com> - 2.14.0-1
|
|
|
|
|
- Update to 2.14.0 (#2157264)
|
|
|
|
|
- Update license tag to SPDX expression
|
|
|
|
|
|
|
|
|
|
* Thu Jun 03 2021 Petr Viktorin <pviktori@redhat.com> - 2.7.4-3
|
|
|
|
|
* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 2.13.0-2
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Wed Sep 07 2022 Karolina Surma <ksurma@redhat.com> - 2.13.0-1
|
|
|
|
|
- Update to 2.13.0
|
|
|
|
|
- Fixes: rhbz#2118377
|
|
|
|
|
|
|
|
|
|
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.12.0-4
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Mon Jun 13 2022 Python Maint <python-maint@redhat.com> - 2.12.0-3
|
|
|
|
|
- Rebuilt for Python 3.11
|
|
|
|
|
|
|
|
|
|
* Mon Jun 13 2022 Python Maint <python-maint@redhat.com> - 2.12.0-2
|
|
|
|
|
- Bootstrap for Python 3.11
|
|
|
|
|
|
|
|
|
|
* Mon May 02 2022 Charalampos Stratakis <cstratak@redhat.com> - 2.12.0-1
|
|
|
|
|
- Update to 2.12.0
|
|
|
|
|
- Fixes: rhbz#2078223
|
|
|
|
|
|
|
|
|
|
* Fri Feb 11 2022 Karolina Surma <ksurma@redhat.com> - 2.11.2-1
|
|
|
|
|
- Update to 2.11.2
|
|
|
|
|
- Fixes: rhbz#2036218
|
|
|
|
|
|
|
|
|
|
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.10.0-2
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Mon Aug 16 2021 Miro Hrončok <mhroncok@redhat.com> - 2.10.0-1
|
|
|
|
|
- Update to 2.10.0
|
|
|
|
|
- Fixes: rhbz#1993673
|
|
|
|
|
|
|
|
|
|
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.9.0-2
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Fri Jun 11 2021 Karolina Surma <ksurma@redhat.com> - 2.9.0-1
|
|
|
|
|
- Update to 2.9.0 (rhbz#1956417)
|
|
|
|
|
|
|
|
|
|
* Thu Jun 03 2021 Petr Viktorin <pviktori@redhat.com> - 2.8.1-4
|
|
|
|
|
- Remove test files with a no-nuclear license from the sources
|
|
|
|
|
- Related: rhbz#1950291
|
|
|
|
|
|
|
|
|
|
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 2.7.4-2
|
|
|
|
|
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
|
|
|
|
|
* Wed Jun 02 2021 Python Maint <python-maint@redhat.com> - 2.8.1-3
|
|
|
|
|
- Rebuilt for Python 3.10
|
|
|
|
|
|
|
|
|
|
* Wed Jun 02 2021 Python Maint <python-maint@redhat.com> - 2.8.1-2
|
|
|
|
|
- Bootstrap for Python 3.10
|
|
|
|
|
|
|
|
|
|
* Wed Mar 10 2021 Charalampos Stratakis <cstratak@redhat.com> - 2.8.1-1
|
|
|
|
|
- Update to 2.8.1 (rhbz#1928510)
|
|
|
|
|
|
|
|
|
|
* Fri Jan 29 12:41:43 CET 2021 Tomas Hrnciar <thrnciar@redhat.com> - 2.7.4-1
|
|
|
|
|
- Update to 2.7.4
|
|
|
|
|