]> git.pld-linux.org Git - packages/python3-pygments.git/blame - python3-pygments.spec
- updated to 2.14.0; requires pytest 7
[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}
d985b8f3 10Version: 2.14.0
7cb00ee1 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
d985b8f3 16# Source0-md5: 447be4afb076c8325a7dc659aff5b931
971b9c53 17Patch0: rpmspec.patch
01414b39 18URL: https://pygments.org/
7cb00ee1
JB
19BuildRequires: python3 >= 1:3.6
20BuildRequires: python3-devel >= 1:3.6
21BuildRequires: python3-modules >= 1:3.6
343e28d9 22BuildRequires: python3-setuptools
3bee43f6 23%if %{with tests}
d985b8f3
JB
24BuildRequires: python3-pytest >= 7
25BuildRequires: python3-wcag_contrast_ratio
3bee43f6 26%endif
2d23140c 27BuildRequires: rpm-pythonprov
75ca7121 28BuildRequires: rpmbuild(macros) >= 1.714
e96db9a4 29%{?with_doc:BuildRequires: sphinx-pdg}
7cb00ee1 30Requires: python3-modules >= 1:3.6
75ca7121 31Requires: python3-setuptools
6fad5816 32Conflicts: python-pygments < 2.5.2
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
e96db9a4
JB
66%package apidocs
67Summary: API documentation for Python Pygments module
68Summary(pl.UTF-8): Dokumentacja API modułu Pythona Pygments
69Group: Documentation
70
71%description apidocs
72API documentation for Python Pygments module.
73
74%description apidocs -l pl.UTF-8
75Dokumentacja API modułu Pythona Pygments.
76
5dc968a7 77%prep
78%setup -q -n Pygments-%{version}
971b9c53 79%patch0 -p1
5dc968a7 80
81%build
cd0bf674 82%py3_build
e96db9a4
JB
83
84%if %{with tests}
b4d733c1 85PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
734c86c9 86%{__python3} -m pytest tests
e96db9a4 87%endif
e96db9a4
JB
88
89%if %{with doc}
90PYTHONPATH=$(pwd) \
91%{__make} -C doc html
b039b19f 92%endif
5dc968a7 93
94%install
95rm -rf $RPM_BUILD_ROOT
96
cd0bf674 97%py3_install
b039b19f 98
de554ad7 99%{__mv} $RPM_BUILD_ROOT%{_bindir}/pygmentize{,-3}
b039b19f 100
734c86c9 101ln -sf pygmentize-3 $RPM_BUILD_ROOT%{_bindir}/pygmentize
5dc968a7 102
103%clean
104rm -rf $RPM_BUILD_ROOT
105
106%files
107%defattr(644,root,root,755)
734c86c9 108%doc AUTHORS CHANGES LICENSE README.rst
734c86c9 109%attr(755,root,root) %{_bindir}/pygmentize
b039b19f 110%attr(755,root,root) %{_bindir}/pygmentize-3
75ca7121 111%{py3_sitescriptdir}/pygments
8f09c9ec 112%{py3_sitescriptdir}/Pygments-%{version}-py*.egg-info
e96db9a4
JB
113
114%if %{with doc}
115%files apidocs
116%defattr(644,root,root,755)
117%doc doc/_build/html/{_static,docs,*.html,*.js}
118%endif
This page took 0.215484 seconds and 4 git commands to generate.