Python 3 support

Discussions related to using the OSE version of VirtualBox.

Re: Python 3 support

Postby AndreasH » 20. Jul 2017, 09:45

Perryg wrote:While I can not speak of how to do this with "the debian way", I do know that the official way to build the package is to do so using the VirtualBox build process and not the hosts.

Example: running the following
Code: Select all   Expand viewCollapse view
/trunk/src/VBox/Installer/linux/debian/rules binary
                          ^^^^^

To clean if you need to rebuild:
Code: Select all   Expand viewCollapse view
/trunk/src/VBox/Installer/linux/debian/rules clean
                          ^^^^^


That works, as long as you have all dependencies installed. To the list you linked above, I added 'zip' which was needed to build the guest additions, IIRC.

klaus wrote:The toplevel debian directory shouldn't be removed, it should be turned into one which directly works again.


If this is not the official way to build it, I don't see the reason why. Why would you need two different ways to build the same package, with the potential of producing two different results or no result at all, as is the case right now? It may be possible to create a working top-level debian directory again, if you adapt the paths. But it will be different from the one under src/VBox/Installer/linux, and every change would have to be carefully kept in sync between the two.

Unneccessary work, if you ask me. I'd put the Instructions from PerryG plus the right apt-get line in a top-level README or INSTALL file, and that's it. It took me most of the time to find this out, because the broken top-level debian fooled me into thinking this was the 'official' way to build the package.
AndreasH
 
Posts: 8
Joined: 24. Aug 2009, 12:28
Primary OS: Ubuntu other
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Python 3 support

Postby Perryg » 20. Jul 2017, 16:24

Maybe I should clarify a few things. When I said official way what I meant is the original way as told by the DEVs a long time ago. IIRC the top level debian folder was added at the request of debian or one of its maintainers ( correct me if I am mistaken ). I do know for sure that running both in the top level and the installer folder produces the exact same results though and the main fault has to do with the qt versioning going on in some distros. I ran into this when I first upgraded to version 5 of qt and the real reason was the host having multiple copies of qt with various version ( IE: qt4 and qt5 ). This confused VBox to a point. It would find the proper qt when running config but fail during compile since it also saw qt4 and seem to stop without going on to find qt5. Since I don't usually build deb runs as I prefer a simple .run to install, I did/have not looked into it in depth to find the real cause. If I can find time later in the week or so I might try to see what needs to be done, but I usually let Frank do this as he is way more familiar with this part of the code then I am.
Perryg
Site Moderator
 
Posts: 34372
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Python 3 support

Postby klaus » 18. Sep 2017, 19:33

Trust me, there are good reasons for having two slightly different debian directories. It's too much effort to explain in detail, since for the normal debian based distro cases there should be absolutely no noticeable difference between the two - as we already concluded, anything else is a bug. For quite a few years the 2nd (deep down) debian folder wasn't even publicly visible and only used to create innotek/Sun/Oracle's official .deb packages.
klaus
Oracle Corporation
 
Posts: 577
Joined: 10. May 2007, 14:57

Re: Python 3 support

Postby klaus » 18. Sep 2017, 19:34

Back to the topic: did you try the 5.1.26 or 5.1.28 packages? They now should come with python3 support, at least I saw that the right shared libraries are now packaged, without ending up with excessive dependencies.
klaus
Oracle Corporation
 
Posts: 577
Joined: 10. May 2007, 14:57

Re: Python 3 support

Postby p0c » 2. Oct 2017, 10:45

klaus wrote:Back to the topic: did you try the 5.1.26 or 5.1.28 packages? They now should come with python3 support, at least I saw that the right shared libraries are now packaged, without ending up with excessive dependencies.


Hi Klaus, thanks for your help on this topic.

I've ran into this issue myself:

Code: Select all   Expand viewCollapse view
p0c@box ~: $ python -c 'import vboxapi; vm = vboxapi.VirtualBoxManager()'
m=VBoxPython3_6m x=No module named 'VBoxPython3_6m'
m=VBoxPython3m x=No module named 'VBoxPython3m'
m=VBoxPython x=No module named 'VBoxPython'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/lib/python3.6/site-packages/vboxapi/__init__.py", line 970, in __init__
    self.platform = PlatformXPCOM(dPlatformParams)
  File "/usr/lib/python3.6/site-packages/vboxapi/__init__.py", line 730, in __init__
    import xpcom.vboxxpcom
  File "/usr/lib/virtualbox-sdk/xpcom/vboxxpcom.py", line 78, in <module>
    raise Exception('Cannot find VBoxPython module (tried: %s)' % (', '.join(_asVBoxPythons),))
Exception: Cannot find VBoxPython module (tried: VBoxPython3_6m, VBoxPython3m, VBoxPython)


My default python version:

Code: Select all   Expand viewCollapse view
p0c@box ~ $ python -V
Python 3.6.2


I've used the latest package:

Code: Select all   Expand viewCollapse view
p0c@box ~ $ VirtualBox -h
Oracle VM VirtualBox Manager 5.1.28


I assume support for python3 should have been enabled with that release? Your patch is not valid anymore, as it seems that code for dual python2/3 support has been incorporated into the 5.1.28 branch now by default. Can you shed some light on this?
p0c
 
Posts: 2
Joined: 2. Oct 2017, 10:36

Re: Python 3 support

Postby klaus » 2. Oct 2017, 14:57

p0c, you didn't mention which Linux distribution you're using and which VirtualBox package you installed. This is vital information, as only the distro-specific .deb/.rpm packages are containing multiple VBoxPython libraries. You must install the right package variant, otherwise you might get the wrong set of libraries.
klaus
Oracle Corporation
 
Posts: 577
Joined: 10. May 2007, 14:57

Re: Python 3 support

Postby p0c » 5. Oct 2017, 13:34

I'm running Arch linux, 64-bit. The virtualbox package is 5.1.28, the latest available.
p0c
 
Posts: 2
Joined: 2. Oct 2017, 10:36

Re: Python 3 support

Postby klaus » 6. Oct 2017, 18:05

Since you're still avoiding to give clear answers regarding the package source I can only give guesswork responses. Arch linux users tend to use a custom VirtualBox package, and if that one doesn't contain python3 support I can't help. The Linux packages from virtualbox.org (except the .run one, being distro independent it can't anticipate which python versions it might encounter, with unpredictable build options) should contain python3 support matching the distro verson's packages.
klaus
Oracle Corporation
 
Posts: 577
Joined: 10. May 2007, 14:57

Previous

Return to VirtualBox OSE

Who is online

Users browsing this forum: No registered users and 1 guest