Compare commits

...

No commits in common. 'i8c' and 'c9' have entirely different histories.
i8c ... c9

2
.gitignore vendored

@ -1 +1 @@
SOURCES/Pygments-2.2.0.tar.gz SOURCES/Pygments-2.7.4-clean.tar.xz

@ -1 +1 @@
5c6714bd6fd950c1478889f7b72fc7f6771d5163 SOURCES/Pygments-2.2.0.tar.gz 39403d12cda98e0dfd0a9e680b59d508cef1ed2c SOURCES/Pygments-2.7.4-clean.tar.xz

@ -0,0 +1,26 @@
#! /bin/bash -ex
# You can set the version as an argument to the script,
# default is taken from the specfile
if [ "$1" = "" ]; then
VERSION=$(
rpm -q --qf "%{VERSION}\n" --specfile python-pygments.spec | head -n1
)
else
VERSION=$1
fi
SRCURL=https://files.pythonhosted.org/packages/source/P/Pygments/Pygments-$VERSION.tar.gz
BADFILE=Pygments-$VERSION/tests/examplefiles/Intro.java
OUT=Pygments-$VERSION-clean.tar.xz
curl -L $SRCURL |
gunzip |
tar --delete $BADFILE --delete $BADFILE.output |
xz > $OUT
if tar tJf $OUT | grep 'Intro.java'; then
>&2 echo "Intro.java left in!"
mv $OUT $OUT.bad
exit 1
fi

@ -1,12 +0,0 @@
diff -ur Pygments-2.2.0/pygments/sphinxext.py Pygments-2.2.0.patch/pygments/sphinxext.py
--- Pygments-2.2.0/pygments/sphinxext.py 2017-01-22 16:01:32.000000000 -0500
+++ Pygments-2.2.0.patch/pygments/sphinxext.py 2018-03-19 12:57:52.099927570 -0400
@@ -16,7 +16,7 @@
from docutils import nodes
from docutils.statemachine import ViewList
-from sphinx.util.compat import Directive
+from docutils.parsers.rst import Directive
from sphinx.util.nodes import nested_parse_with_titles

@ -1,51 +1,25 @@
%global upstream_name Pygments # when bootstrapping, we cannot yet use sphinx and pytest
%global srcname pygments %bcond_without docs
%global sum Syntax highlighting engine written in Python %bcond_without tests
%if 0%{?fedora} || 0%{?rhel} > 7
%global with_python3 1
%endif
%if 0%{?rhel} > 7
# Disable python2 build by default
%bcond_with python2
%else
%bcond_without python2
%endif
Name: python-pygments Name: python-pygments
Version: 2.2.0 Version: 2.7.4
Release: 12%{?dist} Release: 4%{?dist}
Summary: %{sum} Summary: Syntax highlighting engine written in Python
License: BSD License: BSD
URL: http://pygments.org/ URL: https://pygments.org/
Source0: https://pypi.org/packages/source/P/%{upstream_name}/%{upstream_name}-%{version}.tar.gz
Patch0: import-directive.patch
BuildArch: noarch
%description
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 # One of the examples has a questionable licence clause, see:
* special attention is paid to details that increase highlighting # https://github.com/pygments/pygments/issues/1831
quality # To obtain a cleaned-up tarball, run:
* support for new languages and formats are added easily; most # $ ./get-clean-tarball.sh
languages use a simple regex-based lexing mechanism Source0: Pygments-%{version}-clean.tar.xz
* a number of output formats is available, among them HTML, RTF, Source1: get-clean-tarball.sh
LaTeX and ANSI sequences
* it is usable as a command-line tool and as a library
* ... and it highlights even Brainf*ck!
%if %{with python2} BuildArch: noarch
%package -n python2-%{srcname}
BuildRequires: python%{?fedora:2}-devel >= 2.4, python%{?fedora:2}-setuptools
BuildRequires: python%{?fedora:2}-nose, python%{?fedora:2}-sphinx
Summary: %{sum}
%{?python_provide:%python_provide python2-%{srcname}}
%description -n python2-%{srcname} %global _description %{expand:
Pygments is a generic syntax highlighter for general use in all kinds Pygments is a generic syntax highlighter for general use in all kinds
of software such as forum systems, wikis or other applications that of software such as forum systems, wikis or other applications that
need to prettify source code. Highlights are: need to prettify source code. Highlights are:
@ -58,98 +32,142 @@ need to prettify source code. Highlights are:
* a number of output formats is available, among them HTML, RTF, * a number of output formats is available, among them HTML, RTF,
LaTeX and ANSI sequences LaTeX and ANSI sequences
* it is usable as a command-line tool and as a library * it is usable as a command-line tool and as a library
* ... and it highlights even Brainf*ck! * ... and it highlights even Brainf*ck!}
%endif # with python2
%if 0%{?with_python3}
%package -n python3-%{srcname}
BuildRequires: python3-devel, python3-setuptools, python3-nose, python3-sphinx
Summary: %{sum}
%{?python_provide:%python_provide python3-%{srcname}}
%description -n python3-%{srcname} %description %_description
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 %package -n python%{python3_pkgversion}-pygments
* special attention is paid to details that increase highlighting BuildRequires: python%{python3_pkgversion}-devel
quality BuildRequires: pyproject-rpm-macros
* support for new languages and formats are added easily; most %if %{with tests}
languages use a simple regex-based lexing mechanism BuildRequires: make
* a number of output formats is available, among them HTML, RTF, BuildRequires: python%{python3_pkgversion}-pytest
LaTeX and ANSI sequences %endif
* it is usable as a command-line tool and as a library %if %{with docs}
* ... and it highlights even Brainf*ck! BuildRequires: python%{python3_pkgversion}-sphinx
%endif %endif
Summary: Syntax highlighting engine written in Python
%{?python_provide:%python_provide python%{python3_pkgversion}-pygments}
%description -n python%{python3_pkgversion}-pygments %_description
%prep %prep
%setup -q -n %{upstream_name}-%{version} %autosetup -p1 -n Pygments-%{version}
%patch0 -p 1
%build %generate_buildrequires
%{__sed} -i 's/\r//' LICENSE %pyproject_buildrequires
%if %{with python2}
%py2_build
%endif # with python2
%if 0%{?with_python3} %build
%py3_build sed -i 's/\r//' LICENSE
%endif %pyproject_wheel
%install %install
# Python 2 install %pyproject_install
# NOTE: sphinx is built on Python3 and packages with python2 and python3 %pyproject_save_files pygments
%if %{with python2}
%py2_install %if %{with docs}
%endif # with python2 %{python3} setup.py build_sphinx
rm -rf build/sphinx/html/.buildinfo
%{__python3} setup.py build_sphinx install doc/pygmentize.1 -Dt %{buildroot}%{_mandir}/man1/
pushd doc chmod -x %{buildroot}%{_mandir}/man1/*.1
install -d %{buildroot}%{_mandir}/man1 %endif
mv pygmentize.1 $RPM_BUILD_ROOT%{_mandir}/man1/pygmentize.1
popd
cp -r doc/docs doc/reST cp -r doc/docs doc/reST
%if 0%{?with_python3}
# Python 3 install
%py3_install
%endif
%if %{with tests}
%check %check
%if %{with python2} make test PYTHON=%{python3}
PYTHON=%{__python2} make test
%endif # with python2
PYTHON=%{__python3} make test
%if %{with python2}
%files -n python2-pygments
%doc AUTHORS CHANGES build/sphinx/html doc/reST TODO
%license LICENSE
# For noarch packages: sitelib
%{python2_sitelib}/*
# Fix build on EL7
%if !0%{?fedora} && 0%{?rhel} <= 7
%{_bindir}/pygmentize
%lang(en) %{_mandir}/man1/pygmentize.1*
%endif %endif
%endif # with python2
%if 0%{?with_python3}
%files -n python3-pygments %files -n python%{python3_pkgversion}-pygments -f %{pyproject_files}
%doc AUTHORS CHANGES build/sphinx/html doc/reST TODO %doc AUTHORS CHANGES doc/reST
%license LICENSE %license LICENSE
%{python3_sitelib}/*
%{_bindir}/pygmentize %{_bindir}/pygmentize
%if %{with docs}
%lang(en) %{_mandir}/man1/pygmentize.1* %lang(en) %{_mandir}/man1/pygmentize.1*
%doc build/sphinx/html
%endif %endif
%changelog %changelog
* Wed May 08 2024 Arkady L. Shane <tigro@msvsphere-os.ru> - 2.2.0-12 * Tue Aug 10 2021 Mohan Boddu <mboddu@redhat.com> - 2.7.4-4
- Rebuilt for MSVSphere 8.9 - Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
Related: rhbz#1991688
* Thu Jun 03 2021 Petr Viktorin <pviktori@redhat.com> - 2.7.4-3
- 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
* Fri Jan 29 12:41:43 CET 2021 Tomas Hrnciar <thrnciar@redhat.com> - 2.7.4-1
- Update to 2.7.4
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.7.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Wed Nov 25 2020 Petr Viktorin <pviktori@redhat.com> - 2.7.2-1
- Update to 2.7.2
* Mon Oct 12 2020 Tomas Hrnciar <thrnciar@redhat.com> - 2.7.1-1
- Update to 2.7.1
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.6.1-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Fri May 22 2020 Miro Hrončok <mhroncok@redhat.com> - 2.6.1-3
- Rebuilt for Python 3.9
* Fri May 22 2020 Miro Hrončok <mhroncok@redhat.com> - 2.6.1-2
- Bootstrap for Python 3.9
* Tue May 19 2020 Miro Hrončok <mhroncok@redhat.com> - 2.6.1-1
- Update to 2.6.1 (#1776922)
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.4.2-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Fri Nov 15 2019 Miro Hrončok <mhroncok@redhat.com> - 2.4.2-6
- Subpackage python2-pygments has been removed
See https://fedoraproject.org/wiki/Changes/RetirePython2
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 2.4.2-5
- Rebuilt for Python 3.8.0rc1 (#1748018)
* Thu Aug 15 2019 Miro Hrončok <mhroncok@redhat.com> - 2.4.2-4
- Rebuilt for Python 3.8
* Thu Aug 15 2019 Miro Hrončok <mhroncok@redhat.com> - 2.4.2-3
- Bootstrap for Python 3.8
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.4.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Wed Jul 10 2019 Kevin Fenzi <kevin@scrye.com> - 2.4.2-1
- Update to 2.4.2. Fixes bug #1707945
* Tue Mar 12 2019 Miro Hrončok <mhroncok@redhat.com> - 2.3.1-1
- Update to 2.3.1
* Mon Mar 11 2019 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 2.2.0-17
- Use python3-sphinx to build docs
* Tue Feb 26 2019 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 2.2.0-16
- Add missing setuptools Requires
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.0-15
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.0-14
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Wed Jul 04 2018 Miro Hrončok <mhroncok@redhat.com> - 2.2.0-13
- Run tests
- Add fix for 3.7
* Thu Jun 14 2018 Charalampos Stratakis <cstratak@redhat.com> - 2.2.0-12 * Thu Jun 14 2018 Miro Hrončok <mhroncok@redhat.com> - 2.2.0-12
- Conditionalize the python2 subpackage - Rebuilt for Python 3.7
* Mon Mar 19 2018 Steve Milner <smilner@redhat.com> - 2.2.0-11 * Mon Mar 19 2018 Steve Milner <smilner@redhat.com> - 2.2.0-11
- Added import-directive.patch to work around a change in sphinx. - Added import-directive.patch to work around a change in sphinx.
@ -163,7 +181,7 @@ PYTHON=%{__python3} make test
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.0-8 * Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.0-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
* Thu Mar 22 2017 Steve Milner <smilner@redhat.com> - 2.2.0-7 * Thu Mar 23 2017 Steve Milner <smilner@redhat.com> - 2.2.0-7
- Fixed python2 sitelib in files section. - Fixed python2 sitelib in files section.
* Wed Mar 22 2017 Steve Milner <smilner@redhat.com> - 2.2.0-6 * Wed Mar 22 2017 Steve Milner <smilner@redhat.com> - 2.2.0-6

Loading…
Cancel
Save