Compare commits
No commits in common. "c8" and "c9-beta" have entirely different histories.
2
.gitignore
vendored
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
|
||||
|
26
SOURCES/get-clean-tarball.sh
Executable file
26
SOURCES/get-clean-tarball.sh
Executable file
@ -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,29 +1,25 @@
|
||||
%global upstream_name Pygments
|
||||
%global srcname pygments
|
||||
%global sum Syntax highlighting engine written in Python
|
||||
%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
|
||||
# when bootstrapping, we cannot yet use sphinx and pytest
|
||||
%bcond_without docs
|
||||
%bcond_without tests
|
||||
|
||||
Name: python-pygments
|
||||
Version: 2.2.0
|
||||
Release: 12%{?dist}
|
||||
Summary: %{sum}
|
||||
Version: 2.7.4
|
||||
Release: 4%{?dist}
|
||||
Summary: Syntax highlighting engine written in Python
|
||||
|
||||
License: BSD
|
||||
URL: http://pygments.org/
|
||||
Source0: https://pypi.org/packages/source/P/%{upstream_name}/%{upstream_name}-%{version}.tar.gz
|
||||
Patch0: import-directive.patch
|
||||
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
|
||||
|
||||
BuildArch: noarch
|
||||
|
||||
%description
|
||||
%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:
|
||||
@ -36,117 +32,142 @@ need to prettify source code. Highlights are:
|
||||
* 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!
|
||||
* ... and it highlights even Brainf*ck!}
|
||||
|
||||
%if %{with python2}
|
||||
%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 %_description
|
||||
|
||||
%description -n python2-%{srcname}
|
||||
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!
|
||||
%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}
|
||||
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!
|
||||
%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
|
||||
%endif
|
||||
%if %{with docs}
|
||||
BuildRequires: python%{python3_pkgversion}-sphinx
|
||||
%endif
|
||||
Summary: Syntax highlighting engine written in Python
|
||||
%{?python_provide:%python_provide python%{python3_pkgversion}-pygments}
|
||||
|
||||
%description -n python%{python3_pkgversion}-pygments %_description
|
||||
|
||||
%prep
|
||||
%setup -q -n %{upstream_name}-%{version}
|
||||
%patch0 -p 1
|
||||
%autosetup -p1 -n Pygments-%{version}
|
||||
|
||||
%generate_buildrequires
|
||||
%pyproject_buildrequires
|
||||
|
||||
%build
|
||||
%{__sed} -i 's/\r//' LICENSE
|
||||
%if %{with python2}
|
||||
%py2_build
|
||||
%endif # with python2
|
||||
|
||||
%if 0%{?with_python3}
|
||||
%py3_build
|
||||
%endif
|
||||
sed -i 's/\r//' LICENSE
|
||||
%pyproject_wheel
|
||||
|
||||
%install
|
||||
# Python 2 install
|
||||
# NOTE: sphinx is built on Python3 and packages with python2 and python3
|
||||
%if %{with python2}
|
||||
%py2_install
|
||||
%endif # with python2
|
||||
%pyproject_install
|
||||
%pyproject_save_files pygments
|
||||
|
||||
%{__python3} setup.py build_sphinx
|
||||
pushd doc
|
||||
install -d %{buildroot}%{_mandir}/man1
|
||||
mv pygmentize.1 $RPM_BUILD_ROOT%{_mandir}/man1/pygmentize.1
|
||||
popd
|
||||
%if %{with docs}
|
||||
%{python3} setup.py build_sphinx
|
||||
rm -rf build/sphinx/html/.buildinfo
|
||||
install doc/pygmentize.1 -Dt %{buildroot}%{_mandir}/man1/
|
||||
chmod -x %{buildroot}%{_mandir}/man1/*.1
|
||||
%endif
|
||||
cp -r doc/docs doc/reST
|
||||
|
||||
%if 0%{?with_python3}
|
||||
# Python 3 install
|
||||
%py3_install
|
||||
%endif
|
||||
|
||||
%if %{with tests}
|
||||
%check
|
||||
%if %{with python2}
|
||||
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*
|
||||
make test PYTHON=%{python3}
|
||||
%endif
|
||||
%endif # with python2
|
||||
|
||||
%if 0%{?with_python3}
|
||||
%files -n python3-pygments
|
||||
%doc AUTHORS CHANGES build/sphinx/html doc/reST TODO
|
||||
|
||||
%files -n python%{python3_pkgversion}-pygments -f %{pyproject_files}
|
||||
%doc AUTHORS CHANGES doc/reST
|
||||
%license LICENSE
|
||||
%{python3_sitelib}/*
|
||||
%{_bindir}/pygmentize
|
||||
%if %{with docs}
|
||||
%lang(en) %{_mandir}/man1/pygmentize.1*
|
||||
%doc build/sphinx/html
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Thu Jun 14 2018 Charalampos Stratakis <cstratak@redhat.com> - 2.2.0-12
|
||||
- Conditionalize the python2 subpackage
|
||||
* 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
|
||||
|
||||
* 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 Miro Hrončok <mhroncok@redhat.com> - 2.2.0-12
|
||||
- Rebuilt for Python 3.7
|
||||
|
||||
* Mon Mar 19 2018 Steve Milner <smilner@redhat.com> - 2.2.0-11
|
||||
- Added import-directive.patch to work around a change in sphinx.
|
||||
@ -160,7 +181,7 @@ PYTHON=%{__python3} make test
|
||||
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.0-8
|
||||
- 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.
|
||||
|
||||
* Wed Mar 22 2017 Steve Milner <smilner@redhat.com> - 2.2.0-6
|
||||
|
Loading…
Reference in New Issue
Block a user