python-pygments/python-pygments.spec
2021-01-26 00:37:29 +00:00

86 lines
2.5 KiB
RPMSpec

%define tarname pygments
Summary: Syntax highlighting package written in Python
Name: python-pygments
Version: 2.7.4
Release: 1
License: BSD
Group: Development/Python
Url: http://pygments.org/
Source0: https://github.com/pygments/pygments/archive/%{version}.tar.gz?/%{tarname}-%{version}.tar.gz
BuildRequires: pkgconfig(python2)
BuildRequires: pkgconfig(python3)
BuildRequires: pythonegg(setuptools)
BuildRequires: python3egg(setuptools)
Requires: python-pkg-resources
BuildArch: noarch
%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!
#--------------------------------------------------------------------
%package -n python2-pygments
%py2_migration_meta python2-pygments
Summary: Syntax highlighting package written in Python3
Group: Development/Python
%description -n python2-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 python2-pygments
%doc AUTHORS CHANGES LICENSE
%{python2_sitelib}/*
#--------------------------------------------------------------------
%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
%{python3_sitelib}/*
%{_bindir}/pygmentize
%{_mandir}/man1/pygmentize.*
#--------------------------------------------------------------------
%prep
%setup -qn %{tarname}-%{version}
cp -a . %{py3dir}
%build
pushd %{py3dir}
%py3_build
popd
%py2_build
%install
%py2_install
pushd %{py3dir}
%py3_install
popd
install -Dm0644 doc/pygmentize.1 %{buildroot}%{_mandir}/man1/pygmentize.1