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