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