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/pypi/Pygments
15 Source0: http://pypi.python.org/packages/source/P/Pygments/Pygments-%{version}.tar.gz
16 # Source0-md5: 238587a1370d62405edabd0794b3ec4a
18 URL: http://pygments.org/
19 BuildRequires: rpmbuild(macros) >= 1.710
22 BuildRequires: python-devel >= 1:2.6
23 BuildRequires: python-modules
24 BuildRequires: python-setuptools
27 BuildRequires: python3
28 BuildRequires: python3-2to3
29 BuildRequires: python3-devel
30 BuildRequires: python3-modules
31 BuildRequires: python3-setuptools
33 BuildRequires: rpm-pythonprov
34 Requires: python-modules
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
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}
129 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
130 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
137 mv $RPM_BUILD_ROOT%{_bindir}/pygmentize{,-3}
141 ln -sf pygmentize-2 $RPM_BUILD_ROOT%{_bindir}/pygmentize
145 rm -rf $RPM_BUILD_ROOT
149 %defattr(644,root,root,755)
150 %doc AUTHORS CHANGES LICENSE TODO
151 %attr(755,root,root) %{_bindir}/pygmentize
152 %attr(755,root,root) %{_bindir}/pygmentize-2
153 %{py_sitescriptdir}/%{module}
154 %{py_sitescriptdir}/Pygments-%{version}-py*.egg-info
158 %files -n python3-%{module}
159 %defattr(644,root,root,755)
160 %doc AUTHORS CHANGES LICENSE TODO
161 %attr(755,root,root) %{_bindir}/pygmentize-3
162 %{py3_sitescriptdir}/%{module}
163 %{py3_sitescriptdir}/Pygments-%{version}-py*.egg-info