139653566SPatrick WilliamsSUMMARY = "A coroutine-based Python networking library"
239653566SPatrick WilliamsDESCRIPTION = "gevent is a coroutine-based Python networking library that uses greenlet to provide \
339653566SPatrick Williamsa high-level synchronous API on top of the libevent event loop."
439653566SPatrick WilliamsHOMEPAGE = "http://www.gevent.org"
539653566SPatrick WilliamsLICENSE = "MIT & Python-2.0"
639653566SPatrick WilliamsLIC_FILES_CHKSUM = "file://LICENSE;md5=4de99aac27b470c29c6c309e0c279b65"
739653566SPatrick WilliamsDEPENDS += "python3-greenlet libev libuv c-ares python3-cython-native"
839653566SPatrick Williams
939653566SPatrick WilliamsRDEPENDS:${PN} = "python3-greenlet \
1039653566SPatrick Williams		  python3-mime \
1139653566SPatrick Williams		  python3-pprint \
1239653566SPatrick Williams		  python3-zopeevent \
1339653566SPatrick Williams		  python3-zopeinterface \
1439653566SPatrick Williams		 "
1539653566SPatrick Williams
16*edff4923SAndrew GeisslerSRC_URI += "file://0001-_setuputils.py-Do-not-add-sys_inc_dir.patch \
17*edff4923SAndrew Geissler	        file://not-final.patch"
1839653566SPatrick Williams
1939653566SPatrick WilliamsSRC_URI[sha256sum] = "432fc76f680acf7cf188c2ee0f5d3ab73b63c1f03114c7cd8a34cebbe5aa2056"
2039653566SPatrick Williams
2139653566SPatrick Williamsinherit pypi setuptools3
2239653566SPatrick Williams
2339653566SPatrick Williams# Don't embed libraries, link to the system provided libs instead
2439653566SPatrick Williamsexport GEVENTSETUP_EMBED_CARES = "0"
2539653566SPatrick Williamsexport GEVENTSETUP_EMBED_LIBEV = "0"
2639653566SPatrick Williamsexport GEVENTSETUP_EMBED_LIBUV = "0"
2739653566SPatrick Williams
2839653566SPatrick Williamsdo_configure:append() {
2939653566SPatrick Williams	# Delete the embedded copies of libraries so we can't accidentally link to them
3039653566SPatrick Williams	rm -rf ${S}/deps
3139653566SPatrick Williams
3239653566SPatrick Williams	# Delete the generated cython files, as they are all out of date with python 3.11
3339653566SPatrick Williams	rm -rf ${S}/src/gevent/*.c
3439653566SPatrick Williams}
3539653566SPatrick Williams
3639653566SPatrick Williamsdo_compile:append() {
3739653566SPatrick Williams        sed -i -e 's#${WORKDIR}##g' ${S}/src/gevent/*.c ${S}/src/gevent/libev/*.c ${S}/src/gevent/resolver/*.c
3839653566SPatrick Williams}
39