Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integrate python mysqlclient wheel and provide default example using python310 #5068

Merged
merged 11 commits into from
Jan 22, 2022
Merged
14 changes: 13 additions & 1 deletion cross/libmysqlclient/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ PKG_DIST_NAME = $(DIST_NAME).$(PKG_EXT)
PKG_DIST_SITE = https://cdn.mysql.com/archives/$(PKG_REAL_NAME)
PKG_DIR = $(DIST_NAME)

DEPENDS = native/libmysqlclient
DEPENDS = native/libmysqlclient cross/openssl cross/zlib
th0ma7 marked this conversation as resolved.
Show resolved Hide resolved

HOMEPAGE = https://downloads.mysql.com/archives/c-c
COMMENT = MySQL C API (libmysqlclient)
Expand All @@ -29,6 +29,18 @@ CMAKE_ARGS += -DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci
# Fix full lib version:
CMAKE_ARGS += -DSHARED_LIB_PATCH_VERSION=0

# WITH_SSL=[yes|bundled|system|<path/to/custom/installation>]
# Not compatible with OpenSSL 1.1
# Requires updating to mysql-connector-c++ version 8.x
#DEPENDS += cross/openssl
#CMAKE_ARGS += -DWITH_SSL=system
DEPENDS += cross/zlib
CMAKE_ARGS += -DWITH_ZLIB=system
DEPENDS += cross/libevent
CMAKE_ARGS += -DWITH_LIBEVENT=system
DEPENDS += cross/lz4
CMAKE_ARGS += -DWITH_LZ4=system

# Use gcc builtin atomic functions for ppc architectures
ifneq ($(findstring $(ARCH),$(PPC_ARCHS)),)
CMAKE_ARGS += -DHAVE_GCC_ATOMIC_BUILTINS=1
Expand Down
5 changes: 5 additions & 0 deletions spk/python310/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,11 @@ DEPENDS += cross/pip
# ENV += GEVENTSETUP_EMBED_CARES=FALSE
# ENV += GEVENTSETUP_EMBED_LIBEV=FALSE

# [mysqlclient]
DEPENDS += cross/libmysqlclient
ENV += MYSQLCLIENT_CFLAGS="$(CFLAGS) -I$(STAGING_INSTALL_PREFIX)/$(PYTHON_INC_DIR)"
ENV += MYSQLCLIENT_LDFLAGS="$(LDFLAGS)"

include ../../mk/spksrc.common.mk

# [numpy] gcc-4.6.4 failed with exit status 1
Expand Down
3 changes: 3 additions & 0 deletions spk/python310/src/requirements-crossenv.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@
# SQLAlchemy==1.4.29
# zope.interface==5.4.0

# Require: MYSQLCLIENT_CFLAGS and MYSQLCLIENT_LDFLAGS env variables
mysqlclient==2.1.0

# Require: WHEELS_BUILD_ARGS = [Pillow] build_ext --disable-platform-guessing
# Pillow==8.4.0

Expand Down