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