3 %bcond_without python2 # CPython 2.x module
4 %bcond_without python3 # CPython 3.x module
6 %define module pygments
7 Summary: A generic syntax highlighter as Python 2.x module
8 Summary(pl.UTF-8): Moduł Pythona 2.x do ogólnego podświetlania składni
13 Group: Development/Languages/Python
14 #Source0Download: https://pypi.python.org/simple/Pygments
15 Source0: https://pypi.python.org/packages/source/P/Pygments/Pygments-%{version}.tar.gz
16 # Source0-md5: ed3fba2467c8afcda4d317e4ef2c6150
18 URL: http://pygments.org/
19 BuildRequires: rpmbuild(macros) >= 1.714
21 BuildRequires: python >= 1:2.6
22 BuildRequires: python-devel >= 1:2.6
23 BuildRequires: python-modules >= 1:2.6
24 BuildRequires: python-setuptools
27 BuildRequires: python3 >= 1:3.2
28 BuildRequires: python3-2to3 >= 1:3.2
29 BuildRequires: python3-devel >= 1:3.2
30 BuildRequires: python3-modules >= 1:3.2
31 BuildRequires: python3-setuptools
33 BuildRequires: rpm-pythonprov
34 Requires: python-modules >= 1:2.6
35 Requires: python-setuptools
36 Provides: python-Pygments = %{version}-%{release}
37 Obsoletes: python-Pygments
39 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
42 Pygments is a generic syntax highlighter for general use in all kinds
43 of software such as forum systems, wikis or other applications that
44 need to prettify source code. Highlights are:
45 - a wide range of common languages and markup formats is supported
46 - special attention is paid to details that increase highlighting
48 - support for new languages and formats are added easily; most
49 languages use a simple regex-based lexing mechanism
50 - a number of output formats is available, among them HTML, RTF, LaTeX
52 - it is usable as a command-line tool and as a library
53 - ... and it highlights even Brainf*ck!
55 %description -l pl.UTF-8
56 Pygments to moduł Pythona do podświetlania składni ogólnego
57 przeznaczenia we wszelkiego rodzaju programach, takich jaka systemy
58 forów, wiki i inne plikacje wymagające ładnego wyświetlania kodu
59 źródłowego. Zalety Pygments to:
60 - obsługiwany szeroki zakres popularnych języków i formatów znaczników
61 - zwrócenie szczególnej uwagi na szczegóły zwiększające jakość
63 - łatwa obsługa nowych języków i formatów; większość języków
64 wykorzystuje prosty mechanizm analizy leksykalnej oparty o wyrażenia
66 - dostępność wielu formatów wyjściowych, m.in. HTML, RTF, LaTeX i
68 - możliwość używania z linii poleceń oraz jako biblioteki
69 - ...a także - podświetla nawet Brainf*cka!
71 %package -n python3-%{module}
72 Summary: Generic syntax highlighter as Python 3.x module
73 Summary(pl.UTF-8): Moduł Pythona 3.x do ogólnego podświetlania składni
74 Group: Development/Languages/Python
75 Requires: python3-modules >= 1:3.2
76 Requires: python3-setuptools
78 %description -n python3-%{module}
79 Pygments is a generic syntax highlighter for general use in all kinds
80 of software such as forum systems, wikis or other applications that
81 need to prettify source code. Highlights are
82 - a wide range of common languages and markup formats is supported
83 - special attention is paid to details that increase highlighting
85 - support for new languages and formats are added easily; most
86 languages use a simple regex-based lexing mechanism
87 - a number of output formats is available, among them HTML, RTF, LaTeX
89 - it is usable as a command-line tool and as a library
90 - ... and it highlights even Brainf*ck!
92 %description -n python3-%{module} -l pl.UTF-8
93 Pygments to moduł Pythona do podświetlania składni ogólnego
94 przeznaczenia we wszelkiego rodzaju programach, takich jaka systemy
95 forów, wiki i inne plikacje wymagające ładnego wyświetlania kodu
96 źródłowego. Zalety Pygments to:
97 - obsługiwany szeroki zakres popularnych języków i formatów znaczników
98 - zwrócenie szczególnej uwagi na szczegóły zwiększające jakość
100 - łatwa obsługa nowych języków i formatów; większość języków
101 wykorzystuje prosty mechanizm analizy leksykalnej oparty o wyrażenia
103 - dostępność wielu formatów wyjściowych, m.in. HTML, RTF, LaTeX i
105 - możliwość używania z linii poleceń oraz jako biblioteki
106 - ...a także - podświetla nawet Brainf*cka!
109 %setup -q -n Pygments-%{version}
122 rm -rf $RPM_BUILD_ROOT
127 %{__mv} $RPM_BUILD_ROOT%{_bindir}/pygmentize{,-2}
135 %{__mv} $RPM_BUILD_ROOT%{_bindir}/pygmentize{,-3}
139 ln -sf pygmentize-2 $RPM_BUILD_ROOT%{_bindir}/pygmentize
143 rm -rf $RPM_BUILD_ROOT
147 %defattr(644,root,root,755)
148 %doc AUTHORS CHANGES LICENSE TODO
149 %attr(755,root,root) %{_bindir}/pygmentize
150 %attr(755,root,root) %{_bindir}/pygmentize-2
151 %{py_sitescriptdir}/%{module}
152 %{py_sitescriptdir}/Pygments-%{version}-py*.egg-info
156 %files -n python3-%{module}
157 %defattr(644,root,root,755)
158 %doc AUTHORS CHANGES LICENSE TODO
159 %attr(755,root,root) %{_bindir}/pygmentize-3
160 %{py3_sitescriptdir}/%{module}
161 %{py3_sitescriptdir}/Pygments-%{version}-py*.egg-info