preparations for musllinux#6236
Conversation
|
First of all, thank you very much for contributing! I’ll review the infra PR shortly, but just one question here: what version of |
|
No clue tbh. In a very confirmation-bias-y way I want to believe this comment is saying that pip won't actually need to do anything to support them: pypa/pip#10088 (comment) |
|
Oh, or maybe it's v21.2.4, because that's where packaging got upgraded to a version that handles them: |
|
Great. The one other thing we'll want to do when landing this is updating the installation documentation to note that Alpine can use wheels as well (but requires pip >= 21.2.4). (Once this lands I will immediately run the wheel builder and upload the new musl wheels. We can put the doc work in a separate PR but I'd like to get that updated ASAP since it will be very helpful to users when v35.0 comes out and has a hard requirement on |
|
How about something like --- a/docs/faq.rst
+++ b/docs/faq.rst
@@ -78,9 +78,8 @@ OpenSSL. If you see this error it is likely because your copy of ``pip`` is too
old to find our wheel files. Upgrade your ``pip`` with ``pip install -U pip``
and then try to install ``cryptography`` again.
-Users on PyPy, unusual CPU architectures, or distributions of Linux using
-``musl`` (like Alpine) will need to compile ``cryptography`` themselves. Please
-view our :doc:`/installation` documentation.
+Users on PyPy and unusual CPU architectures will need to compile ``cryptography``
+themselves. Please view our :doc:`/installation` documentation.
``cryptography`` raised an ``InternalError`` and I'm not sure what to do?
-------------------------------------------------------------------------
diff --git a/docs/installation.rst b/docs/installation.rst
index a9f40bf9..27fa6fec 100644
--- a/docs/installation.rst
+++ b/docs/installation.rst
@@ -85,17 +85,16 @@ Building cryptography on Linux
``cryptography`` ships ``manylinux`` wheels (as of 2.0) so all dependencies
are included. For users on **pip 19.0** or above running on a ``manylinux2010``
-(or greater) compatible distribution (almost everything **except Alpine**) all
+(or greater) compatible distribution (or **pip 21.2.4** for ``musllinux``) all
you should need to do is:
.. code-block:: console
$ pip install cryptography
-If you are on Alpine or just want to compile it yourself then
-``cryptography`` requires a C compiler, a Rust compiler, headers for Python (if
-you're not using ``pypy``), and headers for the OpenSSL and ``libffi`` libraries
-available on your system.
+If you want to compile ``cryptography`` yourself you'll need a C compiler, a
+Rust compiler, headers for Python (if you're not using ``pypy``), and headers
+for the OpenSSL and ``libffi`` libraries available on your system.
On all Linux distributions you will need to have :ref:`Rust installed and
available<installation:Rust>`.
@@ -196,10 +195,10 @@ Static Wheels
~~~~~~~~~~~~~
Cryptography ships statically-linked wheels for macOS, Windows, and Linux (via
-``manylinux``). This allows compatible environments to use the most recent
-OpenSSL, regardless of what is shipped by default on those platforms. Some
-Linux distributions (most notably Alpine) are not ``manylinux`` compatible so
-we cannot distribute wheels for them.
+``manylinux`` and ``musllinux``). This allows compatible environments to use
+the most recent OpenSSL, regardless of what is shipped by default on those
+platforms. Some Linux distributions are not ``manylinux`` or ``musllinux``
+compatible so we cannot distribute wheels for them.
However, you can build your own statically-linked wheels that will work on your
own systems. This will allow you to continue to use relatively old Linux |
|
That looks like a good draft we can work with. It looks like we're out of date in some other ways with that documentation (notably: we ship PyPy wheels on x86_64 for Windows, macOS, and manylinux), but we can fix that separately. |
|
Regarding this bit Are there any other common distros that don't use one or the other? This might be clearer pushed into the following paragraph to get something like: @@ -196,15 +195,15 @@ Static Wheels
~~~~~~~~~~~~~
Cryptography ships statically-linked wheels for macOS, Windows, and Linux (via
-``manylinux``). This allows compatible environments to use the most recent
-OpenSSL, regardless of what is shipped by default on those platforms. Some
-Linux distributions (most notably Alpine) are not ``manylinux`` compatible so
-we cannot distribute wheels for them.
-
-However, you can build your own statically-linked wheels that will work on your
-own systems. This will allow you to continue to use relatively old Linux
-distributions (such as LTS releases), while making sure you have the most
-recent OpenSSL available to your Python programs.
+``manylinux`` and ``musllinux``). This allows compatible environments to use
+the most recent OpenSSL, regardless of what is shipped by default on those
+platforms.
+
+In the off chance you use a platform outside of that list, you can build your
+own statically-linked wheels that will work on your own systems. This will
+allow you to continue to use relatively old Linux distributions (such as LTS
+releases), while making sure you have the most recent OpenSSL available to
+your Python programs.
To do so, you should find yourself a machine that is as similar as possible to
your target environment (e.g. your production environment): for example, spin |
|
I'm not aware of any significant distributions that remain uncovered with manylinux + musllinux so that language is definitely better. The primary point of failure for wheels at that point will be users on distributions older than the wheel compatibility (e.g. CentOS 6), architectures we don't produce wheels for (e.g. i686, s390x, ppc64le, etc), or alternate Python runtimes (e.g. Pyston). I'd probably change |
|
FYI, looks like PyPI does not allow uploading musllinux wheels yet. |
|
@messense Thanks for the heads up! I opened a PR for it here pypi/warehouse#9982 |
|
For future reference #6280 covers the arm64 side of this as well (along with pyca/infra#369). |
|
With this in, would it make sense to add a comment to this discussion? This and #6280 should, afaict, resolve the need to have Rust installed for most people. |
|
Good idea. I just put an update under alpine in the final post. |
* preparations for musllinux * wheel-builder | skip PyPy on musllinux builds
Just added musllinux to the wheel builder and tweaked the execstack call to readelf which happens to be present in both pypa manylinux and musllinux images.
This should just work once the following are resolved:
If you'd like to test that whole chain out, there's instructions in the last PR pyca/infra#367