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