python-pygments/python-pygments.spec

125 lines
3.3 KiB
RPMSpec
Raw Normal View History

2020-04-09 18:17:38 +09:00
%define tarname pygments
2012-02-01 15:07:53 +04:00
2013-12-08 17:07:11 +04:00
Summary: Syntax highlighting package written in Python
2018-03-12 23:25:21 +03:00
Name: python-pygments
2025-02-10 20:18:50 +00:00
Version: 2.11.2
2020-04-09 18:17:38 +09:00
Release: 1
2013-12-08 17:07:11 +04:00
License: BSD
2018-03-12 23:25:21 +03:00
Group: Development/Python
2021-05-09 16:15:02 +03:00
URL: https://pygments.org
2020-04-09 18:17:38 +09:00
Source0: https://github.com/pygments/pygments/archive/%{version}.tar.gz?/%{tarname}-%{version}.tar.gz
2025-02-10 20:18:50 +00:00
BuildRequires: pkgconfig(python)
2018-03-12 23:25:21 +03:00
BuildRequires: pkgconfig(python3)
2020-04-09 18:17:38 +09:00
BuildRequires: pythonegg(setuptools)
BuildRequires: python3egg(setuptools)
2025-02-10 20:18:50 +00:00
BuildRequires: python38-devel
BuildRequires: python38-setuptools
2018-03-12 23:28:25 +03:00
Requires: python-pkg-resources
2018-03-12 23:25:21 +03:00
BuildArch: noarch
2012-02-01 15:07:53 +04:00
%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!
2020-03-19 12:15:43 +00:00
#--------------------------------------------------------------------
2025-02-10 20:18:50 +00:00
%package -n python-pygments
2020-03-19 12:15:43 +00:00
Summary: Syntax highlighting package written in Python3
Group: Development/Python
2025-02-10 20:18:50 +00:00
%description -n python-pygments
2020-03-19 12:15:43 +00:00
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.
2025-02-10 20:18:50 +00:00
%files -n python-pygments
2020-04-09 18:20:59 +09:00
%doc AUTHORS CHANGES LICENSE
2025-02-10 20:18:50 +00:00
%{_bindir}/pygmentize2
%{python_sitelib}/*
2018-03-12 23:25:21 +03:00
#--------------------------------------------------------------------
%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
2020-04-09 18:20:59 +09:00
%doc AUTHORS CHANGES LICENSE
2018-03-12 23:25:21 +03:00
%{python3_sitelib}/*
2025-02-10 20:18:50 +00:00
%{_bindir}/pygmentize3
#--------------------------------------------------------------------
%package -n python38-pygments
Summary: Syntax highlighting package written in Python3
Group: Development/Python
%description -n python38-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 python38-pygments
%doc AUTHORS CHANGES LICENSE
%{python38_sitelib}/*
2025-02-11 07:59:46 +00:00
%{_bindir}/pygmentize
2020-03-19 12:15:43 +00:00
%{_mandir}/man1/pygmentize.*
2018-03-12 23:25:21 +03:00
#--------------------------------------------------------------------
2012-02-01 15:07:53 +04:00
%prep
%setup -qn %{tarname}-%{version}
2012-02-01 15:07:53 +04:00
2018-03-12 23:25:21 +03:00
cp -a . %{py3dir}
2025-02-10 20:18:50 +00:00
cp -a . %{py38dir}
2018-03-12 23:25:21 +03:00
2012-02-01 15:07:53 +04:00
%build
2018-03-12 23:25:21 +03:00
pushd %{py3dir}
%py3_build
popd
2025-02-10 20:18:50 +00:00
pushd %{py38dir}
%py38_build
popd
%py_build
2012-02-01 15:07:53 +04:00
%install
2025-02-10 20:18:50 +00:00
%py_install
pushd %{buildroot}%{_bindir}
mv pygmentize pygmentize2
popd
2018-03-12 23:25:21 +03:00
pushd %{py3dir}
%py3_install
popd
2012-02-01 15:07:53 +04:00
2025-02-10 20:18:50 +00:00
pushd %{buildroot}%{_bindir}
mv pygmentize pygmentize3
popd
pushd %{py38dir}
%py38_install
popd
2018-03-12 23:25:21 +03:00
install -Dm0644 doc/pygmentize.1 %{buildroot}%{_mandir}/man1/pygmentize.1