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

Revision 1741, 6.1 KB checked in by munepi, 14 years ago (diff)

NEW calibre: updated/added calibre's dependencies

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