[vbox-dev] Conversion to Python 3
Klaus Espenlaub
klaus.espenlaub at oracle.com
Mon May 28 11:55:55 UTC 2018
Hi Larry,
On 27.05.2018 23:58, Larry Finger wrote:
> Plans are to convert all openSUSE Factory packages to use Python 3.6
> rather than 2.7. Accordingly, I have been making the appropriate
> modifications for the VirtualBox package. I now have converted all of
> the build part of the RPM setup, but I get the following failure in the
> install part:
>
> [ 1663s] + python -c 'import sys, os, compileall;
> br='\''/home/abuild/rpmbuild/BUILDROOT/virtualbox-5.2.12-0.x86_64'\'';
> compileall.compile_dir(sys.argv[1], ddir=br and
> (sys.argv[1][len(os.path.abspath(br)):]+'\''/'\'') or None)'
> /home/abuild/rpmbuild/BUILDROOT/virtualbox-5.2.12-0.x86_64/usr/lib/virtualbox/sdk/bindings/xpcom/python
>
> [ 1663s] /var/tmp/rpm-tmp.ZpYSxC: line 199: python: command not found
> [ 1663s] error: Bad exit status from /var/tmp/rpm-tmp.ZpYSxC (%install)
>
> That command should be "python3", not "python". Unfortunately, grepping
> for key parts of that command line fail. Can anyone point me to the
> section of the source where this command is generated?
That's in src/VBox/Installer/linux/rpm/VirtualBox.tmpl.spec if you
didn't create your own. It's deliberately not hardwired to a specific
Python version, it uses the one which the RPM build env specifies. I
would expect in an OS which has flipped the big Python switch to 3.x,
that __python points to python3.
In other installers we use a more dynamic approach, but for deb/rpm it
seems we never attempt to ship multiple vbox api bindings for different
versions, everything is built purely for the "default".
Hope this clarifies the situation,
Klaus
>
> Thanks,
>
> Larry
More information about the vbox-dev
mailing list