package/python: add option to build on the host
authorNicolas Carrier <nicolas.carrier@orolia.com>
Fri, 20 Sep 2019 14:59:39 +0000 (14:59 +0000)
committerArnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Sun, 27 Oct 2019 21:14:41 +0000 (22:14 +0100)
Some python scripts may be ran in the custom scripts a user can define
in the config. Allow the user to enable host-python explicitly.

If any of those require ssl, they will fail with no possible fix.
Add an option to enable openssl as well. This is made optional because
openssl significantly increases the build time.

Signed-off-by: Nicolas Carrier <nicolas.carrier@orolia.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
package/Config.in.host
package/python/Config.in.host [new file with mode: 0644]
package/python/python.mk

index 3253f9f3619be67d27776fff04fefde281819bdc..914491e210ee330c2f5dacf32bf0a3a05faf12ac 100644 (file)
@@ -52,6 +52,7 @@ menu "Host utilities"
        source "package/pkgconf/Config.in.host"
        source "package/pru-software-support/Config.in.host"
        source "package/pwgen/Config.in.host"
+       source "package/python/Config.in.host"
        source "package/python-cython/Config.in.host"
        source "package/python-lxml/Config.in.host"
        source "package/python-six/Config.in.host"
diff --git a/package/python/Config.in.host b/package/python/Config.in.host
new file mode 100644 (file)
index 0000000..724e5e2
--- /dev/null
@@ -0,0 +1,16 @@
+config BR2_PACKAGE_HOST_PYTHON
+       bool "host python"
+       help
+         The python language interpreter. Host package.
+
+         http://www.python.org/
+
+if BR2_PACKAGE_HOST_PYTHON
+
+config BR2_PACKAGE_HOST_PYTHON_SSL
+       bool "ssl"
+       select BR2_PACKAGE_HOST_OPENSSL
+       help
+         _ssl module for host Python.
+
+endif
index 4b82cdcce347b28ee03f2413629a0931f8bf6874..8c2b195c914059cd05dd7770935d89968a7db6f9 100644 (file)
@@ -32,7 +32,6 @@ HOST_PYTHON_CONF_OPTS += \
        --disable-bsddb \
        --disable-test-modules \
        --disable-bz2 \
-       --disable-ssl \
        --disable-ossaudiodev \
        --disable-pyo-build
 
@@ -58,6 +57,12 @@ PYTHON_DEPENDENCIES = host-python libffi $(TARGET_NLS_DEPENDENCIES)
 
 HOST_PYTHON_DEPENDENCIES = host-expat host-zlib
 
+ifeq ($(BR2_PACKAGE_HOST_PYTHON_SSL),y)
+HOST_PYTHON_DEPENDENCIES += host-openssl
+else
+HOST_PYTHON_CONF_OPTS += --disable-ssl
+endif
+
 PYTHON_INSTALL_STAGING = YES
 
 ifeq ($(BR2_PACKAGE_PYTHON_READLINE),y)