Has anyone gotten pants to work on Alpine Linux ye...
# general
f
Has anyone gotten pants to work on Alpine Linux yet? If not, is it possible?
h
That's a good question. You'd have to build Pants on Alpine, including its native code (which requires the rust toolchain), as we don't publish wheels for it (Alpine is not manylinux-compatible). And pip would have to be able to build all Pants's transitive deps at install time.
It can probably be made to work
but from what I've read, it's generally not recommended to run Python on Alpine, as there are all sorts of corner cases where the interpreter itself behaves weirdly.
👍 1
Is this for CI?
q
+1 to not running Python on Alpine, usually build times will be very long as all requirements w/ native dependencies will need to be built from scratch.
f
yes. for ci. docker package.
error: cannot produce cdylib for
engine v0.0.1 (/pants/src/rust/engine)
as the target
x86_64-unknown-linux-musl
does not support these crate types
this is where is bombs out on the alpine build.
Thanks. I will abandon alpine for build/ci and get the ci running on a debian based dind somehow.
r
The latest pip, setuptools, auditwheel toolchain now supports detection of musl-compatible wheels. https://peps.python.org/pep-0656/ https://github.com/pypa/auditwheel/issues/305 An example of the release-process update in gevent: https://github.com/gevent/gevent/pull/1846/files The pitfall in Alpine Linux is that it is not practical to build & use "statically built" Python because the static version of musl libc does not support dynamic loading at all, blocking import of all C extension modules in Python. Otherwise, if we use dynamic versions, it should be fine with wheels distributed with musllinux platform tags or source builds of them.
Still, there are not many packages that support musllinux distribution, so it takes much longer time to bootstrap a virtualenv.
I've not tried pants in Alpine yet, but I believe that technically it should be possible though we should go through a long trial-and-error process with external dependencies...
f
thanks. I will check it out.