1 | %bcond_with test |
---|
2 | %global with_python3 1 |
---|
3 | %global upstream_name Pygments |
---|
4 | %global srcname pygments |
---|
5 | |
---|
6 | Name: python-pygments |
---|
7 | Version: 2.6.1 |
---|
8 | Release: 1%{?_dist_release} |
---|
9 | Summary: A syntax highlighting engine written in Python |
---|
10 | Group: programming |
---|
11 | Vendor: Project Vine |
---|
12 | Distribution: Vine Linux |
---|
13 | |
---|
14 | License: BSD |
---|
15 | URL: http://pygments.org/ |
---|
16 | Source0: https://pypi.python.org/packages/source/P/%{upstream_name}/%{upstream_name}-%{version}.tar.gz |
---|
17 | |
---|
18 | BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) |
---|
19 | |
---|
20 | BuildArch: noarch |
---|
21 | BuildRequires: python-rpm-macros |
---|
22 | |
---|
23 | %if 0%{?with_python3} |
---|
24 | BuildRequires: python3-devel, python3-setuptools, python3-nose |
---|
25 | BuildRequires: python3-rpm-macros |
---|
26 | BuildRequires: python3-sphinx |
---|
27 | %endif # if with_python3 |
---|
28 | |
---|
29 | %description |
---|
30 | Pygments is a generic syntax highlighter for general use in all kinds |
---|
31 | of software such as forum systems, wikis or other applications that |
---|
32 | need to prettify source code. Highlights are: |
---|
33 | |
---|
34 | * a wide range of common languages and markup formats is supported |
---|
35 | * special attention is paid to details that increase highlighting |
---|
36 | quality |
---|
37 | * support for new languages and formats are added easily; most |
---|
38 | languages use a simple regex-based lexing mechanism |
---|
39 | * a number of output formats is available, among them HTML, RTF, |
---|
40 | LaTeX and ANSI sequences |
---|
41 | * it is usable as a command-line tool and as a library |
---|
42 | * ... and it highlights even Brainf*ck! |
---|
43 | |
---|
44 | %if 0%{?with_python3} |
---|
45 | %package -n python3-pygments |
---|
46 | Summary: A syntax highlighting engine written in Python 3 |
---|
47 | Group: programming |
---|
48 | Requires: python3-setuptools |
---|
49 | Obsoletes: python-pygments < 2.6.0 |
---|
50 | |
---|
51 | %description -n python3-pygments |
---|
52 | Pygments is a generic syntax highlighter for general use in all kinds |
---|
53 | of software such as forum systems, wikis or other applications that |
---|
54 | need to prettify source code. Highlights are: |
---|
55 | |
---|
56 | * a wide range of common languages and markup formats is supported |
---|
57 | * special attention is paid to details that increase highlighting |
---|
58 | quality |
---|
59 | * support for new languages and formats are added easily; most |
---|
60 | languages use a simple regex-based lexing mechanism |
---|
61 | * a number of output formats is available, among them HTML, RTF, |
---|
62 | LaTeX and ANSI sequences |
---|
63 | * it is usable as a command-line tool and as a library |
---|
64 | * ... and it highlights even Brainf*ck! |
---|
65 | %endif # if with_python3 |
---|
66 | |
---|
67 | |
---|
68 | %prep |
---|
69 | %setup -q -n %{upstream_name}-%{version} |
---|
70 | |
---|
71 | %build |
---|
72 | %{__sed} -i 's/\r//' LICENSE |
---|
73 | %if 0%{?with_python3} |
---|
74 | %py3_build |
---|
75 | %endif |
---|
76 | |
---|
77 | |
---|
78 | %install |
---|
79 | %__rm -rf $RPM_BUILD_ROOT |
---|
80 | |
---|
81 | %if 0%{?with_python3} |
---|
82 | # Python 3 install |
---|
83 | %py3_install |
---|
84 | %endif |
---|
85 | |
---|
86 | %{__python3} setup.py build_sphinx |
---|
87 | pushd doc |
---|
88 | install -d %{buildroot}%{_mandir}/man1 |
---|
89 | mv pygmentize.1 $RPM_BUILD_ROOT%{_mandir}/man1/pygmentize.1 |
---|
90 | popd |
---|
91 | cp -r doc/docs doc/reST |
---|
92 | |
---|
93 | |
---|
94 | %clean |
---|
95 | %__rm -rf $RPM_BUILD_ROOT |
---|
96 | |
---|
97 | |
---|
98 | %if %{with test} |
---|
99 | %check |
---|
100 | make test PYTHON=%{__python} |
---|
101 | %if 0%{?with_python3} |
---|
102 | make test PYTHON=%{__python3} |
---|
103 | %endif |
---|
104 | %endif |
---|
105 | |
---|
106 | |
---|
107 | %if 0%{?with_python3} |
---|
108 | %files -n python3-pygments |
---|
109 | %defattr(-,root,root,-) |
---|
110 | %doc AUTHORS CHANGES build/sphinx/html doc/reST TODO |
---|
111 | %license LICENSE |
---|
112 | %{python3_sitelib}/* |
---|
113 | %{_bindir}/pygmentize |
---|
114 | %lang(en) %{_mandir}/man1/pygmentize.1* |
---|
115 | %endif # with_python3 |
---|
116 | |
---|
117 | |
---|
118 | %changelog |
---|
119 | * Sun Aug 16 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 2.6.1-1 |
---|
120 | - new upstream release. |
---|
121 | - built with python3 only. |
---|
122 | |
---|
123 | * Sat Feb 15 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 2.5.2-1 |
---|
124 | - new upstream release. |
---|
125 | |
---|
126 | * Thu Nov 29 2018 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 2.3.0-2 |
---|
127 | - packed pygmentize for python2. |
---|
128 | |
---|
129 | * Tue Nov 27 2018 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 2.3.0-1 |
---|
130 | - new upstream release. |
---|
131 | - added python3 support. |
---|
132 | |
---|
133 | * Tue Jul 12 2016 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 2.1.3-1 |
---|
134 | - new upstream release. |
---|
135 | |
---|
136 | * Sun Jan 12 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> - 1.3.1-3 |
---|
137 | - rebuild with VineSeed environment |
---|
138 | |
---|
139 | * Sun Feb 19 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> - 1.3.1-2 |
---|
140 | - rebuild with python-2.7.2 |
---|
141 | |
---|
142 | * Mon Aug 23 2010 Munehiro Yamamoto <munepi@vinelinux.org> - 1.3.1-1 |
---|
143 | - initial build based on Fedora development |
---|
144 | |
---|
145 | * Thu Jul 22 2010 David Malcolm <dmalcolm@redhat.com> - 1.3.1-6 |
---|
146 | - Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild |
---|
147 | |
---|
148 | * Thu May 6 2010 Gareth Armstrong <gareth.armstrong@hp.com> - 1.3.1-5 |
---|
149 | - Enforce that Pygments requires Python 2.4 or later via an explicit BR |
---|
150 | - Minor tweaks to spec file |
---|
151 | - Deliver html and reST doc files to specifically named directories |
---|
152 | - Align description with that of http://pygments.org/ |
---|
153 | - Add %%check section for Python2 and add BR on python-nose |
---|
154 | |
---|
155 | * Fri Apr 23 2010 Steve 'Ashcrow' Milner <me@stevemilner.org> - 1.3.1-4 |
---|
156 | - switched with_python3 back to 1 |
---|
157 | |
---|
158 | * Fri Apr 23 2010 David Malcolm <dmalcolm@redhat.com> - 1.3.1-3 |
---|
159 | - add python3 subpackage (BZ#537244), ignoring soft-dep on imaging for now |
---|
160 | |
---|
161 | * Tue Apr 13 2010 Steve 'Ashcrow' Milner <me@stevemilner.org> - 1.3.1-2 |
---|
162 | - added python-imaging as a dependency per BZ#581663. |
---|
163 | |
---|
164 | * Sat Mar 6 2010 Steve 'Ashcrow' Milner <me@stevemilner.org> - 1.3.1-1 |
---|
165 | - Updated for release. |
---|
166 | |
---|
167 | * Tue Sep 29 2009 Steve 'Ashcrow' Milner <me@stevemilner.org> - 1.1.1-1 |
---|
168 | - Updated for release. |
---|
169 | |
---|
170 | * Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0-5 |
---|
171 | - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild |
---|
172 | |
---|
173 | * Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0-4 |
---|
174 | - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild |
---|
175 | |
---|
176 | * Sun Dec 21 2008 Steve 'Ashcrow' Milner <me@stevemilner.org> - 1.0-3 |
---|
177 | - Updated for release. |
---|
178 | |
---|
179 | * Sat Nov 29 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 1.0-2 |
---|
180 | - Rebuild for Python 2.6 |
---|
181 | |
---|
182 | * Thu Nov 27 2008 Steve 'Ashcrow' Milner <me@stevemilner.org> - 1.0-1 |
---|
183 | - Updated for upstream 1.0. |
---|
184 | |
---|
185 | * Sun Sep 14 2008 Steve 'Ashcrow' Milner <me@stevemilner.org> - 0.11.1-1 |
---|
186 | - Updated for upstream 0.11. |
---|
187 | |
---|
188 | * Mon Jul 21 2008 Steve 'Ashcrow' Milner <me@stevemilner.org> - 0.10-1 |
---|
189 | - Updated for upstream 0.10. |
---|
190 | |
---|
191 | * Thu Nov 29 2007 Steve 'Ashcrow' Milner <me@stevemilner.org> - 0.9-2 |
---|
192 | - Added python-setuptools as a Requires per bz#403601. |
---|
193 | |
---|
194 | * Mon Nov 12 2007 Steve 'Ashcrow' Milner <me@stevemilner.org> - 0.9-1 |
---|
195 | - Updated for upstream 0.9. |
---|
196 | |
---|
197 | * Fri Aug 17 2007 Steve 'Ashcrow' Milner <me@stevemilner.org> - 0.8.1-2 |
---|
198 | - Removed the dos2unix build dependency. |
---|
199 | |
---|
200 | * Thu Jun 28 2007 Steve 'Ashcrow' Milner <me@stevemilner.org> - 0.8.1-1 |
---|
201 | - Initial packaging for Fedora. |
---|