diff --git a/python-pelican.spec b/python-pelican.spec index f073872..f3c418d 100644 --- a/python-pelican.spec +++ b/python-pelican.spec @@ -6,11 +6,11 @@ %{!?__python2:%global __python2 %{__python}} Name: python-%{pypi_name} Version: 3.6.3 -Release: 5%{?dist} +Release: 6%{?dist} Summary: A tool to generate a static blog from reStructuredText or Markdown input files License: AGPLv3 -URL: http://getpelican.com/ +URL: http://getpelican.com Source0: https://github.com/getpelican/pelican/archive/%{version}.tar.gz#/%{pypi_name}-%{version}.tar.gz BuildArch: noarch @@ -25,8 +25,7 @@ Pelican is a static site generator, written in Python_. %package -n python2-%{pypi_name} Summary: A tool to generate a static blog from reStructuredText or Markdown input files - -Obsoletes: python-%{pypi_name} < 3.6.3-3 +%{?python_provide:%python_provide python2-%{pypi_name}} BuildRequires: python-devel BuildRequires: python-sphinx @@ -68,6 +67,7 @@ Pelican is a static site generator, written in Python_. %if 0%{?with_python3} %package -n python3-%{pypi_name} Summary: A tool to generate a static blog from reStructuredText or Markdown input files +%{?python_provide:%python_provide python3-%{pypi_name}} BuildRequires: python3-devel BuildRequires: python3-blinker @@ -107,17 +107,7 @@ Pelican is a static site generator, written in Python_. %prep -%setup -qc -mv %{pypi_name}-%{version} python2 -pushd python2 - -# copy LICENSE etc. to top level dir -cp -a LICENSE .. -cp -a README.rst .. - -# Remove bundled egg-info -rm -rf %{pypi_name}.egg-info - +%autosetup -n %{pypi_name}-%{version} # make file not zero length to silence rpmlint echo " " > pelican/themes/simple/templates/tag.html @@ -131,16 +121,9 @@ sed -i '1d' pelican/tools/templates/pelicanconf.py.in sed -i 's|feedgenerator|django.utils.feedgenerator|' pelican/writers.py sed -i "s|'feedgenerator >= 1.6', ||" setup.py sed -i "s|'pytz >= 0a'|'pytz'|" setup.py -popd - -%if 0%{?with_python3} -cp -a python2 python3 -%endif - %build -pushd python2 -%{__python2} setup.py build +%py2_build # build docs sphinx-build docs html @@ -149,40 +132,29 @@ sphinx-build docs html rm html/_downloads/theme-basic.zip html/_static/theme-basic.zip rm -rf html/.doctrees html/.buildinfo -mv html .. -popd - %if 0%{?with_python3} -pushd python3 -%{__python3} setup.py build -popd +%py3_build %endif %install %if 0%{?with_python3} -pushd python3 -%{__python3} setup.py install --skip-build --root %{buildroot} -popd +%py3_install # rename helpers -mv %{buildroot}/%{_bindir}/pelican %{buildroot}/%{_bindir}/py3-pelican -mv %{buildroot}/%{_bindir}/pelican-import %{buildroot}/%{_bindir}/py3-pelican-import -mv %{buildroot}/%{_bindir}/pelican-quickstart %{buildroot}/%{_bindir}/py3-pelican-quickstart -mv %{buildroot}/%{_bindir}/pelican-themes %{buildroot}/%{_bindir}/py3-pelican-themes +mv %{buildroot}/%{_bindir}/pelican %{buildroot}/%{_bindir}/pelican-3 +mv %{buildroot}/%{_bindir}/pelican-import %{buildroot}/%{_bindir}/pelican-import-3 +mv %{buildroot}/%{_bindir}/pelican-quickstart %{buildroot}/%{_bindir}/pelican-quickstart-3 +mv %{buildroot}/%{_bindir}/pelican-themes %{buildroot}/%{_bindir}/pelican-themes-3 %endif -pushd python2 -%{__python2} setup.py install --skip-build --root %{buildroot} -popd +%py2_install %check # disable tests for now. they are a bit unstable due comparing # html attributes via diff. Failed several times, when attributes # were ordered differently! -#pushd python2 #nosetests -sv --with-coverage --cover-package=pelican pelican -#popd %files -n python2-%{pypi_name} %doc html README.rst @@ -199,16 +171,20 @@ popd %files -n python3-pelican %doc html README.rst %license LICENSE -%{_bindir}/py3-pelican -%{_bindir}/py3-pelican-import -%{_bindir}/py3-pelican-quickstart -%{_bindir}/py3-pelican-themes +%{_bindir}/pelican-3 +%{_bindir}/pelican-import-3 +%{_bindir}/pelican-quickstart-3 +%{_bindir}/pelican-themes-3 %{python3_sitelib}/%{pypi_name} %{python3_sitelib}/%{pypi_name}-*-py?.?.egg-info %endif %changelog +* Wed Aug 03 2016 Matthias Runge - 3.6.3-6 +- rename python3 executables (rhbz#1362516) +- modernize spec file + * Tue Jul 19 2016 Fedora Release Engineering - 3.6.3-5 - https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages