What is manylinux?

Why Python packaging can be hard

There may be a time in your development career where you need to author a package that extends Python w/ C or C++. In such a case your Python package needs to go through a compilation process, which converts …


This content originally appeared on DEV Community and was authored by DH Kim

Why Python packaging can be hard

There may be a time in your development career where you need to author a package that extends Python w/ C or C++. In such a case your Python package needs to go through a compilation process, which converts C or C++ to binaries that work for a specific target system. This becomes really tedious when you think about how many flavors and versions of Linux there are. Building a separate binary for Red Hat, SUSE, Ubuntu, etc... Ugh so tiring.

Why Python packaging can be easy w/ manylinux

Fortunately, there is a solution. manylinux was birthed to make it easy for your Python packages to be compatible with most Linux variants. manylinux takes advantage of the fact that most distributions are mindful of backwards compatibility, and intentionally builds bdist wheels on an old version of a distribution. The idea is that if we build on an old supported version, the binaries produced are compatible with current versions.

So what is a manylinux really? Is it a ham sandwich?

No. Even better. It's a Docker image. manylinux is a Docker image built off a certain old versions of the CentOS operating system that comes bundled with libraries that are assumed to be present by default on almost all Linux systems.

You can find an example of manylinux distributions within the pandas project. Here are two (out of many) from the list of available pandas downloads from PyPI:

pandas-1.0.3-cp37-cp37m-manylinux1_x86_64.whl
pandas-1.0.3-cp37-cp37m-manylinux1_i686.whl

In this case, pandas has built manylinux wheels for CPython 3.7 supporting both x86-64 and i686 architectures. It's manylinux so this wheel should be compatible for many linux :)

Happy packaging!


This content originally appeared on DEV Community and was authored by DH Kim


Print Share Comment Cite Upload Translate Updates
APA

DH Kim | Sciencx (2021-11-11T21:09:40+00:00) What is manylinux?. Retrieved from https://www.scien.cx/2021/11/11/what-is-manylinux/

MLA
" » What is manylinux?." DH Kim | Sciencx - Thursday November 11, 2021, https://www.scien.cx/2021/11/11/what-is-manylinux/
HARVARD
DH Kim | Sciencx Thursday November 11, 2021 » What is manylinux?., viewed ,<https://www.scien.cx/2021/11/11/what-is-manylinux/>
VANCOUVER
DH Kim | Sciencx - » What is manylinux?. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2021/11/11/what-is-manylinux/
CHICAGO
" » What is manylinux?." DH Kim | Sciencx - Accessed . https://www.scien.cx/2021/11/11/what-is-manylinux/
IEEE
" » What is manylinux?." DH Kim | Sciencx [Online]. Available: https://www.scien.cx/2021/11/11/what-is-manylinux/. [Accessed: ]
rf:citation
» What is manylinux? | DH Kim | Sciencx | https://www.scien.cx/2021/11/11/what-is-manylinux/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.