]> git.pld-linux.org Git - packages/python3-pygments.git/blame - python-pygments.spec
- release 2 (by relup.sh)
[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
5#
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}
2d7c65ae 10Version: 1.5
6857f1c8 11Release: 2
5dc968a7 12License: BSD
13Group: Development/Languages/Python
14Source0: http://pypi.python.org/packages/source/P/Pygments/Pygments-%{version}.tar.gz
2d7c65ae 15# Source0-md5: ef997066cc9ee7a47d01fb4f3da0b5ff
1fcda2a5 16URL: http://pygments.org/
0cfd7bce 17%if %{with python2}
2d23140c 18BuildRequires: python
5dc968a7 19BuildRequires: python-devel
2d23140c 20BuildRequires: python-modules
0cfd7bce 21%endif
22%if %{with python3}
2d23140c 23BuildRequires: python3
24BuildRequires: python3-2to3
25BuildRequires: python3-devel
26BuildRequires: python3-distribute
27BuildRequires: python3-modules
0cfd7bce 28%endif
2d23140c 29BuildRequires: rpm-pythonprov
5dc968a7 30%pyrequires_eq python-modules
4d013986 31Provides: python-Pygments
e986ca66 32Obsoletes: python-Pygments
5dc968a7 33BuildArch: noarch
34BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
35
36%description
2d23140c 37Pygments is a generic syntax highlighter for general use in all kinds
38of software such as forum systems, wikis or other applications that
8f09c9ec 39need to prettify source code. Highlights are:
5dc968a7 40- a wide range of common languages and markup formats is supported
2d23140c 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
5dc968a7 47- it is usable as a command-line tool and as a library
48- ... and it highlights even Brainf*ck!
49
8f09c9ec
JB
50%description -l pl.UTF-8
51Pygments to moduł Pythona do podświetlania składni ogólnego
52przeznaczenia we wszelkiego rodzaju programach, takich jaka systemy
53foró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
b039b19f 66%package -n python3-%{module}
8f09c9ec
JB
67Summary: Generic syntax highlighter as Python 3.x module
68Summary(pl.UTF-8): Moduł Pythona 3.x do ogólnego podświetlania składni
b039b19f 69Group: Development/Languages/Python
8f09c9ec 70Requires: python3-modules
b039b19f
AF
71
72%description -n python3-%{module}
2d23140c 73Pygments is a generic syntax highlighter for general use in all kinds
74of software such as forum systems, wikis or other applications that
75need to prettify source code. Highlights are
b039b19f 76- a wide range of common languages and markup formats is supported
2d23140c 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
b039b19f
AF
83- it is usable as a command-line tool and as a library
84- ... and it highlights even Brainf*ck!
85
8f09c9ec
JB
86%description -n python3-%{module} -l pl.UTF-8
87Pygments to moduł Pythona do podświetlania składni ogólnego
88przeznaczenia we wszelkiego rodzaju programach, takich jaka systemy
89foró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
5dc968a7 102%prep
103%setup -q -n Pygments-%{version}
104
105%build
b039b19f
AF
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
5dc968a7 113
114%install
115rm -rf $RPM_BUILD_ROOT
116
b039b19f
AF
117%if %{with python2}
118%{__python} setup.py \
119 build -b build-2 \
120 install \
121 --optimize=2 \
122 --root=$RPM_BUILD_ROOT
123
124mv $RPM_BUILD_ROOT%{_bindir}/pygmentize{,-2}
5dc968a7 125
e986ca66 126%py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
127%py_comp $RPM_BUILD_ROOT%{py_sitedir}
5dc968a7 128%py_postclean
b039b19f
AF
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
138mv $RPM_BUILD_ROOT%{_bindir}/pygmentize{,-3}
b039b19f
AF
139%endif
140
8f09c9ec
JB
141%if %{with python2}
142ln -sf pygmentize-2 $RPM_BUILD_ROOT%{_bindir}/pygmentize
143%endif
5dc968a7 144
145%clean
146rm -rf $RPM_BUILD_ROOT
147
b039b19f 148%if %{with python2}
5dc968a7 149%files
150%defattr(644,root,root,755)
8f09c9ec 151%doc AUTHORS CHANGES LICENSE TODO
b039b19f
AF
152%attr(755,root,root) %{_bindir}/pygmentize
153%attr(755,root,root) %{_bindir}/pygmentize-2
5dc968a7 154%{py_sitescriptdir}/%{module}
e986ca66 155%if "%{py_ver}" > "2.4"
8f09c9ec 156%{py_sitescriptdir}/Pygments-%{version}-py*.egg-info
b039b19f 157%endif
e986ca66 158%endif
b039b19f
AF
159
160%if %{with python3}
161%files -n python3-%{module}
162%defattr(644,root,root,755)
8f09c9ec 163%doc AUTHORS CHANGES LICENSE TODO
b039b19f
AF
164%attr(755,root,root) %{_bindir}/pygmentize-3
165%{py3_sitescriptdir}/%{module}
8f09c9ec 166%{py3_sitescriptdir}/Pygments-%{version}-py*.egg-info
b039b19f 167%endif
This page took 0.05956 seconds and 4 git commands to generate.