Use python macros.

This commit is contained in:
Jerry James 2016-02-01 21:45:41 -07:00
parent b2c30d5f69
commit 39f457b07c

View File

@ -113,11 +113,11 @@ popd
%build %build
# Build the python2 version # Build the python2 version
python2 setup.py build %py2_build
# Build the python3 version # Build the python3 version
pushd %{py3dir} pushd %{py3dir}
python3 setup.py build %py3_build
popd popd
# Build the documentation # Build the documentation
@ -131,7 +131,7 @@ popd
%install %install
# Install the python3 version # Install the python3 version
pushd %{py3dir} pushd %{py3dir}
python3 setup.py install -O1 --skip-build --root %{buildroot} %py3_install
sed -i 's/env python/python3/' %{buildroot}%{_bindir}/isympy sed -i 's/env python/python3/' %{buildroot}%{_bindir}/isympy
touch -r bin/isympy %{buildroot}%{_bindir}/isympy touch -r bin/isympy %{buildroot}%{_bindir}/isympy
mv %{buildroot}%{_bindir}/isympy %{buildroot}%{_bindir}/python3-isympy mv %{buildroot}%{_bindir}/isympy %{buildroot}%{_bindir}/python3-isympy
@ -140,7 +140,7 @@ mv %{buildroot}%{_mandir}/man1/isympy.1 \
popd popd
# Install the python2 version # Install the python2 version
python2 setup.py install -O1 --skip-build --root %{buildroot} %py2_install
sed -i 's/env python/python2/' %{buildroot}%{_bindir}/isympy sed -i 's/env python/python2/' %{buildroot}%{_bindir}/isympy
touch -r bin/isympy %{buildroot}%{_bindir}/isympy touch -r bin/isympy %{buildroot}%{_bindir}/isympy