added EL5 py2.6 and updated to 1.4
This commit is contained in:
parent
5a670f80e0
commit
612557d701
1
.gitignore
vendored
1
.gitignore
vendored
@ -1 +1,2 @@
|
|||||||
Pygments-1.3.1.tar.gz
|
Pygments-1.3.1.tar.gz
|
||||||
|
/Pygments-1.4.tar.gz
|
||||||
|
@ -4,11 +4,23 @@
|
|||||||
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print (get_python_lib())")}
|
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print (get_python_lib())")}
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
%if 0%{?el5}
|
||||||
|
%global with_python26 1
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%if 0%{?with_python26}
|
||||||
|
%global __python26 %{_bindir}/python2.6
|
||||||
|
%global py26dir %{_builddir}/python26-%{name}-%{version}-%{release}
|
||||||
|
%global python26_sitelib %{_libdir}/python2.6/site-packages
|
||||||
|
#Disable byte compileing and do ourselves later.
|
||||||
|
%endif
|
||||||
|
|
||||||
|
|
||||||
%global upstream_name Pygments
|
%global upstream_name Pygments
|
||||||
|
|
||||||
Name: python-pygments
|
Name: python-pygments
|
||||||
Version: 1.3.1
|
Version: 1.4
|
||||||
Release: 7%{?dist}
|
Release: 1%{?dist}
|
||||||
Summary: A syntax highlighting engine written in Python
|
Summary: A syntax highlighting engine written in Python
|
||||||
|
|
||||||
Group: Development/Libraries
|
Group: Development/Libraries
|
||||||
@ -23,6 +35,11 @@ BuildRequires: python2-devel >= 2.4, python-setuptools, python-nose
|
|||||||
BuildRequires: python3-devel, python3-setuptools
|
BuildRequires: python3-devel, python3-setuptools
|
||||||
%endif # if with_python3
|
%endif # if with_python3
|
||||||
Requires: python-setuptools, python-imaging
|
Requires: python-setuptools, python-imaging
|
||||||
|
%if 0%{?with_python26}
|
||||||
|
BuildRequires: python26-devel, python26-distribute
|
||||||
|
Requires: python26-distribute, python26-imaging
|
||||||
|
Requires: python(abi) = 2.6
|
||||||
|
%endif
|
||||||
|
|
||||||
|
|
||||||
%description
|
%description
|
||||||
@ -62,6 +79,18 @@ need to prettify source code. Highlights are:
|
|||||||
* ... and it highlights even Brainf*ck!
|
* ... and it highlights even Brainf*ck!
|
||||||
%endif # if with_python3
|
%endif # if with_python3
|
||||||
|
|
||||||
|
%if 0%{?with_python26}
|
||||||
|
%package -n python26-pygments
|
||||||
|
Summary: A syntax highlighting engine written in Python 2.6
|
||||||
|
Group: Development/Libraries
|
||||||
|
Requires: python26-distribute
|
||||||
|
|
||||||
|
%description -n python26-pygments
|
||||||
|
Pygments is a generic syntax highlighter for general use in all kinds
|
||||||
|
of software such as forum systems, wikis or other applications that
|
||||||
|
need to prettify source code. Highlights are:
|
||||||
|
%endif #end of python2.6
|
||||||
|
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n Pygments-%{version}
|
%setup -q -n Pygments-%{version}
|
||||||
@ -72,6 +101,12 @@ cp -a . %{py3dir}
|
|||||||
find %{py3dir} -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python3}|'
|
find %{py3dir} -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python3}|'
|
||||||
%endif # with_python3
|
%endif # with_python3
|
||||||
|
|
||||||
|
%if 0%{?with_python26}
|
||||||
|
rm -rf %{py26dir}
|
||||||
|
cp -a . %{py26dir}
|
||||||
|
find %{py26dir} -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python26}|'
|
||||||
|
%endif # with_python26
|
||||||
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%{__python} setup.py build
|
%{__python} setup.py build
|
||||||
@ -83,6 +118,12 @@ pushd %{py3dir}
|
|||||||
popd
|
popd
|
||||||
%endif # with_python3
|
%endif # with_python3
|
||||||
|
|
||||||
|
%if 0%{?with_python26}
|
||||||
|
pushd %{py26dir}
|
||||||
|
%{__python26} setup.py build
|
||||||
|
popd
|
||||||
|
%endif # with_python26
|
||||||
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
rm -rf $RPM_BUILD_ROOT
|
rm -rf $RPM_BUILD_ROOT
|
||||||
@ -95,6 +136,14 @@ pushd %{py3dir}
|
|||||||
popd
|
popd
|
||||||
%endif # with_python3
|
%endif # with_python3
|
||||||
|
|
||||||
|
# Run the Python 2.6 build first so that the Python 2 version of
|
||||||
|
# /usr/bin/pygmentize "wins":
|
||||||
|
%if 0%{?with_python26}
|
||||||
|
pushd %{py26dir}
|
||||||
|
%{__python26} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
|
||||||
|
popd
|
||||||
|
%endif # with_python26
|
||||||
|
|
||||||
%{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
|
%{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
|
||||||
pushd docs
|
pushd docs
|
||||||
install -d %{buildroot}%{_mandir}/man1
|
install -d %{buildroot}%{_mandir}/man1
|
||||||
@ -103,6 +152,13 @@ mv build html
|
|||||||
mv src reST
|
mv src reST
|
||||||
popd
|
popd
|
||||||
|
|
||||||
|
%if 0%{?with_python26}
|
||||||
|
%{__python} -c 'import compileall; compileall.compile_dir("'"$RPM_BUILD_ROOT"'", '"10"', "%{python_sitelib}", 1)' > /dev/null
|
||||||
|
%{__python} -O -c 'import compileall; compileall.compile_dir("'"$RPM_BUILD_ROOT"'", '"10"', "%{python_sitelib}", 1)' > /dev/null
|
||||||
|
%{__python26} -c 'import compileall; compileall.compile_dir("'"$RPM_BUILD_ROOT"'", '"10"', "%{python26_sitelib}", 1)' > /dev/null
|
||||||
|
%{__python26} -O -c 'import compileall; compileall.compile_dir("'"$RPM_BUILD_ROOT"'", '"10"', "%{python26_sitelib}", 1)' > /dev/null
|
||||||
|
%endif
|
||||||
|
|
||||||
|
|
||||||
%clean
|
%clean
|
||||||
rm -rf $RPM_BUILD_ROOT
|
rm -rf $RPM_BUILD_ROOT
|
||||||
@ -134,8 +190,19 @@ popd
|
|||||||
%{python3_sitelib}/*
|
%{python3_sitelib}/*
|
||||||
%endif # with_python3
|
%endif # with_python3
|
||||||
|
|
||||||
|
%if 0%{?with_python26}
|
||||||
|
%files -n python26-pygments
|
||||||
|
%defattr(-,root,root,-)
|
||||||
|
%doc AUTHORS CHANGES docs/ LICENSE TODO
|
||||||
|
%{python26_sitelib}/*
|
||||||
|
%endif # with_python26
|
||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Jun 24 2011 Steve Milner <smilner@fedoraproject.org> - 1.4-1
|
||||||
|
- update for upstream release
|
||||||
|
- Add python2.6 support done by Steve Traylen <steve.traylen@cern.ch>. BZ#662755.
|
||||||
|
|
||||||
* Wed Aug 25 2010 Thomas Spura <tomspur@fedoraproject.org> - 1.3.1-7
|
* Wed Aug 25 2010 Thomas Spura <tomspur@fedoraproject.org> - 1.3.1-7
|
||||||
- update to most recent python guidelines
|
- update to most recent python guidelines
|
||||||
- rebuild with python3.2
|
- rebuild with python3.2
|
||||||
|
Loading…
Reference in New Issue
Block a user