diff options
author | Alexandru Ardelean <ardeleanalex@gmail.com> | 2020-01-29 09:25:10 +0200 |
---|---|---|
committer | Alexandru Ardelean <ardeleanalex@gmail.com> | 2020-01-29 09:30:59 +0200 |
commit | 26f8888d6b26ecb192fb6c7d2e21141939014b6f (patch) | |
tree | ac1b197380901816d54d5b1cddd6ae94058f49e0 /lang/python/pymysql | |
parent | fd4aa4734e3d9bc9c70875e74940238ba9516a2c (diff) |
pymysql: make python3-cryptography optional
According to the installation guide [1], the support for "sha256_password"
or "caching_sha2_password" for authentication is optional.
This change makes it optional for the OpenWrt package by providing a build
option to enable it.
By default it won't be enabled, and packages can choose to enable it.
[1] https://pymysql.readthedocs.io/en/latest/user/installation.html
Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
Diffstat (limited to 'lang/python/pymysql')
-rw-r--r-- | lang/python/pymysql/Config.in | 11 | ||||
-rw-r--r-- | lang/python/pymysql/Makefile | 10 |
2 files changed, 19 insertions, 2 deletions
diff --git a/lang/python/pymysql/Config.in b/lang/python/pymysql/Config.in new file mode 100644 index 000000000..0dfa265b0 --- /dev/null +++ b/lang/python/pymysql/Config.in @@ -0,0 +1,11 @@ +menu "Configuration" + depends on PACKAGE_python3-pymysql + +config PYTHON3_PYMYSQL_SHA_PASSWORD_SUPPORT + bool "Enable support for SHA password authentication" + help + To use “sha256_password” or “caching_sha2_password” for authentication + this symbol needs to be enabled, to also install python3-cryptography. + default n + +endmenu diff --git a/lang/python/pymysql/Makefile b/lang/python/pymysql/Makefile index f017b7e66..87baddd1c 100644 --- a/lang/python/pymysql/Makefile +++ b/lang/python/pymysql/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=pymysql PKG_VERSION:=0.9.3 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PYPI_NAME:=PyMySQL PKG_HASH:=d8c059dcd81dedb85a9f034d5e22dcb4442c0b201908bede99e306d65ea7c8e7 @@ -18,6 +18,8 @@ PKG_MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com> PKG_LICENSE:=MIT PKG_LICENSE_FILES:=LICENSE +PKG_CONFIG_DEPENDS:=CONFIG_PYTHON3_PYMYSQL_SHA_PASSWORD_SUPPORT + include ../pypi.mk include $(INCLUDE_DIR)/package.mk include ../python3-package.mk @@ -28,10 +30,14 @@ define Package/python3-pymysql CATEGORY:=Languages TITLE:=Pure Python MySQL Client URL:=https://pymysql.readthedocs.io/ - DEPENDS:=+python3 +python3-cryptography + DEPENDS:=+python3 +PYTHON3_PYMYSQL_SHA_PASSWORD_SUPPORT:python3-cryptography VARIANT:=python3 endef +define Package/python3-pymysql/config + source "$(SOURCE)/Config.in" +endef + define Package/python3-pymysql/description This package contains a pure-Python MySQL client library, based on PEP 249. endef |