Pre-built muslc wheels

Bug #1748468 reported by Jacob Magnusson
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
lxml
Fix Released
Wishlist
Unassigned

Bug Description

It takes ~2 minutes to compile lxml from source using a 2.8GHz quad-core 16GB Macbook Pro. For example see the output of the command below.

Would be really nice if pre-built wheels could be provided for muslc / Alpine. As containerized environments are becoming the standard for ops, Alpine has risen in popularity as it focuses on minimal resource usage, so I would argue that it would make a lot of sense to provide wheels for this as well.

```
❯ time (echo "FROM python:3.6-alpine\nRUN apk add --no-cache gcc musl-dev libxml2-dev libxslt-dev\nRUN pip install lxml" | docker build -t alpine-lxml-test -)
Sending build context to Docker daemon 2.048kB
Step 1/3 : FROM python:3.6-alpine
 ---> 29b5ce58cfbc
Step 2/3 : RUN apk add --no-cache gcc musl-dev libxml2-dev libxslt-dev
 ---> Running in 0203751a73ad
fetch http://dl-cdn.alpinelinux.org/alpine/v3.4/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.4/community/x86_64/APKINDEX.tar.gz
(1/21) Installing binutils-libs (2.26-r1)
(2/21) Installing binutils (2.26-r1)
(3/21) Installing gmp (6.1.0-r0)
(4/21) Installing isl (0.14.1-r0)
(5/21) Installing libgomp (5.3.0-r0)
(6/21) Installing libatomic (5.3.0-r0)
(7/21) Installing libgcc (5.3.0-r0)
(8/21) Installing pkgconf (0.9.12-r0)
(9/21) Installing pkgconfig (0.25-r1)
(10/21) Installing mpfr3 (3.1.2-r0)
(11/21) Installing mpc1 (1.0.3-r0)
(12/21) Installing libstdc++ (5.3.0-r0)
(13/21) Installing gcc (5.3.0-r0)
(14/21) Installing zlib-dev (1.2.11-r0)
(15/21) Installing libxml2 (2.9.5-r0)
(16/21) Installing libxml2-dev (2.9.5-r0)
(17/21) Installing libgpg-error (1.23-r0)
(18/21) Installing libgcrypt (1.7.9-r0)
(19/21) Installing libxslt (1.1.29-r1)
(20/21) Installing libxslt-dev (1.1.29-r1)
(21/21) Installing musl-dev (1.1.14-r16)
Executing busybox-1.24.2-r14.trigger
OK: 121 MiB in 55 packages
Removing intermediate container 0203751a73ad
 ---> 52c2d0b9f6b9
Step 3/3 : RUN pip install lxml
 ---> Running in 348a7b0bc55a
Collecting lxml
  Downloading lxml-4.1.1.tar.gz (2.4MB)
Building wheels for collected packages: lxml
  Running setup.py bdist_wheel for lxml: started
  Running setup.py bdist_wheel for lxml: still running...
  Running setup.py bdist_wheel for lxml: finished with status 'done'
  Stored in directory: /root/.cache/pip/wheels/5d/14/6a/e0bbcf0b91d5add2b0caa1f704d190b36474c4d29b16f25192
Successfully built lxml
Installing collected packages: lxml
Successfully installed lxml-4.1.1
Removing intermediate container 348a7b0bc55a
 ---> be86cbe1c498
Successfully built be86cbe1c498
Successfully tagged alpine-lxml-test:latest
( echo | docker build -t alpine-lxml-test -; ) 0.12s user 0.09s system 0% cpu 2:13.81 total
```

Jacob Magnusson (q-d-k)
description: updated
Revision history for this message
scoder (scoder) wrote :

Don't the provided Linux wheels work there?
Maybe your pip/setuptools are outdated in the container and don't download wheels by default?

If that is really not the case and alpine Linux is sufficiently different from other Linux distros to merit its own binary wheels, I would accept a PR that adds an alpine setup to the existing manylinux1 build.

Changed in lxml:
importance: Undecided → Wishlist
status: New → Incomplete
Revision history for this message
scoder (scoder) wrote :

I'll just assume that this actually works and close the ticket. Note that you will need a somewhat recent pip/setuptools combination in order to install wheels automatically.

Changed in lxml:
status: Incomplete → Invalid
Revision history for this message
José Eduardo MCO (edu.mco) wrote :

Im having the same problem trying to install spellcheck on python:3-8-alpine

On debian installs fast

Revision history for this message
scoder (scoder) wrote :

musl wheels are now provided, starting with lxml 4.6.4.

Changed in lxml:
status: Invalid → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.