Repository navigation
Conversation
Upstream (douban/greenify) is actively maintained, not abandoned: latest tag v0.5.0 (Dec 2025), tested across cp39-cp314 in its own CI, no CPython-internal struct access anywhere in its C sources. greenify's only architecture-specific code is elf_hook.c's choice of Elf32 vs Elf64 struct types, keyed off __x86_64 alone, so every other 64-bit target (including riscv64) silently misreads 64-bit ELF headers as 32-bit. Patch 0001 fixes that by also matching __LP64__. Patch 0002 trims the test suite's public-site HTTP checks, which need outbound internet access this runner isn't provisioned for; the local-server case alone already exercises the patched code path. The wheel builds exactly as upstream's own CI does it: a single cp39-abi3 wheel via `bdist_wheel --py-limited-api=cp39`, reused across cp312/cp313/cp314. No cp314t: upstream never builds or tests a free-threaded interpreter either.
luhenry
added a commit
that referenced
this pull request
Oct 13, 2026
--no-build-isolation means pip never fetches a build backend into an isolated env, so setuptools.build_meta must already be importable; this image's interpreters don't ship setuptools pre-installed.
luhenry
marked this pull request as draft
October 14, 2026 11:34
misc/test.sh does a relative `cd tests/http_head`, assuming the cwd is
already the project root. cibuildwheel runs CIBW_TEST_COMMAND from a
fresh temporary directory instead of {project}, so the test step failed
with "cd: tests/http_head: No such file or directory" before even
starting the fake HTTP server. Moving the cd into CIBW_TEST_COMMAND
itself (same pattern already used by build-sqlglotc.yml/build-leidenalg.yml/
build-symusic.yml/etc.) fixes it without touching the upstream script.
luhenry
added a commit
that referenced
this pull request
Oct 15, 2026
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
greenify0.5.0Compiles a small Cython/C extension that ELF-hooks a target
.so's PLT/GOT entries to make its blocking syscalls gevent-cooperative. Upstream publishes no riscv64 wheel.Mirrors upstream's
publish.yml: onecp39-abi3wheel viabdist_wheel --py-limited-api=cp39.Differs from upstream
elf_hook.c's 64-bit detection - it only matched__x86_64, so riscv64 (and every other non-x86_64 64-bit arch) read 64-bit ELF headers as 32-bit.CIBW_BEFORE_BUILDalso installssetuptools, not just Cython - the first CI run failed withBackendUnavailable: Cannot import 'setuptools.build_meta', because--no-build-isolationmeans pip never fetches a build backend into an isolated env, and this image's interpreters don't ship setuptools pre-installed.Matrix: cp312/cp313/cp314 only, no cp314t - upstream never builds or tests a free-threaded interpreter either.
Testing
misc/test.sh(minus the public-site HEAD checks above): patches a real blocking C extension and asserts gevent cooperative concurrency.License: OK, BSD-3-Clause.
Patches
0001-elf_hook-detect-64-bit-ELF-by-__LP64__-not-just-__x8.patch- To upstream [not yet submitted]. Without it,greenify.patch_lib()silently fails on riscv64 (and would on aarch64 too - upstream ships no wheel for any arch but x86_64).0002-tests-http_head-drop-the-public-site-HEAD-checks.patch- Inappropriate [no general internet egress on this runner]. Test-infra only; reproduces off riscv64 too.Built and tested locally on x86_64 (cp311/cp312) with both patches applied; riscv64 build left to CI per the disk-space note.