3 %define module pygments
5 Summary: A 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: d77ac8c93a7fb27545f2522abe9cc462
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
28 Provides: python-Pygments
29 Obsoletes: python-Pygments
31 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
34 Pygments is a generic syntax highlighter for general use in all kinds
35 of software such as forum systems, wikis or other applications that
36 need to prettify source code. Highlights are
37 - a wide range of common languages and markup formats is supported
38 - special attention is paid to details that increase highlighting
40 - support for new languages and formats are added easily; most
41 languages use a simple regex-based lexing mechanism
42 - a number of output formats is available, among them HTML, RTF, LaTeX
44 - it is usable as a command-line tool and as a library
45 - ... and it highlights even Brainf*ck!
47 %package -n python3-%{module}
48 Summary: Generic syntax highlighter
49 Group: Development/Languages/Python
51 %description -n python3-%{module}
52 Pygments is a generic syntax highlighter for general use in all kinds
53 of software such as forum systems, wikis or other applications that
54 need to prettify source code. Highlights are
55 - a wide range of common languages and markup formats is supported
56 - special attention is paid to details that increase highlighting
58 - support for new languages and formats are added easily; most
59 languages use a simple regex-based lexing mechanism
60 - a number of output formats is available, among them HTML, RTF, LaTeX
62 - it is usable as a command-line tool and as a library
63 - ... and it highlights even Brainf*ck!
66 %setup -q -n Pygments-%{version}
70 %{__python} setup.py build -b build-2
74 %{__python3} setup.py build -b build-3
78 rm -rf $RPM_BUILD_ROOT
81 %{__python} setup.py \
85 --root=$RPM_BUILD_ROOT
87 mv $RPM_BUILD_ROOT%{_bindir}/pygmentize{,-2}
89 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
90 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
96 %{__python3} setup.py \
100 --root=$RPM_BUILD_ROOT
102 mv $RPM_BUILD_ROOT%{_bindir}/pygmentize{,-3}
105 ln -s pygmentize-2 $RPM_BUILD_ROOT%{_bindir}/pygmentize
108 rm -rf $RPM_BUILD_ROOT
112 %defattr(644,root,root,755)
113 %doc PKG-INFO TODO AUTHORS
114 %attr(755,root,root) %{_bindir}/pygmentize
115 %attr(755,root,root) %{_bindir}/pygmentize-2
116 %{py_sitescriptdir}/%{module}
117 %if "%{py_ver}" > "2.4"
118 %{py_sitescriptdir}/*.egg-info
123 %files -n python3-%{module}
124 %defattr(644,root,root,755)
125 %doc PKG-INFO TODO AUTHORS
126 %attr(755,root,root) %{_bindir}/pygmentize-3
127 %{py3_sitescriptdir}/%{module}
128 %{py3_sitescriptdir}/*.egg-info