Accepting request 489645 from home:TheBlackCat:branches:devel:languages:python
- Fix url - Executables are python-independent so only have the python3 version provide them. - Implement update-alternatives to avoid conflict with rst2html5 OBS-URL: https://build.opensuse.org/request/show/489645 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-docutils?expand=0&rev=38
This commit is contained in:
parent
056d029962
commit
8cd82ec937
@ -1,3 +1,11 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Apr 20 15:43:28 UTC 2017 - toddrme2178@gmail.com
|
||||||
|
|
||||||
|
- Fix url
|
||||||
|
- Executables are python-independent so only have the python3
|
||||||
|
version provide them.
|
||||||
|
- Implement update-alternatives to avoid conflict with rst2html5
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Fri Mar 24 12:53:55 UTC 2017 - aloisio@gmx.com
|
Fri Mar 24 12:53:55 UTC 2017 - aloisio@gmx.com
|
||||||
|
|
||||||
|
@ -24,7 +24,7 @@ Summary: Python Documentation Utilities
|
|||||||
License: Python-2.0 and BSD-2-Clause and GPL-2.0+ and GPL-3.0+ and SUSE-Public-Domain
|
License: Python-2.0 and BSD-2-Clause and GPL-2.0+ and GPL-3.0+ and SUSE-Public-Domain
|
||||||
Group: Development/Languages/Python
|
Group: Development/Languages/Python
|
||||||
Url: https://pypi.python.org/pypi/docutils/
|
Url: https://pypi.python.org/pypi/docutils/
|
||||||
Source: https://pypi.io/packages/source/d/docutils/docutils-%{version}.tar.gz
|
Source: https://files.pythonhosted.org/packages/source/d/docutils/docutils-%{version}.tar.gz
|
||||||
Source99: python-docutils-rpmlintrc
|
Source99: python-docutils-rpmlintrc
|
||||||
BuildRequires: %{python_module devel}
|
BuildRequires: %{python_module devel}
|
||||||
BuildRequires: %{python_module nose}
|
BuildRequires: %{python_module nose}
|
||||||
@ -32,11 +32,10 @@ BuildRequires: %{python_module xml}
|
|||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
BuildRequires: python-rpm-macros
|
BuildRequires: python-rpm-macros
|
||||||
Requires: python-xml
|
Requires: python-xml
|
||||||
Requires(post): update-alternatives
|
|
||||||
Requires(postun): update-alternatives
|
|
||||||
Provides: docutils = %{version}
|
Provides: docutils = %{version}
|
||||||
Obsoletes: docutils < %{version}
|
Obsoletes: docutils < %{version}
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
Requires(post): update-alternatives
|
||||||
|
Requires(preun): update-alternatives
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
%python_subpackages
|
%python_subpackages
|
||||||
|
|
||||||
@ -63,35 +62,37 @@ sed -i -e "1d" "docutils/writers/xetex/__init__.py" "docutils/writers/_html_base
|
|||||||
%python_install
|
%python_install
|
||||||
%python_expand %fdupes -s %{buildroot}%{$python_sitelib}
|
%python_expand %fdupes -s %{buildroot}%{$python_sitelib}
|
||||||
|
|
||||||
for p in rst2html rst2html5 rst2latex rst2man rst2odt rst2odt_prepstyles \
|
# To avoid conflicts with the rst2html5 package
|
||||||
rst2pseudoxml rst2s5 rst2xetex rst2xml rstpep2html ; do
|
mv %{buildroot}%{_bindir}/rst2html5 %{buildroot}%{_bindir}/rst2html5-docutils
|
||||||
%python_clone -a %{buildroot}%{_bindir}/$p
|
ln -s -f %{_sysconfdir}/alternatives/rst2html5 %{buildroot}%{_bindir}/rst2html5
|
||||||
done
|
|
||||||
|
%post
|
||||||
|
update-alternatives --install %{_bindir}/rst2html5 rst2html5 %{_bindir}/rst2html5-docutils 15
|
||||||
|
|
||||||
|
%preun
|
||||||
|
if [ ! -f %{_bindir}/rst2html5-docutils ] ; then
|
||||||
|
update-alternatives --remove rst2html5 %{_bindir}/rst2html5-docutils
|
||||||
|
fi
|
||||||
|
|
||||||
%check
|
%check
|
||||||
%python_exec -c 'import subprocess; import sys; sys.exit(subprocess.call([sys.executable, "test/alltests.py" if sys.version_info[0] == 2 else "test3/alltests.py"]))'
|
%python_exec -c 'import subprocess; import sys; sys.exit(subprocess.call([sys.executable, "test/alltests.py" if sys.version_info[0] == 2 else "test3/alltests.py"]))'
|
||||||
|
|
||||||
%post
|
|
||||||
%{python_install_alternative rst2html rst2html5 rst2latex rst2man rst2odt rst2odt_prepstyles
|
|
||||||
rst2pseudoxml rst2s5 rst2xetex rst2xml rstpep2html}
|
|
||||||
|
|
||||||
%postun
|
|
||||||
%python_uninstall_alternative rst2html
|
|
||||||
|
|
||||||
%files %{python_files}
|
%files %{python_files}
|
||||||
%defattr(-,root,root,-)
|
%defattr(-,root,root,-)
|
||||||
%doc COPYING.txt FAQ.txt HISTORY.txt README.txt THANKS.txt BUGS.txt docs/* licenses
|
%doc COPYING.txt FAQ.txt HISTORY.txt README.txt THANKS.txt BUGS.txt docs/* licenses
|
||||||
%python_alternative %{_bindir}/rst2html
|
%python3_only %{_bindir}/rst2html
|
||||||
%python_alternative %{_bindir}/rst2html5
|
%python3_only %{_bindir}/rst2latex
|
||||||
%python_alternative %{_bindir}/rst2latex
|
%python3_only %{_bindir}/rst2man
|
||||||
%python_alternative %{_bindir}/rst2man
|
%python3_only %{_bindir}/rst2odt
|
||||||
%python_alternative %{_bindir}/rst2odt
|
%python3_only %{_bindir}/rst2odt_prepstyles
|
||||||
%python_alternative %{_bindir}/rst2odt_prepstyles
|
%python3_only %{_bindir}/rst2pseudoxml
|
||||||
%python_alternative %{_bindir}/rst2pseudoxml
|
%python3_only %{_bindir}/rst2s5
|
||||||
%python_alternative %{_bindir}/rst2s5
|
%python3_only %{_bindir}/rst2xetex
|
||||||
%python_alternative %{_bindir}/rst2xetex
|
%python3_only %{_bindir}/rst2xml
|
||||||
%python_alternative %{_bindir}/rst2xml
|
%python3_only %{_bindir}/rstpep2html
|
||||||
%python_alternative %{_bindir}/rstpep2html
|
%python3_only %{_bindir}/rst2html5
|
||||||
|
%python3_only %{_bindir}/rst2html5-docutils
|
||||||
|
%python3_only %ghost %{_sysconfdir}/alternatives/rst2html5
|
||||||
%{python_sitelib}/docutils/
|
%{python_sitelib}/docutils/
|
||||||
%{python_sitelib}/docutils-%{version}-py%{python_version}.egg-info
|
%{python_sitelib}/docutils-%{version}-py%{python_version}.egg-info
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user