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