- 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
This commit is contained in:
Sascha Peilicke 2012-11-20 18:37:31 +00:00 committed by Git OBS Bridge
parent 7a1b202559
commit c6e0b97f65
2 changed files with 7 additions and 9 deletions

View File

@ -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

View File

@ -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