1
0
forked from pool/virtualbox

- Made changes requested in comments for request 646211.

1. Sustituted /usr/lib/python3.7/site-packages/ => %python3_sitelib
  2. Reverted change that eliminated use of %{_tmppath}/SITE_FILES for Python 3.6
  3. As vboxapisetup.py in Python 3.7 no longer accepts the --record-rpm switch,
     SITE_FILES does not exist, and the individual files must still be listed.

OBS-URL: https://build.opensuse.org/package/show/Virtualization/virtualbox?expand=0&rev=451
This commit is contained in:
Larry Finger 2018-11-05 22:29:16 +00:00 committed by Git OBS Bridge
parent 6f3f26ff86
commit a9fe22c4ef
2 changed files with 28 additions and 19 deletions

View File

@ -1,3 +1,12 @@
-------------------------------------------------------------------
Mon Nov 5 22:14:57 UTC 2018 - Larry Finger <Larry.Finger@gmail.com>
- Made changes requested in comments for request 646211.
1. Sustituted /usr/lib/python3.7/site-packages/ => %python3_sitelib
2. Reverted change that eliminated use of %{_tmppath}/SITE_FILES for Python 3.6
3. As vboxapisetup.py in Python 3.7 no longer accepts the --record-rpm switch,
SITE_FILES does not exist, and the individual files must still be listed.
------------------------------------------------------------------- -------------------------------------------------------------------
Sat Nov 3 04:04:06 UTC 2018 - Larry Finger <Larry.Finger@gmail.com> Sat Nov 3 04:04:06 UTC 2018 - Larry Finger <Larry.Finger@gmail.com>

View File

@ -709,7 +709,11 @@ install -m 0755 -D src/VBox/Installer/linux/VBoxCreateUSBNode.sh %{buildroot}%{_
echo "entering python-virtualbox install section" echo "entering python-virtualbox install section"
###################################################### ######################################################
pushd out/linux.*/release/bin/sdk/installer pushd out/linux.*/release/bin/sdk/installer
%if %python3_version_nodots == 36
VBOX_INSTALL_PATH=%{_vbox_instdir} python3 vboxapisetup.py install --prefix=%{_prefix} --root=%{buildroot} --record-rpm=%{_tmppath}/SITE_FILES
%else
VBOX_INSTALL_PATH=%{_vbox_instdir} python3 vboxapisetup.py install --prefix=%{_prefix} --root=%{buildroot} VBOX_INSTALL_PATH=%{_vbox_instdir} python3 vboxapisetup.py install --prefix=%{_prefix} --root=%{buildroot}
%endif
popd popd
install -d -m 755 %{buildroot}%{_vbox_instdir}/sdk/bindings/xpcom install -d -m 755 %{buildroot}%{_vbox_instdir}/sdk/bindings/xpcom
cp -r out/linux.*/release/bin/sdk/bindings/xpcom/python %{buildroot}%{_vbox_instdir}/sdk/bindings/xpcom cp -r out/linux.*/release/bin/sdk/bindings/xpcom/python %{buildroot}%{_vbox_instdir}/sdk/bindings/xpcom
@ -978,6 +982,9 @@ export DISABLE_RESTART_ON_UPDATE=yes
%dir /media %dir /media
%endif %endif
%if %python3_version_nodots == 36
%files -n python3-%{name} -f %{_tmppath}/SITE_FILES
%endif
%defattr(-, root, root) %defattr(-, root, root)
%dir %{_vbox_instdir}/sdk %dir %{_vbox_instdir}/sdk
%dir %{_vbox_instdir}/sdk/bindings %dir %{_vbox_instdir}/sdk/bindings
@ -987,27 +994,20 @@ export DISABLE_RESTART_ON_UPDATE=yes
# With Python 3.6 and earlier, vboxapisetup.py would save the names of the files # With Python 3.6 and earlier, vboxapisetup.py would save the names of the files
# that it created to a temporary file and use that file to create a list. With # that it created to a temporary file and use that file to create a list. With
# Python 3.7, this file is no longer created, thus the code is switched to handling # Python 3.7, this file is no longer created, thus the code is switched to handling
# those directories and file manually. The python3_version_nodots macro is used to # those directories and files manually. The python3_version_nodots macro is used to
# detect the correct file names. # detect the version.
# #
%if %python3_version_nodots > 36 %if %python3_version_nodots == 36
%attr(0755, root, root) %{_vbox_instdir}/VBoxPython3_7m.so
%dir /usr/lib/python3.7/site-packages/vboxapi
%dir /usr/lib/python3.7/site-packages/vboxapi/__pycache__
%attr(0755, root, root) /usr/lib/python3.7/site-packages/vboxapi-1.0-py3.7.egg-info
%attr(0755, root, root) /usr/lib/python3.7/site-packages/vboxapi/VirtualBox_constants.py
%attr(0755, root, root) /usr/lib/python3.7/site-packages/vboxapi/__init__.py
%attr(0755, root, root) /usr/lib/python3.7/site-packages/vboxapi/__pycache__/VirtualBox_constants.cpython-37.pyc
%attr(0755, root, root) /usr/lib/python3.7/site-packages/vboxapi/__pycache__/__init__.cpython-37.pyc
%else
%dir /usr/lib/python3.6/site-packages/vboxapi
%dir /usr/lib/python3.6/site-packages/vboxapi/__pycache__
%attr(0755, root, root) %{_vbox_instdir}/VBoxPython3_6m.so %attr(0755, root, root) %{_vbox_instdir}/VBoxPython3_6m.so
%attr(0755, root, root) /usr/lib/python3.6/site-packages/vboxapi-1.0-py3.6.egg-info %else
%attr(0755, root, root) /usr/lib/python3.6/site-packages/vboxapi/VirtualBox_constants.py %attr(0755, root, root) %{_vbox_instdir}/VBoxPython3_7m.so
%attr(0755, root, root) /usr/lib/python3.6/site-packages/vboxapi/__init__.py %dir %{python3_sitelib}/vboxapi
%attr(0755, root, root) /usr/lib/python3.6/site-packages/vboxapi/__pycache__/VirtualBox_constants.cpython-36.pyc %dir %{python3_sitelib}/vboxapi/__pycache__
%attr(0755, root, root) /usr/lib/python3.6/site-packages/vboxapi/__pycache__/__init__.cpython-36.pyc %attr(0755, root, root) %{python3_sitelib}/vboxapi-1.0-py3.7.egg-info
%attr(0755, root, root) %{python3_sitelib}/vboxapi/VirtualBox_constants.py
%attr(0755, root, root) %{python3_sitelib}/vboxapi/__init__.py
%attr(0755, root, root) %{python3_sitelib}/vboxapi/__pycache__/VirtualBox_constants.cpython-37.pyc
%attr(0755, root, root) %{python3_sitelib}/vboxapi/__pycache__/__init__.cpython-37.pyc
%endif %endif
%files devel %files devel