%define tarname Pygments Summary: Syntax highlighting package written in Python Name: python-pygments Version: 2.2.0 Release: 4 License: BSD Group: Development/Python Url: http://pygments.org/ Source0: https://files.pythonhosted.org/packages/source/P/%{tarname}/%{tarname}-%{version}.tar.gz BuildRequires: pkgconfig(python) BuildRequires: pkgconfig(python3) BuildRequires: python-setuptools BuildRequires: python3-setuptools Requires: python-pkg-resources BuildArch: noarch Obsoletes: python3-pygments < 2.2.0 Provides: python3-pygments = %{version}-%{release} %description Pygments is a syntax highlighting package written in Python. It 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, increasing quality by a fair amount * support for new languages and formats are added easily * a number of output formats, presently HTML, LaTeX, RTF, SVG and ANSI sequences * it is usable as a command-line tool and as a library * ... and it highlights even Brainf*ck! %files %doc AUTHORS CHANGES LICENSE TODO %{python_sitelib}/* %{_bindir}/pygmentize %{_mandir}/man1/pygmentize.* #-------------------------------------------------------------------- %package -n python3-pygments Summary: Syntax highlighting package written in Python3 Group: Development/Python %description -n python3-pygments Pygments is a syntax highlighting package written in Python. It 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. %files -n python3-pygments %doc AUTHORS CHANGES LICENSE TODO %{python3_sitelib}/* #-------------------------------------------------------------------- %prep %setup -qn %{tarname}-%{version} cp -a . %{py3dir} %build pushd %{py3dir} %py3_build popd %py_build %install pushd %{py3dir} %py3_install popd %py_install install -Dm0644 doc/pygmentize.1 %{buildroot}%{_mandir}/man1/pygmentize.1