From 6d324acb0a67b9e97686f12c1ece5f0d069a2c6264f0dc58c62e9ee29d7a8383 Mon Sep 17 00:00:00 2001 From: Sascha Peilicke Date: Tue, 20 Nov 2012 17:27:36 +0000 Subject: [PATCH 1/3] - Run testsuite - Build and install man-pages - Build and install man-pages - Python3 binaries should have the prefix "python3-" + Matches Fedora's Python packaging policies + Uniform pattern, we currently have a wild mix OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-Sphinx?expand=0&rev=20 --- python-Sphinx.changes | 6 ++++++ python-Sphinx.spec | 14 ++++++++++++-- python3-Sphinx.changes | 8 ++++++++ python3-Sphinx.spec | 22 ++++++++++++++++------ 4 files changed, 42 insertions(+), 8 deletions(-) diff --git a/python-Sphinx.changes b/python-Sphinx.changes index 1e2156f..3e93740 100644 --- a/python-Sphinx.changes +++ b/python-Sphinx.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Nov 20 11:42:44 UTC 2012 - saschpe@suse.de + +- Run testsuite +- Build and install man-pages + ------------------------------------------------------------------- Thu Nov 15 05:29:16 UTC 2012 - saschpe@suse.de diff --git a/python-Sphinx.spec b/python-Sphinx.spec index 3db3584..06e572b 100644 --- a/python-Sphinx.spec +++ b/python-Sphinx.spec @@ -30,6 +30,9 @@ BuildRequires: python-Jinja2 BuildRequires: python-devel BuildRequires: python-distribute BuildRequires: python-docutils +# Testsuite build requirements: +BuildRequires: python-Pygments +BuildRequires: python-nose Requires: python-Jinja2 Requires: python-Pygments Requires: python-distribute @@ -78,20 +81,27 @@ sed -i '/#\!/d' sphinx/pycode/pgen2/token.py # Fix non-excutable-script warning %build python setup.py build -cd doc && make html && rm _build/html/.buildinfo +python setup.py build_sphinx && rm build/sphinx/html/.buildinfo +python setup.py build_sphinx -b man %install python setup.py install --prefix=%{_prefix} --root=%{buildroot} +install -d %{buildroot}%{_mandir}/man1/ +install -m 644 build/sphinx/man/sphinx-*.1 %{buildroot}%{_mandir}/man1/ %find_lang sphinx +%check +nosetests + %files -f sphinx.lang %defattr(-,root,root,-) %doc AUTHORS CHANGES LICENSE README TODO %{_bindir}/sphinx-* +%{_mandir}/man1/sphinx-* %{python_sitelib}/* %files doc %defattr(-,root,root,-) -%doc EXAMPLES doc/_build/html +%doc EXAMPLES build/sphinx/html %changelog diff --git a/python3-Sphinx.changes b/python3-Sphinx.changes index cf9251e..8334b7a 100644 --- a/python3-Sphinx.changes +++ b/python3-Sphinx.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Tue Nov 20 17:24:58 UTC 2012 - saschpe@suse.de + +- Build and install man-pages +- Python3 binaries should have the prefix "python3-" + + Matches Fedora's Python packaging policies + + Uniform pattern, we currently have a wild mix + ------------------------------------------------------------------- Tue Nov 6 00:24:32 UTC 2012 - saschpe@suse.de diff --git a/python3-Sphinx.spec b/python3-Sphinx.spec index 156b7af..4ae697a 100644 --- a/python3-Sphinx.spec +++ b/python3-Sphinx.spec @@ -31,6 +31,9 @@ BuildRequires: python3-Jinja2 BuildRequires: python3-devel BuildRequires: python3-distribute BuildRequires: python3-docutils +# Testsuite build requirements: +BuildRequires: python3-Pygments +BuildRequires: python3-nose Requires: python3-Jinja2 Requires: python3-Pygments Requires: python3-distribute @@ -72,30 +75,37 @@ and translating suite, the Docutils. %setup -q -n Sphinx-%{version} %patch0 sed -i '/#\!/d' sphinx/pycode/pgen2/token.py # Fix non-excutable-script warning +sed -i "s|\(sphinx-.*\) =|python3-\1 =|" setup.py # Add Python version prefix to binaries +sed -i "s|'\(sphinx-.*\)'|'python3-\1'|" doc/conf.py # Do the same for man-pages %build 2to3 . -w --nobackups python3 setup.py build sed -i 's/python/python3/g' doc/Makefile -cd doc && make html && rm _build/html/.buildinfo +python3 setup.py build_sphinx && rm build/sphinx/html/.buildinfo # Build HTML documentation +python3 setup.py build_sphinx -b man # Build man-pages %install python3 setup.py install --prefix=%{_prefix} --root=%{buildroot} -for i in %{buildroot}%{_bindir}/*; do - mv "$i" "${i}-python%{py3_ver}" -done +install -d %{buildroot}%{_mandir}/man1/ +install -m 644 build/sphinx/man/python3-sphinx-*.1 %{buildroot}%{_mandir}/man1/ %fdupes %{buildroot}%{_prefix} %find_lang sphinx +#TODO: Fix +#%%check +#python3-nosetests + %files -f sphinx.lang %defattr(-,root,root,-) %doc AUTHORS CHANGES LICENSE README TODO -%{_bindir}/sphinx-*-python%{py3_ver} +%{_bindir}/python3-sphinx-* +%{_mandir}/man1/python3-sphinx-* %{python3_sitelib}/sphinx/ %{python3_sitelib}/Sphinx-%{version}-py%{py3_ver}.egg-info %files doc %defattr(-,root,root,-) -%doc EXAMPLES doc/_build/html +%doc EXAMPLES build/sphinx/html %changelog From 7a1b2025593b3dcdddeafce1a476f26b3ba0439960ecfa5043276b6100da7fe5 Mon Sep 17 00:00:00 2001 From: Sascha Peilicke Date: Tue, 20 Nov 2012 17:37:30 +0000 Subject: [PATCH 2/3] Fix commenT OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-Sphinx?expand=0&rev=21 --- python3-Sphinx.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python3-Sphinx.spec b/python3-Sphinx.spec index 4ae697a..194f924 100644 --- a/python3-Sphinx.spec +++ b/python3-Sphinx.spec @@ -94,7 +94,7 @@ install -m 644 build/sphinx/man/python3-sphinx-*.1 %{buildroot}%{_mandir}/man1/ #TODO: Fix #%%check -#python3-nosetests +#nosetests-%{py3_ver} %files -f sphinx.lang %defattr(-,root,root,-) From c6e0b97f65442939b0b476f5e68a9a39aef5331968b7e7204a434a9c223184f9 Mon Sep 17 00:00:00 2001 From: Sascha Peilicke Date: Tue, 20 Nov 2012 18:37:31 +0000 Subject: [PATCH 3/3] - Name Python3 binaries consistently: + Fix in setup.py to have correct egg-info data OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-Sphinx?expand=0&rev=22 --- python3-Sphinx.changes | 5 ++--- python3-Sphinx.spec | 11 +++++------ 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/python3-Sphinx.changes b/python3-Sphinx.changes index 8334b7a..7b7f24e 100644 --- a/python3-Sphinx.changes +++ b/python3-Sphinx.changes @@ -2,9 +2,8 @@ Tue Nov 20 17:24:58 UTC 2012 - saschpe@suse.de - Build and install man-pages -- Python3 binaries should have the prefix "python3-" - + Matches Fedora's Python packaging policies - + Uniform pattern, we currently have a wild mix +- Name Python3 binaries consistently: + + Fix in setup.py to have correct egg-info data ------------------------------------------------------------------- Tue Nov 6 00:24:32 UTC 2012 - saschpe@suse.de diff --git a/python3-Sphinx.spec b/python3-Sphinx.spec index 194f924..db2b9d3 100644 --- a/python3-Sphinx.spec +++ b/python3-Sphinx.spec @@ -75,20 +75,19 @@ and translating suite, the Docutils. %setup -q -n Sphinx-%{version} %patch0 sed -i '/#\!/d' sphinx/pycode/pgen2/token.py # Fix non-excutable-script warning -sed -i "s|\(sphinx-.*\) =|python3-\1 =|" setup.py # Add Python version prefix to binaries -sed -i "s|'\(sphinx-.*\)'|'python3-\1'|" doc/conf.py # Do the same for man-pages +sed -i "s|\(sphinx-.*\) =|\1-%{py3_ver} =|" setup.py # Add Python version suffix to binaries +sed -i "s|'\(sphinx-[a-z]*\)'|'\1-%{py3_ver}'|" doc/conf.py # Do the same for man-pages %build 2to3 . -w --nobackups python3 setup.py build -sed -i 's/python/python3/g' doc/Makefile python3 setup.py build_sphinx && rm build/sphinx/html/.buildinfo # Build HTML documentation python3 setup.py build_sphinx -b man # Build man-pages %install python3 setup.py install --prefix=%{_prefix} --root=%{buildroot} install -d %{buildroot}%{_mandir}/man1/ -install -m 644 build/sphinx/man/python3-sphinx-*.1 %{buildroot}%{_mandir}/man1/ +install -m 644 build/sphinx/man/*.1 %{buildroot}%{_mandir}/man1/ %fdupes %{buildroot}%{_prefix} %find_lang sphinx @@ -99,8 +98,8 @@ install -m 644 build/sphinx/man/python3-sphinx-*.1 %{buildroot}%{_mandir}/man1/ %files -f sphinx.lang %defattr(-,root,root,-) %doc AUTHORS CHANGES LICENSE README TODO -%{_bindir}/python3-sphinx-* -%{_mandir}/man1/python3-sphinx-* +%{_bindir}/sphinx-*-%{py3_ver} +%{_mandir}/man1/sphinx-*-%{py3_ver}.1.gz %{python3_sitelib}/sphinx/ %{python3_sitelib}/Sphinx-%{version}-py%{py3_ver}.egg-info