[vbox-dev] [PATCH] support for newer python
Frank Batschulat
frank.batschulat at oracle.com
Wed Dec 4 19:28:19 GMT 2019
Thanks Larry, Klaus applied the change for:
src/libs/xpcom18a4/python/Makefile.kmk
with revision 135230 to trunk, also backported to 6.X and 5.2.
The change to:
src/libs/xpcom18a4/python/gen_python_deps.py
was already in trunk, 6.X and 5.2.
On Wed, 04 Dec 2019 17:52:22 +0100, Larry Finger
<Larry.Finger at lwfinger.net> wrote:
> On 10/21/19 1:56 PM, Sérgio Basto wrote:
>> On Thu, 2019-10-17 at 13:30 +0200, Frank Batschulat wrote:
>>> Gianfranco, I have a couple of pylint related changes pending
>>> so I'll pick this one up and add it to the pylint changes.
>> With Fedora rawhide which have Python 3.8-rc1, VBoxPython3*.so is not
>> build , how I can debug this problem and find what VBox is missing ?
>> Thanks.
>>
>>> On 17.10.19 12:52, Gianfranco Costamagna wrote:
>>>> Hello, this patch was scheduled for merging some time ago, but
>>>> never hit newer releases...Can you please give another try?
>>>> MIT licensed, as usual
>>>> Description: add python 3.7m as a supported version
>>>> Author: Michael Hudson-Doyle <michael.hudson at ubuntu.com>
>>>> Origin: vendor
>>>> Last-Update: 2018-07-12
>>>> ---
>>>> This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
>>>> --- a/configure
>>>> +++ b/configure
>>>> @@ -1982,7 +1982,7 @@
>>>> }
>>>> 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"
>>>> + 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.8m"
>>>> 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
>
> I also had the problem of a failure to build VBoxPython3*.so with Python
> 3.8. With the following MIT-licensed patches, the build worked:
>
> Index: VirtualBox-6.0.14/src/libs/xpcom18a4/python/Makefile.kmk
> ===================================================================
> --- VirtualBox-6.0.14.orig/src/libs/xpcom18a4/python/Makefile.kmk
> +++ VirtualBox-6.0.14/src/libs/xpcom18a4/python/Makefile.kmk
> @@ -26,7 +26,7 @@ endif
>
> #
> # List of supported Python versions, defining a number of
> -#
> VBOX_PYTHON[26|27|31|32|32M|33|33M|34|34M|35|35M|36|36M|37|37M|DEF]_[INC|LIB]
> variables
> +#
> VBOX_PYTHON[26|27|31|32|32M|33|33M|34|34M|35|35M|36|36M|37|37M|38|38M|DEF]_[INC|LIB]
> variables
> # which get picked up below.
> #
> ifeq ($(KBUILD_TARGET),darwin) # Relatively predictable, don't script.
> @@ -486,6 +486,52 @@ VBoxPython3_7m_x86_LIBS = $(VBOX_P
> endif
> endif
> endif
> +
> +ifdef VBOX_PYTHON38_INC
> +#
> +# Python 3.8 version
> +#
> +DLLS += VBoxPython3_8
> +VBoxPython3_8_EXTENDS = VBoxPythonBase
> +VBoxPython3_8_EXTENDS_BY = appending
> +VBoxPython3_8_TEMPLATE = XPCOM
> +VBoxPython3_8_INCS = $(VBOX_PYTHON38_INC)
> +VBoxPython3_8_LIBS = $(VBOX_PYTHON38_LIB)
> +
> + ifdef VBOX_WITH_32_ON_64_MAIN_API
> + ifdef VBOX_PYTHON38_LIB_X86
> +DLLS += VBoxPython3_8_x86
> +VBoxPython3_8_x86_EXTENDS = VBoxPythonBase_x86
> +VBoxPython3_8_x86_EXTENDS_BY = appending
> +VBoxPython3_8_x86_TEMPLATE = XPCOM
> +VBoxPython3_8_x86_INCS = $(VBOX_PYTHON38_INC)
> +VBoxPython3_8_x86_LIBS = $(VBOX_PYTHON38_LIB_X86)
> + endif
> + endif
> +endif
> +
> +ifdef VBOX_PYTHON38M_INC
> +#
> +# Python 3.8 version with pymalloc
> +#
> +DLLS += VBoxPython3_8m
> +VBoxPython3_8m_EXTENDS = VBoxPythonBase_m
> +VBoxPython3_8m_EXTENDS_BY = appending
> +VBoxPython3_8m_TEMPLATE = XPCOM
> +VBoxPython3_8m_INCS = $(VBOX_PYTHON38M_INC)
> +VBoxPython3_8m_LIBS = $(VBOX_PYTHON38M_LIB)
> +
> + ifdef VBOX_WITH_32_ON_64_MAIN_API
> + ifdef VBOX_PYTHON38M_LIB_X86
> +DLLS += VBoxPython3_8m_x86
> +VBoxPython3_8m_x86_EXTENDS = VBoxPythonBase_x86_m
> +VBoxPython3_8m_x86_EXTENDS_BY = appending
> +VBoxPython3_8m_x86_TEMPLATE_ = XPCOM
> +VBoxPython3_8m_x86_INCS = $(VBOX_PYTHON38M_INC)
> +VBoxPython3_8m_x86_LIBS = $(VBOX_PYTHON38M_LIB_X86)
> + endif
> + endif
> +endif
>
> ifdef VBOX_PYTHONDEF_INC
> #
> Index: VirtualBox-6.0.14/src/libs/xpcom18a4/python/gen_python_deps.py
> ===================================================================
> --- VirtualBox-6.0.14.orig/src/libs/xpcom18a4/python/gen_python_deps.py
> +++ VirtualBox-6.0.14/src/libs/xpcom18a4/python/gen_python_deps.py
> @@ -16,7 +16,7 @@ from __future__ import print_function
> import os,sys
> from distutils.version import StrictVersion
>
> -versions = ["2.6", "2.7", "3.1", "3.2", "3.2m", "3.3", "3.3m", "3.4",
> "3.4m", "3.5", "3.5m", "3.6", "3.6m", "3.7", "3.7m"]
> +versions = ["2.6", "2.7", "3.1", "3.2", "3.2m", "3.3", "3.3m", "3.4",
> "3.4m", "3.5", "3.5m", "3.6", "3.6m", "3.7", "3.7m", "3.8", "3.8m"]
> prefixes = ["/usr", "/usr/local", "/opt", "/opt/local"]
> known = {}
>
>
> Larry
>
>
> _______________________________________________
> vbox-dev mailing list
> vbox-dev at virtualbox.org
> https://www.virtualbox.org/mailman/listinfo/vbox-dev
--
frankB
Oracle Virtualbox Development
More information about the vbox-dev
mailing list