]> git.pld-linux.org Git - packages/python3-pygments.git/blame - python-pygments.spec
- BR: python, python-modules, python3, python3-2to3, python3-devel,
[packages/python3-pygments.git] / python-pygments.spec
CommitLineData
b039b19f
AF
1%bcond_without python2
2%bcond_without python3
3%define module pygments
4#
5dc968a7 5Summary: Generic syntax highlighter
6Name: python-%{module}
b039b19f 7Version: 1.3.1
5dc968a7 8Release: 1
9License: BSD
10Group: Development/Languages/Python
11Source0: http://pypi.python.org/packages/source/P/Pygments/Pygments-%{version}.tar.gz
b039b19f 12# Source0-md5: 54be67c04834f13d7e255e1797d629a5
1fcda2a5 13URL: http://pygments.org/
2d23140c 14BuildRequires: python
5dc968a7 15BuildRequires: python-devel
2d23140c 16BuildRequires: python-modules
17BuildRequires: python3
18BuildRequires: python3-2to3
19BuildRequires: python3-devel
20BuildRequires: python3-distribute
21BuildRequires: python3-modules
22BuildRequires: rpm-pythonprov
5dc968a7 23%pyrequires_eq python-modules
24BuildArch: noarch
25BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
26
27%description
2d23140c 28Pygments is a generic syntax highlighter for general use in all kinds
29of software such as forum systems, wikis or other applications that
30need to prettify source code. Highlights are
5dc968a7 31- a wide range of common languages and markup formats is supported
2d23140c 32- special attention is paid to details that increase highlighting
33 quality
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
37 and ANSI sequences
5dc968a7 38- it is usable as a command-line tool and as a library
39- ... and it highlights even Brainf*ck!
40
b039b19f
AF
41%package -n python3-%{module}
42Summary: Generic syntax highlighter
43Group: Development/Languages/Python
44
45%description -n python3-%{module}
2d23140c 46Pygments is a generic syntax highlighter for general use in all kinds
47of software such as forum systems, wikis or other applications that
48need to prettify source code. Highlights are
b039b19f 49- a wide range of common languages and markup formats is supported
2d23140c 50- special attention is paid to details that increase highlighting
51 quality
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
55 and ANSI sequences
b039b19f
AF
56- it is usable as a command-line tool and as a library
57- ... and it highlights even Brainf*ck!
58
5dc968a7 59%prep
60%setup -q -n Pygments-%{version}
61
62%build
b039b19f
AF
63%if %{with python2}
64%{__python} setup.py build -b build-2
65%endif
66
67%if %{with python3}
68%{__python3} setup.py build -b build-3
69%endif
5dc968a7 70
71%install
72rm -rf $RPM_BUILD_ROOT
73
b039b19f
AF
74%if %{with python2}
75%{__python} setup.py \
76 build -b build-2 \
77 install \
78 --optimize=2 \
79 --root=$RPM_BUILD_ROOT
80
81mv $RPM_BUILD_ROOT%{_bindir}/pygmentize{,-2}
5dc968a7 82
83%py_postclean
b039b19f
AF
84%endif
85
86%if %{with python3}
87%{__python3} setup.py \
88 build -b build-3 \
89 install \
90 --optimize=2 \
91 --root=$RPM_BUILD_ROOT
92
93mv $RPM_BUILD_ROOT%{_bindir}/pygmentize{,-3}
94
95%py3_postclean
96%endif
97
98ln -s pygmentize-2 $RPM_BUILD_ROOT%{_bindir}/pygmentize
5dc968a7 99
100%clean
101rm -rf $RPM_BUILD_ROOT
102
b039b19f 103%if %{with python2}
5dc968a7 104%files
105%defattr(644,root,root,755)
106%doc PKG-INFO TODO AUTHORS
b039b19f
AF
107%attr(755,root,root) %{_bindir}/pygmentize
108%attr(755,root,root) %{_bindir}/pygmentize-2
5dc968a7 109%{py_sitescriptdir}/%{module}
110%{py_sitescriptdir}/*Pygments*.egg*
b039b19f
AF
111%endif
112
113%if %{with python3}
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*
120%endif
This page took 0.231161 seconds and 4 git commands to generate.