%global upstream_name Pygments
Name: python3-pygments
Version: 2.2.0
Release: 1%{?dist}
Summary: Syntax highlighting engine written in Python
License: BSD
URL: http://pygments.org/
Source0: https://files.pythonhosted.org/packages/source/P/%{upstream_name}/%{upstream_name}-%{version}.tar.gz
BuildArch: noarch
# For docs for now
BuildRequires: python-sphinx%{?el6:10}
#BuildRequires: python-setuptools
%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
* 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 doc
Summary: Documentation for Pygments
%description doc
Documentation for Pygments.
%package -n python%{python3_pkgversion}-pygments
Summary: Syntax highlighting engine written in Python 3
BuildRequires: python%{python3_pkgversion}-devel
BuildRequires: python%{python3_pkgversion}-setuptools
BuildRequires: python%{python3_pkgversion}-nose
Requires: python%{python3_pkgversion}-setuptools
%description -n python%{python3_pkgversion}-pygments
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!
%prep
%setup -q -n Pygments-%{version}
%{__sed} -i 's/\r//' LICENSE
%build
%py3_build
%install
%py3_install
mv %{buildroot}%{_bindir}/pygmentize %{buildroot}%{_bindir}/pygmentize-%{python3_version}
make SPHINXBUILD="PYTHONPATH=.. sphinx-%{?el6:1.0-}build" docs
install -d %{buildroot}%{_mandir}/man1
install -p -m0644 doc/pygmentize.1 %{buildroot}%{_mandir}/man1/pygmentize-%{python3_version}.1
cp -r doc/docs doc/reST
rm doc/_build/html/.buildinfo
%check
PYTHON=%{__python3} make test TEST=-v
%files -n python%{python3_pkgversion}-pygments
%license LICENSE
%doc AUTHORS CHANGES TODO
%{_bindir}/pygmentize-%{python3_version}
%{_mandir}/man1/*.1*
%{python3_sitelib}/*
%files doc
%license LICENSE
%doc doc/_build/html doc/reST
%changelog
* Tue Feb 28 2017 Orion Poplawski <[email protected]> - 2.2.0-1
- Update to 2.2.0
- Put documentation into separate package
* Wed Nov 2 2016 Orion Poplawski <[email protected]> - 2.1.3-1
- Initial EPEL version