PyO3 / maturin-action

GitHub Action to install and run a custom maturin command with built-in support for cross compilation
MIT License
123 stars 31 forks source link

Allow users to install packages in the maturin docker where maturin executes #276

Closed Dan-wanna-M closed 1 week ago

Dan-wanna-M commented 1 week ago

It is possible that building users' package requires more packages that the default environment(for example, using mimalloc requires gcc 4.9+ while build-essential only provides gcc4.8). but currently there do not exist an easy way to do so.

messense commented 1 week ago

There is a before-script-linux option, for example https://github.com/PyO3/maturin-action/discussions/273#discussioncomment-9828658 and https://github.com/astral-sh/uv/blob/ca92b55605fe37c354f42e1126185cae6e8d0d66/.github/workflows/build-binaries.yml#L227-L240

messense commented 1 week ago

for example, using mimalloc requires gcc 4.9+ while build-essential only provides gcc4.8

Note that if you upgrade GCC it may result in wheels that require higher manylinux version, in such case IMO specify a newer maturin-action manylinux version should be preferred.