Skip to content

Support free-threaded CPython builds and upload cp313t wheels #1367

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

Open
ngoldbaum opened this issue Apr 22, 2025 · 0 comments
Open

Support free-threaded CPython builds and upload cp313t wheels #1367

ngoldbaum opened this issue Apr 22, 2025 · 0 comments

Comments

@ngoldbaum
Copy link

Unfortunately actually doing this might end up being blocked on upstream support in CFFI for free-threaded Python, see python-cffi/cffi#126 for more detail.

We are working on fixing CFFI in a fork: https://github.com/quansight-labs/cffi.

It looks like I can build pygit2 if I install setuptools and CFFI from the fork, and then build with --no-build-isolation:

(.venv) ± C_INCLUDE_PATH=/opt/homebrew/include python -m pip install . --no-build-isolation
Processing /Users/goldbaum/Documents/pygit2
  Preparing metadata (pyproject.toml) ... done
Requirement already satisfied: cffi>=1.17.0 in /Users/goldbaum/Documents/free-threaded-compatibility/.venv/lib/python3.13t/site-packages (from pygit2==1.17.0) (1.18.0.dev0)
Requirement already satisfied: pycparser in /Users/goldbaum/Documents/free-threaded-compatibility/.venv/lib/python3.13t/site-packages (from cffi>=1.17.0->pygit2==1.17.0) (2.22)
Building wheels for collected packages: pygit2
  Building wheel for pygit2 (pyproject.toml) ... done
  Created wheel for pygit2: filename=pygit2-1.17.0-cp313-cp313t-macosx_15_0_arm64.whl size=261670 sha256=f3aa4e995b7a8f81d13040440b0fec75696e7407a15d9035ba7852b7c32871c9
  Stored in directory: /private/var/folders/nk/yds4mlh97kg9qdq745g715rw0000gn/T/pip-ephem-wheel-cache-5aoxf597/wheels/30/43/a7/885db85606d7de4f35d4eb2ecc0a8b6c24e6615ed88f7f3eb1
Successfully built pygit2
Installing collected packages: pygit2
Successfully installed pygit2-1.17.0

Not totally sure why I needed to pass C_INCLUDE_PATH to find libgit2 from homebrew.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant