aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorchamptar <champetier.etienne@gmail.com>2017-12-10 16:45:40 -0800
committerGitHub <noreply@github.com>2017-12-10 16:45:40 -0800
commit56d5ede68a85b6cca92b1dd7fdbb00fa1dbc7d00 (patch)
treeca1a72886bf2b6d393fffbe14904ef8751e406f9
parent6789b0ffb8636ebe1034374fc6cc9bb1533680f7 (diff)
parent59f0506622e7df5e6c4fe10f279a3f70e2366d37 (diff)
Merge pull request #5197 from commodo/python-bluez-deps
python,python3: define config option for bluetooth support
-rw-r--r--lang/python/python-pip-conf/Makefile36
-rw-r--r--lang/python/python-pip-conf/files/pip.conf (renamed from lang/python/python/files/pip.conf)0
-rw-r--r--lang/python/python/Config-python-light.in7
-rw-r--r--lang/python/python/Makefile34
-rw-r--r--lang/python/python3/Config-python3-light.in7
-rw-r--r--lang/python/python3/Makefile18
6 files changed, 76 insertions, 26 deletions
diff --git a/lang/python/python-pip-conf/Makefile b/lang/python/python-pip-conf/Makefile
new file mode 100644
index 000000000..b8ef7f6c5
--- /dev/null
+++ b/lang/python/python-pip-conf/Makefile
@@ -0,0 +1,36 @@
+#
+# Copyright (C) 2017 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=python-pip-conf
+PKG_VERSION:=0.1
+PKG_RELEASE:=1
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/python-pip-conf
+ SUBMENU:=Python
+ SECTION:=lang
+ CATEGORY:=Languages
+ TITLE:=Configuration file for pip/pip3
+ URL:=https://pip.pypa.io
+ MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>
+endef
+
+define Package/python-pip-conf/description
+ Configuration file for pip/pip3
+endef
+
+Build/Compile:=
+
+define Package/python-pip-conf/install
+ $(INSTALL_DIR) $(1)/etc
+ $(CP) ./files/pip.conf $(1)/etc
+endef
+
+$(eval $(call BuildPackage,python-pip-conf))
diff --git a/lang/python/python/files/pip.conf b/lang/python/python-pip-conf/files/pip.conf
index 89339e98a..89339e98a 100644
--- a/lang/python/python/files/pip.conf
+++ b/lang/python/python-pip-conf/files/pip.conf
diff --git a/lang/python/python/Config-python-light.in b/lang/python/python/Config-python-light.in
new file mode 100644
index 000000000..c6c204168
--- /dev/null
+++ b/lang/python/python/Config-python-light.in
@@ -0,0 +1,7 @@
+menu "Configuration"
+
+config PYTHON_BLUETOOTH_SUPPORT
+ bool "Enable Bluetooth support"
+ default n
+
+endmenu
diff --git a/lang/python/python/Makefile b/lang/python/python/Makefile
index 13a16a37f..0e0ffc25c 100644
--- a/lang/python/python/Makefile
+++ b/lang/python/python/Makefile
@@ -14,7 +14,7 @@ PKG_NAME:=python
PKG_VERSION:=$(PYTHON_VERSION).$(PYTHON_VERSION_MICRO)
# XXX: reset PKG_RELEASE to 1 only if Python's pip & setuptools versions have also bumped;
# otherwise, keep bumping PKG_RELEASE
-PKG_RELEASE:=4
+PKG_RELEASE:=5
PKG_SOURCE:=Python-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=https://www.python.org/ftp/python/$(PKG_VERSION)
@@ -39,9 +39,9 @@ HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/Python-$(PKG_VERSION)
PKG_CONFIG_DEPENDS:= \
CONFIG_PACKAGE_python-setuptools CONFIG_PACKAGE_python-pip \
- CONFIG_PACKAGE_bluez-libs
+ CONFIG_PYTHON_BLUETOOTH_SUPPORT
-PKG_BUILD_DEPENDS:=python/host PACKAGE_bluez-libs:bluez-libs
+PKG_BUILD_DEPENDS:=python/host
HOST_BUILD_DEPENDS:=bzip2/host expat/host
include $(INCLUDE_DIR)/host-build.mk
@@ -65,16 +65,6 @@ define Package/python/Default/description
the development of higher quality, more maintainable code.
endef
-define Package/python-pip-conf
-$(call Package/python/Default)
- TITLE:=Configuration file for pip/pip3
- URL:=https://pip.pypa.io
-endef
-
-define Package/python-pip-conf/description
- Configuration file for pip/pip3
-endef
-
define Package/python-base
$(call Package/python/Default)
TITLE:=Python $(PYTHON_VERSION) interpreter
@@ -89,7 +79,11 @@ endef
define Package/python-light
$(call Package/python/Default)
TITLE:=Python $(PYTHON_VERSION) light installation
- DEPENDS:=+python-base +libffi +libbz2 +PACKAGE_bluez-libs:bluez-libs
+ DEPENDS:=+python-base +libffi +libbz2 +PYTHON_BLUETOOTH_SUPPORT:bluez-libs
+endef
+
+define Package/python-light/config
+ source "$(SOURCE)/Config-python-light.in"
endef
define Package/python-light/description
@@ -150,6 +144,10 @@ PYTHON_FOR_BUILD:= \
_PYTHON_SYSCONFIGDATA_NAME=_sysconfigdata \
$(HOST_PYTHON_BIN)
+DISABLE_BLUETOOTH:= \
+ ac_cv_header_bluetooth_bluetooth_h=no \
+ ac_cv_header_bluetooth_h=no
+
CONFIGURE_ARGS+= \
--sysconfdir=/etc \
--enable-shared \
@@ -158,6 +156,7 @@ CONFIGURE_ARGS+= \
--with-system-ffi \
--with-ensurepip=no \
--without-pymalloc \
+ $(if $(CONFIG_PYTHON_BLUETOOTH_SUPPORT),,$(DISABLE_BLUETOOTH)) \
PYTHON_FOR_BUILD="$(PYTHON_FOR_BUILD)" \
$(ENABLE_IPV6) \
CONFIG_SITE="$(PKG_BUILD_DIR)/config.site" \
@@ -281,11 +280,6 @@ define PyPackage/python/filespec
-|$(PYTHON_PKG_DIR)
endef
-define Package/python-pip-conf/install
- $(INSTALL_DIR) $(1)/etc
- $(CP) ./files/pip.conf $(1)/etc
-endef
-
HOST_LDFLAGS += \
-Wl,--no-as-needed -lrt \
$$$$(pkg-config --static --libs libcrypto libssl)
@@ -324,8 +318,6 @@ $(eval $(call PyPackage,python-base))
$(eval $(call PyPackage,python-light))
$(eval $(call PyPackage,python))
-$(eval $(call BuildPackage,python-pip-conf))
-
$(eval $(call BuildPackage,python-base))
$(eval $(call BuildPackage,python-light))
$(eval $(call BuildPackage,python))
diff --git a/lang/python/python3/Config-python3-light.in b/lang/python/python3/Config-python3-light.in
new file mode 100644
index 000000000..eb22262a7
--- /dev/null
+++ b/lang/python/python3/Config-python3-light.in
@@ -0,0 +1,7 @@
+menu "Configuration"
+
+config PYTHON3_BLUETOOTH_SUPPORT
+ bool "Enable Bluetooth support"
+ default n
+
+endmenu
diff --git a/lang/python/python3/Makefile b/lang/python/python3/Makefile
index 38e55ba54..924fec58f 100644
--- a/lang/python/python3/Makefile
+++ b/lang/python/python3/Makefile
@@ -16,7 +16,7 @@ PYTHON_VERSION_MICRO:=$(PYTHON3_VERSION_MICRO)
PKG_NAME:=python3
# XXX: reset PKG_RELEASE to 1 only if Python's pip & setuptools versions have also bumped;
# otherwise, keep bumping PKG_RELEASE
-PKG_RELEASE:=10
+PKG_RELEASE:=11
PKG_VERSION:=$(PYTHON_VERSION).$(PYTHON_VERSION_MICRO)
PKG_SOURCE:=Python-$(PKG_VERSION).tar.xz
@@ -42,10 +42,9 @@ HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/Python-$(PKG_VERSION)
PKG_CONFIG_DEPENDS:= \
CONFIG_PACKAGE_python3-setuptools CONFIG_PACKAGE_python3-pip \
- CONFIG_PACKAGE_bluez-libs
+ CONFIG_PYTHON3_BLUETOOTH_SUPPORT
-
-PKG_BUILD_DEPENDS:=python3/host PACKAGE_bluez-libs:bluez-libs
+PKG_BUILD_DEPENDS:=python3/host
HOST_BUILD_DEPENDS:=bzip2/host expat/host libffi/host
include $(INCLUDE_DIR)/host-build.mk
@@ -83,7 +82,11 @@ endef
define Package/python3-light
$(call Package/python3/Default)
TITLE:=Python $(PYTHON_VERSION) light installation
- DEPENDS:=+python3-base +libffi +libbz2 +PACKAGE_bluez-libs:bluez-libs
+ DEPENDS:=+python3-base +libffi +libbz2 +PYTHON3_BLUETOOTH_SUPPORT:bluez-libs
+endef
+
+define Package/python3-light/config
+ source "$(SOURCE)/Config-python3-light.in"
endef
define Package/python3-light/description
@@ -145,6 +148,10 @@ PYTHON_FOR_BUILD:= \
_PYTHON_SYSCONFIGDATA_NAME=_sysconfigdata \
$(HOST_PYTHON3_BIN)
+DISABLE_BLUETOOTH:= \
+ ac_cv_header_bluetooth_bluetooth_h=no \
+ ac_cv_header_bluetooth_h=no
+
CONFIGURE_ARGS+= \
--sysconfdir=/etc \
--enable-shared \
@@ -153,6 +160,7 @@ CONFIGURE_ARGS+= \
--with-system-ffi \
--with-ensurepip=no \
--without-pymalloc \
+ $(if $(CONFIG_PYTHON3_BLUETOOTH_SUPPORT),,$(DISABLE_BLUETOOTH)) \
PYTHON_FOR_BUILD="$(PYTHON_FOR_BUILD)" \
$(ENABLE_IPV6) \
CONFIG_SITE="$(PKG_BUILD_DIR)/config.site" \