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