Răsfoiți Sursa

package/python3: add option to build on the host

Some python scripts may be ran in the custom scripts a user can define
in the config. Allow the user to enable host-python3 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>
Nicolas Carrier 5 ani în urmă
părinte
comite
f1407c4967
3 a modificat fișierele cu 24 adăugiri și 2 ștergeri
  1. 1 0
      package/Config.in.host
  2. 16 0
      package/python3/Config.in.host
  3. 7 2
      package/python3/python3.mk

+ 1 - 0
package/Config.in.host

@@ -56,6 +56,7 @@ menu "Host utilities"
 	source "package/python-lxml/Config.in.host"
 	source "package/python-lxml/Config.in.host"
 	source "package/python-six/Config.in.host"
 	source "package/python-six/Config.in.host"
 	source "package/python-xlrd/Config.in.host"
 	source "package/python-xlrd/Config.in.host"
+	source "package/python3/Config.in.host"
 	source "package/qemu/Config.in.host"
 	source "package/qemu/Config.in.host"
 	source "package/raspberrypi-usbboot/Config.in.host"
 	source "package/raspberrypi-usbboot/Config.in.host"
 	source "package/rauc/Config.in.host"
 	source "package/rauc/Config.in.host"

+ 16 - 0
package/python3/Config.in.host

@@ -0,0 +1,16 @@
+config BR2_PACKAGE_HOST_PYTHON3
+	bool "host python3"
+	help
+	  The python language interpreter. Host package.
+
+	  http://www.python.org/
+
+if BR2_PACKAGE_HOST_PYTHON3
+
+config BR2_PACKAGE_HOST_PYTHON3_SSL
+	bool "ssl"
+	select BR2_PACKAGE_HOST_OPENSSL
+	help
+	  _ssl module for host Python3.
+
+endif

+ 7 - 2
package/python3/python3.mk

@@ -26,8 +26,7 @@ HOST_PYTHON3_CONF_OPTS += \
 	--enable-unicodedata \
 	--enable-unicodedata \
 	--disable-test-modules \
 	--disable-test-modules \
 	--disable-idle3 \
 	--disable-idle3 \
-	--disable-ossaudiodev \
-	--disable-openssl
+	--disable-ossaudiodev
 
 
 # Make sure that LD_LIBRARY_PATH overrides -rpath.
 # Make sure that LD_LIBRARY_PATH overrides -rpath.
 # This is needed because libpython may be installed at the same time that
 # This is needed because libpython may be installed at the same time that
@@ -42,6 +41,12 @@ PYTHON3_DEPENDENCIES = host-python3 libffi
 
 
 HOST_PYTHON3_DEPENDENCIES = host-expat host-zlib host-libffi
 HOST_PYTHON3_DEPENDENCIES = host-expat host-zlib host-libffi
 
 
+ifeq ($(BR2_PACKAGE_HOST_PYTHON3_SSL),y)
+HOST_PYTHON3_DEPENDENCIES += host-openssl
+else
+HOST_PYTHON3_CONF_OPTS += --disable-openssl
+endif
+
 PYTHON3_INSTALL_STAGING = YES
 PYTHON3_INSTALL_STAGING = YES
 
 
 ifeq ($(BR2_PACKAGE_PYTHON3_READLINE),y)
 ifeq ($(BR2_PACKAGE_PYTHON3_READLINE),y)