]> git.pld-linux.org Git - packages/python3-pygments.git/blame - python3-pygments.spec
- updated to 2.11.2
[packages/python3-pygments.git] / python3-pygments.spec
CommitLineData
b039b19f 1#
8f09c9ec 2# Conditional build:
e96db9a4
JB
3%bcond_without doc # Sphinx documentation
4%bcond_without tests # unit tests
6d0d5676 5
8f09c9ec 6%define module pygments
75ca7121
JB
7Summary: A generic syntax highlighter as Python 3 module
8Summary(pl.UTF-8): Moduł Pythona 3 do ogólnego podświetlania składni
9Name: python3-%{module}
01414b39 10Version: 2.11.2
75ca7121 11Release: 1
5dc968a7 12License: BSD
13Group: Development/Languages/Python
734c86c9 14#Source0Download: https://pypi.org/simple/pygments/
ad49381b 15Source0: https://files.pythonhosted.org/packages/source/P/Pygments/Pygments-%{version}.tar.gz
01414b39 16# Source0-md5: 217b4355612df4b61dc570df4b0148ba
971b9c53 17Patch0: rpmspec.patch
01414b39 18URL: https://pygments.org/
3bee43f6
JB
19BuildRequires: python3 >= 1:3.5
20BuildRequires: python3-devel >= 1:3.5
21BuildRequires: python3-modules >= 1:3.5
343e28d9 22BuildRequires: python3-setuptools
3bee43f6 23%if %{with tests}
734c86c9 24BuildRequires: python3-pytest
3bee43f6 25%endif
2d23140c 26BuildRequires: rpm-pythonprov
75ca7121 27BuildRequires: rpmbuild(macros) >= 1.714
e96db9a4 28%{?with_doc:BuildRequires: sphinx-pdg}
75ca7121
JB
29Requires: python3-modules >= 1:3.5
30Requires: python3-setuptools
6fad5816 31Conflicts: python-pygments < 2.5.2
5dc968a7 32BuildArch: noarch
33BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
34
35%description
2d23140c 36Pygments is a generic syntax highlighter for general use in all kinds
37of software such as forum systems, wikis or other applications that
8f09c9ec 38need to prettify source code. Highlights are:
5dc968a7 39- a wide range of common languages and markup formats is supported
2d23140c 40- special attention is paid to details that increase highlighting
41 quality
42- support for new languages and formats are added easily; most
43 languages use a simple regex-based lexing mechanism
44- a number of output formats is available, among them HTML, RTF, LaTeX
45 and ANSI sequences
5dc968a7 46- it is usable as a command-line tool and as a library
47- ... and it highlights even Brainf*ck!
48
8f09c9ec
JB
49%description -l pl.UTF-8
50Pygments to moduł Pythona do podświetlania składni ogólnego
51przeznaczenia we wszelkiego rodzaju programach, takich jaka systemy
52forów, wiki i inne plikacje wymagające ładnego wyświetlania kodu
53źródłowego. Zalety Pygments to:
54- obsługiwany szeroki zakres popularnych języków i formatów znaczników
55- zwrócenie szczególnej uwagi na szczegóły zwiększające jakość
56 podświetlania
57- łatwa obsługa nowych języków i formatów; większość języków
58 wykorzystuje prosty mechanizm analizy leksykalnej oparty o wyrażenia
59 regularne
60- dostępność wielu formatów wyjściowych, m.in. HTML, RTF, LaTeX i
61 sekwencje ANSI
62- możliwość używania z linii poleceń oraz jako biblioteki
63- ...a także - podświetla nawet Brainf*cka!
64
e96db9a4
JB
65%package apidocs
66Summary: API documentation for Python Pygments module
67Summary(pl.UTF-8): Dokumentacja API modułu Pythona Pygments
68Group: Documentation
69
70%description apidocs
71API documentation for Python Pygments module.
72
73%description apidocs -l pl.UTF-8
74Dokumentacja API modułu Pythona Pygments.
75
5dc968a7 76%prep
77%setup -q -n Pygments-%{version}
971b9c53 78%patch0 -p1
5dc968a7 79
80%build
cd0bf674 81%py3_build
e96db9a4
JB
82
83%if %{with tests}
b4d733c1 84PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
734c86c9 85%{__python3} -m pytest tests
e96db9a4 86%endif
e96db9a4
JB
87
88%if %{with doc}
89PYTHONPATH=$(pwd) \
90%{__make} -C doc html
b039b19f 91%endif
5dc968a7 92
93%install
94rm -rf $RPM_BUILD_ROOT
95
cd0bf674 96%py3_install
b039b19f 97
de554ad7 98%{__mv} $RPM_BUILD_ROOT%{_bindir}/pygmentize{,-3}
b039b19f 99
734c86c9 100ln -sf pygmentize-3 $RPM_BUILD_ROOT%{_bindir}/pygmentize
5dc968a7 101
102%clean
103rm -rf $RPM_BUILD_ROOT
104
105%files
106%defattr(644,root,root,755)
734c86c9 107%doc AUTHORS CHANGES LICENSE README.rst
734c86c9 108%attr(755,root,root) %{_bindir}/pygmentize
b039b19f 109%attr(755,root,root) %{_bindir}/pygmentize-3
75ca7121 110%{py3_sitescriptdir}/pygments
8f09c9ec 111%{py3_sitescriptdir}/Pygments-%{version}-py*.egg-info
e96db9a4
JB
112
113%if %{with doc}
114%files apidocs
115%defattr(644,root,root,755)
116%doc doc/_build/html/{_static,docs,*.html,*.js}
117%endif
This page took 0.130756 seconds and 4 git commands to generate.