Only ship one version of the rst2* executables
Also, invoke python2 with python2 in %check
This commit is contained in:
parent
f58855a685
commit
4adf7b746c
@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
Name: python-%{srcname}
|
Name: python-%{srcname}
|
||||||
Version: 0.14
|
Version: 0.14
|
||||||
Release: 4%{?dist}
|
Release: 5%{?dist}
|
||||||
Summary: System for processing plaintext documentation
|
Summary: System for processing plaintext documentation
|
||||||
|
|
||||||
Group: Development/Languages
|
Group: Development/Languages
|
||||||
@ -105,41 +105,37 @@ popd
|
|||||||
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
# Must do the python3 install first because the scripts in /usr/bin are
|
%py2_install
|
||||||
# overwritten by setup.py install (and we want the python2 version to be the
|
|
||||||
# default for now).
|
|
||||||
%if 0%{?with_python3}
|
|
||||||
pushd %{py3dir}
|
|
||||||
%py3_install
|
|
||||||
|
|
||||||
# docutils setup.py runs 2to3 on a copy of the tests and puts it in sitelib.
|
# docutils setup.py runs 2to3 on a copy of the tests and puts it in sitelib.
|
||||||
rm -rf %{buildroot}%{python3_sitelib}/test
|
rm -rf %{buildroot}%{python3_sitelib}/test
|
||||||
|
|
||||||
for file in %{buildroot}/%{_bindir}/*.py; do
|
|
||||||
mv $file `dirname $file`/`basename $file .py`-3
|
|
||||||
done
|
|
||||||
|
|
||||||
# Flash file is used for testing docutils but shouldn't be in the installed package.
|
# Flash file is used for testing docutils but shouldn't be in the installed package.
|
||||||
mv docs/user/rst/images/biohazard.swf ./biohazard.swf
|
mv docs/user/rst/images/biohazard.swf ./biohazard.swf
|
||||||
popd
|
|
||||||
|
|
||||||
|
%if 0%{?with_python3}
|
||||||
|
rm -f %{buildroot}/%{_bindir}/*
|
||||||
%endif # with_python3
|
%endif # with_python3
|
||||||
|
|
||||||
%py2_install
|
%if 0%{?with_python3}
|
||||||
|
pushd %{py3dir}
|
||||||
for file in %{buildroot}/%{_bindir}/*.py; do
|
%py3_install
|
||||||
mv $file `dirname $file`/`basename $file .py`
|
|
||||||
done
|
|
||||||
|
|
||||||
# We want the licenses but don't need this build file
|
# We want the licenses but don't need this build file
|
||||||
rm -f licenses/docutils.conf
|
rm -f licenses/docutils.conf
|
||||||
|
|
||||||
# Flash file is used for testing docutils but shouldn't be in the installed package.
|
# Flash file is used for testing docutils but shouldn't be in the installed package.
|
||||||
mv docs/user/rst/images/biohazard.swf ./biohazard.swf
|
mv docs/user/rst/images/biohazard.swf ./biohazard.swf
|
||||||
|
popd
|
||||||
|
%endif # with_python3
|
||||||
|
|
||||||
|
for file in %{buildroot}/%{_bindir}/*.py; do
|
||||||
|
mv $file `dirname $file`/`basename $file .py`
|
||||||
|
done
|
||||||
|
|
||||||
|
|
||||||
%check
|
%check
|
||||||
mv biohazard.swf docs/user/rst/images/biohazard.swf
|
mv biohazard.swf docs/user/rst/images/biohazard.swf
|
||||||
python test/alltests.py
|
python2 test/alltests.py
|
||||||
rm docs/user/rst/images/biohazard.swf
|
rm docs/user/rst/images/biohazard.swf
|
||||||
|
|
||||||
%if 0%{?with_python3}
|
%if 0%{?with_python3}
|
||||||
@ -154,7 +150,6 @@ popd
|
|||||||
%license COPYING.txt licenses/*
|
%license COPYING.txt licenses/*
|
||||||
%doc BUGS.txt COPYING.txt FAQ.txt HISTORY.txt README.txt RELEASE-NOTES.txt
|
%doc BUGS.txt COPYING.txt FAQ.txt HISTORY.txt README.txt RELEASE-NOTES.txt
|
||||||
%doc THANKS.txt docs tools/editors
|
%doc THANKS.txt docs tools/editors
|
||||||
%{_bindir}/*[!'-3']
|
|
||||||
%{python2_sitelib}/*
|
%{python2_sitelib}/*
|
||||||
|
|
||||||
%if 0%{?with_python3}
|
%if 0%{?with_python3}
|
||||||
@ -162,11 +157,17 @@ popd
|
|||||||
%license COPYING.txt licenses/*
|
%license COPYING.txt licenses/*
|
||||||
%doc BUGS.txt FAQ.txt HISTORY.txt README.txt RELEASE-NOTES.txt
|
%doc BUGS.txt FAQ.txt HISTORY.txt README.txt RELEASE-NOTES.txt
|
||||||
%doc THANKS.txt docs tools/editors
|
%doc THANKS.txt docs tools/editors
|
||||||
%{_bindir}/*-3
|
|
||||||
%{python3_sitelib}/*
|
%{python3_sitelib}/*
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
# Leave this at the end to end up in the proper one
|
||||||
|
%{_bindir}/*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Jul 12 2018 Miro Hrončok <mhroncok@redhat.com> - 0.14-5
|
||||||
|
- Only ship one version of the rst2* executables
|
||||||
|
- Invoke python2 with python2 in %%check
|
||||||
|
|
||||||
* Thu Jun 14 2018 Miro Hrončok <mhroncok@redhat.com> - 0.14-4
|
* Thu Jun 14 2018 Miro Hrončok <mhroncok@redhat.com> - 0.14-4
|
||||||
- Rebuilt for Python 3.7
|
- Rebuilt for Python 3.7
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user