forked from pool/virtualbox
Use specific python version, not python3
This commit is contained in:
parent
26a839baae
commit
c69449fd8a
@ -1,43 +0,0 @@
|
||||
From: Jan Engelhardt <ej@inai.de>
|
||||
Date: 2025-02-19 11:09:20.509506861 +0100
|
||||
|
||||
Inspired by
|
||||
|
||||
https://github.com/rpmfusion/VirtualBox/blob/master/VirtualBox-7.1.4-python-3.13.patch
|
||||
http://launchpadlibrarian.net/769589116/virtualbox_7.0.20-dfsg-1.1_7.0.20-dfsg-1.1ubuntu1.diff.gz
|
||||
|
||||
we whitelist all pythons.
|
||||
|
||||
In practice however, it seems to be fruitless.
|
||||
|
||||
```
|
||||
[ 1103s] + python3[3.13] vboxapisetup.py install --prefix=/usr --root=/home/abuild/rpmbuild/BUILD/virtualbox-7.1.4-build/BUILDROOT
|
||||
[ 1103s] Traceback (most recent call last):
|
||||
[ 1103s] File "/home/abuild/rpmbuild/BUILD/virtualbox-7.1.4-build/VirtualBox-7.1.4/out/linux.amd64/release/bin/sdk/installer/python/vboxapisetup.py", line 40, in <module>
|
||||
[ 1103s] import setup
|
||||
[ 1103s] File "/home/abuild/rpmbuild/BUILD/virtualbox-7.1.4-build/VirtualBox-7.1.4/out/linux.amd64/release/bin/sdk/installer/python/vboxapi/setup.py", line 193, in <module>
|
||||
[ 1103s] class VBoxSetupInstallClass(install):
|
||||
[ 1103s] ^^^^^^^
|
||||
[ 1103s] NameError: name 'install' is not defined
|
||||
```
|
||||
|
||||
---
|
||||
configure | 5 ++++-
|
||||
1 file changed, 4 insertions(+), 1 deletion(-)
|
||||
|
||||
Index: VirtualBox-7.1.4/configure
|
||||
===================================================================
|
||||
--- VirtualBox-7.1.4.orig/configure
|
||||
+++ VirtualBox-7.1.4/configure
|
||||
@@ -2187,7 +2187,10 @@ extern "C" int main(void)
|
||||
}
|
||||
EOF
|
||||
found=
|
||||
- SUPPYTHONLIBS="python2.7 python2.6 python3.1 python3.2 python3.3 python3.4 python3.4m python3.5 python3.5m python3.6 python3.6m python3.7 python3.7m python3.8 python3.9 python3.10 python3.11 python3.12"
|
||||
+ SUPPYTHONLIBS=""
|
||||
+ for i in /usr/bin/python[23]*; do
|
||||
+ SUPPYTHONLIBS="$SUPPYTHONLIBS ${i##*/}"
|
||||
+ done
|
||||
for p in $PYTHONDIR; do
|
||||
for d in $SUPPYTHONLIBS; do
|
||||
for b in lib/x86_64-linux-gnu lib/i386-linux-gnu lib64 lib/64 lib; do
|
@ -1,7 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Feb 19 10:11:07 UTC 2025 - Jan Engelhardt <jengelh@inai.de>
|
||||
Wed Feb 12 10:00:50 UTC 2025 - Daniel Garcia <daniel.garcia@suse.com>
|
||||
|
||||
- Add newer-pythons.patch
|
||||
- Build python bindings for python311, do not use python3 since
|
||||
virtualbox doesn't support python3.13 yet.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Jan 21 11:17:17 UTC 2025 - Jiri Slaby <jslaby@suse.cz>
|
||||
|
@ -53,6 +53,11 @@
|
||||
%define _vbox_instdir %{_prefix}/lib/virtualbox
|
||||
%define _udevrulesdir %{_prefix}/lib/udev/rules.d
|
||||
%endif
|
||||
|
||||
%global mypython python311
|
||||
%global __mypython %{expand:%%__%{mypython}}
|
||||
%global mypython_sitelib %{expand:%%%{mypython}_sitelib}
|
||||
|
||||
# ********* If the VB version exceeds 6.1.x, notify the libvirt maintainer!!
|
||||
Name: virtualbox%{?dash}%{?name_suffix}
|
||||
Version: 7.1.4
|
||||
@ -118,7 +123,6 @@ Patch10: fix_for_leap15.5.patch
|
||||
Patch11: cxx17.patch
|
||||
Patch12: host-source.patch
|
||||
Patch13: kernel-6-13.patch
|
||||
Patch14: newer-pythons.patch
|
||||
#
|
||||
# Common BuildRequires for both virtualbox and virtualbox-kmp
|
||||
BuildRequires: %{kernel_module_package_buildreqs}
|
||||
@ -175,7 +179,9 @@ BuildRequires: lzfse
|
||||
BuildRequires: lzfse-devel
|
||||
BuildRequires: pulseaudio-devel
|
||||
BuildRequires: python-rpm-macros
|
||||
BuildRequires: python3-devel
|
||||
BuildRequires: %{mypython}-devel
|
||||
BuildRequires: %{mypython}-setuptools
|
||||
BuildRequires: %{mypython}-pip
|
||||
BuildRequires: qt6-tools-linguist
|
||||
BuildRequires: rpm
|
||||
BuildRequires: sed
|
||||
@ -328,28 +334,28 @@ Requires(pre): net-tools-deprecated
|
||||
%description guest-tools
|
||||
VirtualBox guest addition tools.
|
||||
|
||||
%package -n python3-%{name}
|
||||
%package -n %{mypython}-%{name}
|
||||
Summary: Python bindings for %{name}
|
||||
Group: Development/Libraries/Python
|
||||
Requires: %{name} = %{version}
|
||||
#rename from "ose" version:
|
||||
Provides: python3-%{name} = %{version}-%{release}
|
||||
Provides: %{mypython}-%{name} = %{version}-%{release}
|
||||
Obsoletes: python-%{name} < %{version}-%{release}
|
||||
Obsoletes: python2-%{name} < %{version}-%{release}
|
||||
Obsoletes: python3-%{name} < %{version}-%{release}
|
||||
Provides: python3-%{name}-ose = %{version}
|
||||
Provides: %{mypython}-%{name}-ose = %{version}
|
||||
Obsoletes: python-%{name}-ose < %{version}
|
||||
Obsoletes: python2-%{name}-ose < %{version}
|
||||
Obsoletes: python3-%{name}-ose < %{version}
|
||||
|
||||
%description -n python3-%{name}
|
||||
%description -n %{mypython}-%{name}
|
||||
Python XPCOM bindings to %{name}. Used e.g. by vboxgtk package.
|
||||
|
||||
%package devel
|
||||
Summary: Devel files for %{name}
|
||||
Group: Development/Libraries/Other
|
||||
Requires: %{name} = %{version}
|
||||
Requires: python3-%{name} = %{version}
|
||||
Requires: %{mypython}-%{name} = %{version}
|
||||
#rename from "ose" version:
|
||||
Provides: %{name}-ose-devel = %{version}
|
||||
Obsoletes: %{name}-ose-devel < %{version}
|
||||
@ -648,7 +654,7 @@ EOF
|
||||
install -m 0755 -D src/VBox/Installer/linux/VBoxCreateUSBNode.sh %{buildroot}%{_vbox_instdir}/VBoxCreateUSBNode.sh
|
||||
echo "entering python-virtualbox install section"
|
||||
pushd out/linux.*/release/bin/sdk/installer/python
|
||||
VBOX_INSTALL_PATH=%{_vbox_instdir} python3 vboxapisetup.py install --prefix=%{_prefix} --root=%{buildroot}
|
||||
VBOX_INSTALL_PATH=%{_vbox_instdir} %{__mypython} vboxapisetup.py install --prefix=%{_prefix} --root=%{buildroot}
|
||||
popd
|
||||
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
|
||||
@ -911,14 +917,14 @@ export DISABLE_RESTART_ON_UPDATE=yes
|
||||
%dir /media
|
||||
%endif
|
||||
|
||||
%files -n python3-%{name}
|
||||
%files -n %{mypython}-%{name}
|
||||
%dir %{_vbox_instdir}/sdk
|
||||
%dir %{_vbox_instdir}/sdk/bindings
|
||||
%dir %{_vbox_instdir}/sdk/bindings/xpcom
|
||||
%{_vbox_instdir}/sdk/bindings/xpcom/python
|
||||
%{_vbox_instdir}/VBoxPython*.so
|
||||
%{python3_sitelib}/vboxapi-1.0-*.egg-info
|
||||
%{python3_sitelib}/vboxapi/
|
||||
%{mypython_sitelib}/vboxapi-*.egg-info
|
||||
%{mypython_sitelib}/vboxapi/
|
||||
|
||||
%files devel
|
||||
%dir %{_vbox_instdir}/sdk
|
||||
|
Loading…
x
Reference in New Issue
Block a user