diff --git a/python-chameleon.spec b/python-chameleon.spec index 8e94231..5637dca 100644 --- a/python-chameleon.spec +++ b/python-chameleon.spec @@ -11,20 +11,18 @@ %global srcname Chameleon Name: python-chameleon -Version: 3.2 -Release: 5%{?dist} +Version: 3.4 +Release: 1%{?dist} Summary: XML-based template compiler Group: Development/Languages License: BSD URL: https://github.com/malthe/chameleon -Source0: https://github.com/malthe/chameleon/archive/%{version}.tar.gz +Source0: %pypi_source %{srcname} BuildArch: noarch BuildRequires: python2-devel -# For docs -BuildRequires: python2-sphinx # For tests to run BuildRequires: python2-setuptools BuildRequires: python2-lxml @@ -32,7 +30,6 @@ BuildRequires: python2-zope-interface %if 0%{?with_python3} BuildRequires: python3-devel -BuildRequires: python3-sphinx BuildRequires: python3-setuptools BuildRequires: python3-lxml BuildRequires: python3-zope-interface @@ -84,65 +81,51 @@ Requires: python3-lxml %endif %prep -%autosetup -n chameleon-%{version} - -%if 0%{?with_python3} -rm -rf %{py3dir} -cp -a . %{py3dir} -%endif +%autosetup -n Chameleon-%{version} %build +%py2_build %if 0%{?with_python3} -pushd %{py3dir} -%{__python3} setup.py build -popd +%py3_build %endif -%{__python2} setup.py build - -PYTHONPATH=`pwd`/src make html - %install +%py2_install %if 0%{?with_python3} -pushd %{py3dir} -%{__python3} setup.py install --skip-build --root=%{buildroot} -popd +%py3_install %endif -%{__python2} setup.py install --skip-build --root %{buildroot} - -# No need to ship docs and tests as part of the module -rm -rf %{buildroot}%{python2_sitelib}/chameleon/docs +# No need to ship tests as part of the module rm -rf %{buildroot}%{python2_sitelib}/chameleon/tests # Data files for the tests find %{buildroot}%{python2_sitelib}/chameleon -name '*.txt' -exec rm \{\} \; -# Clean up the documentation -mv _build/html . -rm -rf html/.buildinfo - %check +%{__python2} setup.py test %if 0%{?with_python3} -pushd %{py3dir} %{__python3} setup.py test -popd %endif -%{__python2} setup.py test %files -n python2-chameleon -%doc *.rst *.txt docs html +%doc README.rst %{python2_sitelib}/chameleon/ %{python2_sitelib}/Chameleon-%{version}* %if 0%{?with_python3} %files -n python3-chameleon -%doc *.rst *.txt docs html +%doc README.rst %{python3_sitelib}/chameleon/ %{python3_sitelib}/Chameleon-%{version}* %endif %changelog +* Wed Jul 25 2018 Pierre-Yves Chibon - 3.4-1 +- Update to 3.4 +- Modernize spec file a little +- Drop building the documentation as apparently upstream stopped shipping it in + their tarball + * Fri Jul 13 2018 Fedora Release Engineering - 3.2-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild