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