From ffb77c7ed3c6c36b414966d71e5a1021c0b2fce7 Mon Sep 17 00:00:00 2001 From: Toshio Kuratomi Date: Sat, 18 Feb 2017 10:02:44 -0800 Subject: [PATCH] Cleanup source files that should not be installed Fix the __init__.pyc that was byte compiled for the wrong python --- python-sphinx.spec | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/python-sphinx.spec b/python-sphinx.spec index b47d41d..1857edb 100644 --- a/python-sphinx.spec +++ b/python-sphinx.spec @@ -15,7 +15,7 @@ Name: python-sphinx Version: 1.5.2 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Python documentation generator Group: Development/Tools @@ -362,6 +362,10 @@ sed '1d' -i sphinx/pycode/pgen2/token.py # fix line encoding of bundled jquery.js dos2unix -k ./sphinx/themes/basic/static/jquery.js +# In 1.5.2, the upstream tarball left this .pyc by mistake. +# Remove it so that it doesn't get included in the python3 build by mistake +rm sphinx/locale/__init__.pyc + %if 0%{?with_python3} rm -rf %{py3dir} cp -a . %{py3dir} @@ -391,6 +395,12 @@ for i in sphinx-{apidoc,autogen,build,quickstart}; do ln -s $i-%{python3_version} %{buildroot}%{_bindir}/$i-3 ln -s %{_bindir}/$i-3 %{buildroot}%{_libexecdir}/python3-sphinx/$i done + +# These appear to be incomplete C extensions to speed up parsing. They are not +# built by setup.py yet. Removing them in %%install so that if sphinx does +# make use of them, and we don't notice, we only remove these source files +# after the build has created the .so's +rm %{builddir}%{python3_sitelib}/sphinx/pycode/pgen2/parse.{pyx,c} %endif # with_python3 %py2_install @@ -401,6 +411,12 @@ for i in sphinx-{apidoc,autogen,build,quickstart}; do ln -s %{_bindir}/$i-2 %{buildroot}%{_libexecdir}/python2-sphinx/$i done +# These appear to be incomplete C extensions to speed up parsing. They are not +# built by setup.py yet. Removing them in %%install so that if sphinx does +# make use of them, and we don't notice, we only remove these source files +# after the build has created the .so's +rm %{builddir}%{python2_sitelib}/sphinx/pycode/pgen2/parse.{pyx,c} + pushd doc # Deliver man pages install -d %{buildroot}%{_mandir}/man1 @@ -566,6 +582,10 @@ popd %changelog +* Sat Feb 18 2017 Toshio Kuratomi - - 1.5.2-2 +- Cleanup source files that should not be installed +- Fix the __init__.pyc that was byte compiled for the wrong python + * Fri Feb 17 2017 Toshio Kuratomi - - 1.5.2-1 - Update to 1.5.2 - Remove a few latex dependencies that are no longer needed