]> git.pld-linux.org Git - packages/python3-pygments.git/blob - python-pygments.spec
- BR: python, python-modules, python3, python3-2to3, python3-devel,
[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
15 BuildRequires:  python-devel
16 BuildRequires:  python-modules
17 BuildRequires:  python3
18 BuildRequires:  python3-2to3
19 BuildRequires:  python3-devel
20 BuildRequires:  python3-distribute
21 BuildRequires:  python3-modules
22 BuildRequires:  rpm-pythonprov
23 %pyrequires_eq  python-modules
24 BuildArch:      noarch
25 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
26
27 %description
28 Pygments is a generic syntax highlighter for general use in all kinds
29 of software such as forum systems, wikis or other applications that
30 need to prettify source code. Highlights are
31 - a wide range of common languages and markup formats is supported
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
38 - it is usable as a command-line tool and as a library
39 - ... and it highlights even Brainf*ck!
40
41 %package -n python3-%{module}
42 Summary:        Generic syntax highlighter
43 Group:          Development/Languages/Python
44
45 %description -n python3-%{module}
46 Pygments is a generic syntax highlighter for general use in all kinds
47 of software such as forum systems, wikis or other applications that
48 need to prettify source code. Highlights are
49 - a wide range of common languages and markup formats is supported
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
56 - it is usable as a command-line tool and as a library
57 - ... and it highlights even Brainf*ck!
58
59 %prep
60 %setup -q -n Pygments-%{version}
61
62 %build
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
70
71 %install
72 rm -rf $RPM_BUILD_ROOT
73
74 %if %{with python2}
75 %{__python} setup.py \
76         build -b build-2 \
77         install \
78         --optimize=2 \
79         --root=$RPM_BUILD_ROOT
80
81 mv $RPM_BUILD_ROOT%{_bindir}/pygmentize{,-2}
82
83 %py_postclean
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
93 mv $RPM_BUILD_ROOT%{_bindir}/pygmentize{,-3}
94
95 %py3_postclean
96 %endif
97
98 ln -s pygmentize-2 $RPM_BUILD_ROOT%{_bindir}/pygmentize
99
100 %clean
101 rm -rf $RPM_BUILD_ROOT
102
103 %if %{with python2}
104 %files
105 %defattr(644,root,root,755)
106 %doc PKG-INFO TODO AUTHORS
107 %attr(755,root,root) %{_bindir}/pygmentize
108 %attr(755,root,root) %{_bindir}/pygmentize-2
109 %{py_sitescriptdir}/%{module}
110 %{py_sitescriptdir}/*Pygments*.egg*
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.039611 seconds and 4 git commands to generate.