3 %define module pygments
5 Summary: Generic syntax highlighter
10 Group: Development/Languages/Python
11 Source0: http://pypi.python.org/packages/source/P/Pygments/Pygments-%{version}.tar.gz
12 # Source0-md5: 54be67c04834f13d7e255e1797d629a5
13 URL: http://pygments.org/
14 BuildRequires: python-devel
15 %pyrequires_eq python-modules
17 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
20 Pygments is a generic syntax highlighter for general use in all kinds of
21 software such as forum systems, wikis or other applications that need to
22 prettify source code. Highlights are
23 - a wide range of common languages and markup formats is supported
24 - special attention is paid to details that increase highlighting quality
25 - support for new languages and formats are added easily; most languages
26 use a simple regex-based lexing mechanism
27 - a number of output formats is available, among them HTML, RTF, LaTeX and
29 - it is usable as a command-line tool and as a library
30 - ... and it highlights even Brainf*ck!
32 %package -n python3-%{module}
33 Summary: Generic syntax highlighter
34 Group: Development/Languages/Python
36 %description -n python3-%{module}
37 Pygments is a generic syntax highlighter for general use in all kinds of
38 software such as forum systems, wikis or other applications that need to
39 prettify source code. Highlights are
40 - a wide range of common languages and markup formats is supported
41 - special attention is paid to details that increase highlighting quality
42 - support for new languages and formats are added easily; most languages
43 use a simple regex-based lexing mechanism
44 - a number of output formats is available, among them HTML, RTF, LaTeX and
46 - it is usable as a command-line tool and as a library
47 - ... and it highlights even Brainf*ck!
50 %setup -q -n Pygments-%{version}
54 %{__python} setup.py build -b build-2
58 %{__python3} setup.py build -b build-3
62 rm -rf $RPM_BUILD_ROOT
65 %{__python} setup.py \
69 --root=$RPM_BUILD_ROOT
71 mv $RPM_BUILD_ROOT%{_bindir}/pygmentize{,-2}
77 %{__python3} setup.py \
81 --root=$RPM_BUILD_ROOT
83 mv $RPM_BUILD_ROOT%{_bindir}/pygmentize{,-3}
88 ln -s pygmentize-2 $RPM_BUILD_ROOT%{_bindir}/pygmentize
91 rm -rf $RPM_BUILD_ROOT
95 %defattr(644,root,root,755)
96 %doc PKG-INFO TODO AUTHORS
97 %attr(755,root,root) %{_bindir}/pygmentize
98 %attr(755,root,root) %{_bindir}/pygmentize-2
99 %{py_sitescriptdir}/%{module}
100 %{py_sitescriptdir}/*Pygments*.egg*
104 %files -n python3-%{module}
105 %defattr(644,root,root,755)
106 %doc PKG-INFO TODO AUTHORS
107 %attr(755,root,root) %{_bindir}/pygmentize-3
108 %{py3_sitescriptdir}/%{module}
109 %{py3_sitescriptdir}/*Pygments*.egg*