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/
15 BuildRequires: python-devel
16 BuildRequires: python-modules
17 BuildRequires: python3
18 BuildRequires: python3-2to3
19 BuildRequires: python3-devel
20 BuildRequires: python3-distribute
21 BuildRequires: python3-modules
22 BuildRequires: rpm-pythonprov
23 %pyrequires_eq python-modules
25 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
28 Pygments is a generic syntax highlighter for general use in all kinds
29 of software such as forum systems, wikis or other applications that
30 need to prettify source code. Highlights are
31 - a wide range of common languages and markup formats is supported
32 - special attention is paid to details that increase highlighting
34 - support for new languages and formats are added easily; most
35 languages use a simple regex-based lexing mechanism
36 - a number of output formats is available, among them HTML, RTF, LaTeX
38 - it is usable as a command-line tool and as a library
39 - ... and it highlights even Brainf*ck!
41 %package -n python3-%{module}
42 Summary: Generic syntax highlighter
43 Group: Development/Languages/Python
45 %description -n python3-%{module}
46 Pygments is a generic syntax highlighter for general use in all kinds
47 of software such as forum systems, wikis or other applications that
48 need to prettify source code. Highlights are
49 - a wide range of common languages and markup formats is supported
50 - special attention is paid to details that increase highlighting
52 - support for new languages and formats are added easily; most
53 languages use a simple regex-based lexing mechanism
54 - a number of output formats is available, among them HTML, RTF, LaTeX
56 - it is usable as a command-line tool and as a library
57 - ... and it highlights even Brainf*ck!
60 %setup -q -n Pygments-%{version}
64 %{__python} setup.py build -b build-2
68 %{__python3} setup.py build -b build-3
72 rm -rf $RPM_BUILD_ROOT
75 %{__python} setup.py \
79 --root=$RPM_BUILD_ROOT
81 mv $RPM_BUILD_ROOT%{_bindir}/pygmentize{,-2}
87 %{__python3} setup.py \
91 --root=$RPM_BUILD_ROOT
93 mv $RPM_BUILD_ROOT%{_bindir}/pygmentize{,-3}
98 ln -s pygmentize-2 $RPM_BUILD_ROOT%{_bindir}/pygmentize
101 rm -rf $RPM_BUILD_ROOT
105 %defattr(644,root,root,755)
106 %doc PKG-INFO TODO AUTHORS
107 %attr(755,root,root) %{_bindir}/pygmentize
108 %attr(755,root,root) %{_bindir}/pygmentize-2
109 %{py_sitescriptdir}/%{module}
110 %{py_sitescriptdir}/*Pygments*.egg*
114 %files -n python3-%{module}
115 %defattr(644,root,root,755)
116 %doc PKG-INFO TODO AUTHORS
117 %attr(755,root,root) %{_bindir}/pygmentize-3
118 %{py3_sitescriptdir}/%{module}
119 %{py3_sitescriptdir}/*Pygments*.egg*