diff --git a/.gitignore b/.gitignore index b745d5c..4429615 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ /Chameleon-2.7.0.tar.gz /Chameleon-2.11.tar.gz /Chameleon-2.15.tar.gz +/Chameleon-2.16.tar.gz diff --git a/python-chameleon.spec b/python-chameleon.spec index f37b7c1..a8b5ad3 100644 --- a/python-chameleon.spec +++ b/python-chameleon.spec @@ -1,12 +1,18 @@ -%if 0%{?fedora} > 1 +%if 0%{?rhel} && 0%{?rhel} <= 6 +%{!?__python2: %global __python2 /usr/bin/python2} +%{!?python2_sitelib: %global python2_sitelib %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")} +%{!?python2_sitearch: %global python2_sitearch %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")} +%endif + +%if 0%{?fedora} %global with_python3 1 %endif %global srcname Chameleon Name: python-chameleon -Version: 2.15 -Release: 3%{?dist} +Version: 2.16 +Release: 1%{?dist} Summary: XML-based template compiler Group: Development/Languages @@ -90,7 +96,7 @@ pushd %{py3dir} popd %endif -%{__python} setup.py build +%{__python2} setup.py build PYTHONPATH=`pwd`/src make html @@ -101,13 +107,13 @@ pushd %{py3dir} popd %endif -%{__python} setup.py install --skip-build --root %{buildroot} +%{__python2} setup.py install --skip-build --root %{buildroot} # No need to ship docs and tests as part of the module -rm -rf %{buildroot}%{python_sitelib}/chameleon/docs -rm -rf %{buildroot}%{python_sitelib}/chameleon/tests +rm -rf %{buildroot}%{python2_sitelib}/chameleon/docs +rm -rf %{buildroot}%{python2_sitelib}/chameleon/tests # Data files for the tests -find %{buildroot}%{python_sitelib}/chameleon -name '*.txt' -exec rm \{\} \; +find %{buildroot}%{python2_sitelib}/chameleon -name '*.txt' -exec rm \{\} \; # Clean up the documentation mv _build/html . @@ -120,12 +126,12 @@ pushd %{py3dir} popd %endif -%{__python} setup.py test +%{__python2} setup.py test %files %doc *.rst *.txt docs html -%{python_sitelib}/chameleon/ -%{python_sitelib}/Chameleon-%{version}* +%{python2_sitelib}/chameleon/ +%{python2_sitelib}/Chameleon-%{version}* %if 0%{?with_python3} %files -n python3-chameleon @@ -135,6 +141,10 @@ popd %endif %changelog +* Wed Aug 20 2014 Ralph Bean - 2.16-1 +- Latest upstream. +- Modernize python2 macros. + * Sat Jun 07 2014 Fedora Release Engineering - 2.15-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild diff --git a/sources b/sources index 2354730..42b3a08 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -0214647152fcfcb9ce357624f8f9f203 Chameleon-2.15.tar.gz +6336d780dde9f7a4b8a5a8971dd983a1 Chameleon-2.16.tar.gz