]> git.pld-linux.org Git - packages/python-pygments.git/blob - python-pygments.spec
- pl
[packages/python-pygments.git] / python-pygments.spec
1 #
2 # Conditional build:
3 %bcond_without  python2 # CPython 2.x module
4 %bcond_without  python3 # CPython 3.x module
5 #
6 %define module  pygments
7 Summary:        A generic syntax highlighter as Python 2.x module
8 Summary(pl.UTF-8):      Moduł Pythona 2.x do ogólnego podświetlania składni
9 Name:           python-%{module}
10 Version:        1.4
11 Release:        2
12 License:        BSD
13 Group:          Development/Languages/Python
14 Source0:        http://pypi.python.org/packages/source/P/Pygments/Pygments-%{version}.tar.gz
15 # Source0-md5:  d77ac8c93a7fb27545f2522abe9cc462
16 URL:            http://pygments.org/
17 %if %{with python2}
18 BuildRequires:  python
19 BuildRequires:  python-devel
20 BuildRequires:  python-modules
21 %endif
22 %if %{with python3}
23 BuildRequires:  python3
24 BuildRequires:  python3-2to3
25 BuildRequires:  python3-devel
26 BuildRequires:  python3-distribute
27 BuildRequires:  python3-modules
28 %endif
29 BuildRequires:  rpm-pythonprov
30 %pyrequires_eq  python-modules
31 Provides:       python-Pygments
32 Obsoletes:      python-Pygments
33 BuildArch:      noarch
34 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
35
36 %description
37 Pygments is a generic syntax highlighter for general use in all kinds
38 of software such as forum systems, wikis or other applications that
39 need to 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
42   quality
43 - support for new languages and formats are added easily; most
44   languages use a simple regex-based lexing mechanism
45 - a number of output formats is available, among them HTML, RTF, LaTeX
46   and ANSI sequences
47 - it is usable as a command-line tool and as a library
48 - ... and it highlights even Brainf*ck!
49
50 %description -l pl.UTF-8
51 Pygments to moduł Pythona do podświetlania składni ogólnego
52 przeznaczenia we wszelkiego rodzaju programach, takich jaka systemy
53 forów, wiki i inne plikacje wymagające ładnego wyświetlania kodu
54 źródłowego. Zalety Pygments to:
55 - obsługiwany szeroki zakres popularnych języków i formatów znaczników
56 - zwrócenie szczególnej uwagi na szczegóły zwiększające jakość
57   podświetlania
58 - łatwa obsługa nowych języków i formatów; większość języków
59   wykorzystuje prosty mechanizm analizy leksykalnej oparty o wyrażenia
60   regularne
61 - dostępność wielu formatów wyjściowych, m.in. HTML, RTF, LaTeX i
62   sekwencje ANSI
63 - możliwość używania z linii poleceń oraz jako biblioteki
64 - ...a także - podświetla nawet Brainf*cka!
65
66 %package -n python3-%{module}
67 Summary:        Generic syntax highlighter as Python 3.x module
68 Summary(pl.UTF-8):      Moduł Pythona 3.x do ogólnego podświetlania składni
69 Group:          Development/Languages/Python
70 Requires:       python3-modules
71
72 %description -n python3-%{module}
73 Pygments is a generic syntax highlighter for general use in all kinds
74 of software such as forum systems, wikis or other applications that
75 need to prettify source code. Highlights are
76 - a wide range of common languages and markup formats is supported
77 - special attention is paid to details that increase highlighting
78   quality
79 - support for new languages and formats are added easily; most
80   languages use a simple regex-based lexing mechanism
81 - a number of output formats is available, among them HTML, RTF, LaTeX
82   and ANSI sequences
83 - it is usable as a command-line tool and as a library
84 - ... and it highlights even Brainf*ck!
85
86 %description -n python3-%{module} -l pl.UTF-8
87 Pygments to moduł Pythona do podświetlania składni ogólnego
88 przeznaczenia we wszelkiego rodzaju programach, takich jaka systemy
89 forów, wiki i inne plikacje wymagające ładnego wyświetlania kodu
90 źródłowego. Zalety Pygments to:
91 - obsługiwany szeroki zakres popularnych języków i formatów znaczników
92 - zwrócenie szczególnej uwagi na szczegóły zwiększające jakość
93   podświetlania
94 - łatwa obsługa nowych języków i formatów; większość języków
95   wykorzystuje prosty mechanizm analizy leksykalnej oparty o wyrażenia
96   regularne
97 - dostępność wielu formatów wyjściowych, m.in. HTML, RTF, LaTeX i
98   sekwencje ANSI
99 - możliwość używania z linii poleceń oraz jako biblioteki
100 - ...a także - podświetla nawet Brainf*cka!
101
102 %prep
103 %setup -q -n Pygments-%{version}
104
105 %build
106 %if %{with python2}
107 %{__python} setup.py build -b build-2
108 %endif
109
110 %if %{with python3}
111 %{__python3} setup.py build -b build-3
112 %endif
113
114 %install
115 rm -rf $RPM_BUILD_ROOT
116
117 %if %{with python2}
118 %{__python} setup.py \
119         build -b build-2 \
120         install \
121         --optimize=2 \
122         --root=$RPM_BUILD_ROOT
123
124 mv $RPM_BUILD_ROOT%{_bindir}/pygmentize{,-2}
125
126 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
127 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
128 %py_postclean
129 %endif
130
131 %if %{with python3}
132 %{__python3} setup.py \
133         build -b build-3 \
134         install \
135         --optimize=2 \
136         --root=$RPM_BUILD_ROOT
137
138 mv $RPM_BUILD_ROOT%{_bindir}/pygmentize{,-3}
139 %endif
140
141 %if %{with python2}
142 ln -sf pygmentize-2 $RPM_BUILD_ROOT%{_bindir}/pygmentize
143 %endif
144
145 %clean
146 rm -rf $RPM_BUILD_ROOT
147
148 %if %{with python2}
149 %files
150 %defattr(644,root,root,755)
151 %doc AUTHORS CHANGES LICENSE TODO
152 %attr(755,root,root) %{_bindir}/pygmentize
153 %attr(755,root,root) %{_bindir}/pygmentize-2
154 %{py_sitescriptdir}/%{module}
155 %if "%{py_ver}" > "2.4"
156 %{py_sitescriptdir}/Pygments-%{version}-py*.egg-info
157 %endif
158 %endif
159
160 %if %{with python3}
161 %files -n python3-%{module}
162 %defattr(644,root,root,755)
163 %doc AUTHORS CHANGES LICENSE TODO
164 %attr(755,root,root) %{_bindir}/pygmentize-3
165 %{py3_sitescriptdir}/%{module}
166 %{py3_sitescriptdir}/Pygments-%{version}-py*.egg-info
167 %endif
This page took 0.110899 seconds and 4 git commands to generate.