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