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