3 ms·
For those like me who have no idea what "wheels" is in this context, I think it is referring to https://github.com/pypa/wheel https://github.com/pypa/wheel Thi
by hackernudes 7y ago
For those like me who have no idea what "wheels" is in this context, I think it is referring to https://github.com/pypa/wheel https://github.com/pypa/wheel
This looks like some sort of binary Python packaging thingy. I think @dkarp is saying that there exists pre-existing binary builds for glibc for many things, but not for musl libc so they are forced to be built explicitly when using pip to manage Python dependencies.
I could not figure out where this repository of binary packages is or who maintains it. Any corrections would be appreciated.
- korijn 7y agoPre-built binary distributions ("wheels") and source distributions (which sometimes need a compilation step) just live side by side on pypi.org, the public python package index.
- mumblemumble 7y agoYou've got it. Wheels in Python are like gems in ruby. (Or eggs in [python minus a few years].) The official Python package index has binary images, but they're compiled against glibc, and therefore don't work with Alpine. So when you `pip install` a package with binary dependencies on Alpine, it needs to compile them. Which can lead to a bit of a trip down a rabbit hole. As others have mentioned, Alpine's repository does include Alpine-compatible binary versions of many popular Python packages. So you can often save yourself a lot of trouble by using apk instead of pip to get those.
- oefrha 7y ago> The official Python package index has binary images, but they're compiled against glibc, and therefore don't work with Alpine. That’s a false statement (depending on interpretation). Whether a PyPI package has wheels is entirely at the discretion of the package maintainer, who is responsible for compiling all source and binary distributions; PyPI does not compile anything and only accepts uploads, verbatim. If the maintainer doesn’t upload wheels or doesn’t upload wheels for your platform, then no wheels for you (not from PyPI). In general compiling statically linked wheels (when you have C extensions and external dependencies) is a fairly involved process. At the moment there are six platform tags for Linux wheels supported by PyPI: manylinux{1,2010,2014}_{x86_64,i686}. Each is based on a CentOS release with very old glibc. See https://github.com/pypa/manylinux https://github.com/pypa/manylinux PEP 513 - maynylinux1 https://www.python.org/dev/peps/pep-0513/ https://www.python.org/dev/peps/pep-0513/ PEP 571 - manylinux2010 https://www.python.org/dev/peps/pep-0571/ https://www.python.org/dev/peps/pep-0571/ PEP 599 - manylinux2014 https://www.python.org/dev/peps/pep-0599/ https://www.python.org/dev/peps/pep-0599/
- lubomir 7y agoThe wheels are in regular PyPI. They are uploaded by package maintainers. See for example here: https://pypi.org/project/pandas/#files https://pypi.org/project/pandas/#files