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