source: projects/specs/trunk/p/python-pygments/python-pygments-vl.spec @ 8158

Revision 8158, 6.4 KB checked in by Takemikaduchi, 10 years ago (diff)

new upstream release or rebuild

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