astral-sh / astral-sh/python-build-standalone

Any reason why libffi is not included in the builds?

Open
#750 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
4.4k
Forks
314
Avg merge
1d 9h
Merged PRs (30d)
27

Description

**When:** I was looking forward to use these standalone builds to implement a plugin system battery-included for a Golang event loop.

**What:** I faced the problem when using ctypes needed to make a bridge between the two. In particular I've seen that in the current builds (at least on linux x86_64) inside the lib folder libffi.so is missing, and therefore when calling ctypes it looks for _ctypes but it cannot find it.

**Workaround:** Currently I'm exposing libffi.so in another path of my project to ensure it's available, but I think it should be included to make these python builds really standalone.

**Why:** Is there any particular reason why the libffi is not included? From the source I've seen it and I guess it's being used in the making of the builds, but I've not seen it in detail.

I may even work on the problem myself with some minor guidance to where to start to look.

**Environment**
Python 3.13.11 (python-build-standalone x86_64 install only, release 20250808)
Build environment: debian:12
uv 0.8.9

*Edit: added information on my environment*
*Edit 2: added release date of the build*

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.