faust-streaming / cChardet

universal character encoding detector
Other
56 stars 4 forks source link

Cannot install on Alpine Linux #20

Closed ported-pw closed 1 year ago

ported-pw commented 1 year ago

OS/Arch/Python version

uname_result(system='Linux', node='fdd84feddefe', release='6.1.5-x64v1-xanmod1', version='#0~20230112.1191b20 SMP PREEMPT_DYNAMIC Thu Jan 12 17:07:20 UTC ', machine='x86_64') Docker python:3.11.1-alpine3.17, installed gcc g++ pkgconf cmake make

What is the problem?

The wheel does not seem to be prebuilt for this platform and it cannot be built as it does not clone uchardet/run the correct build step to do so.

Expected behavior

Either there is a wheel available or the wheel can be built by pip.

Actual behavior

The wheel cannot be built:

Building wheels for collected packages: faust-cchardet
  Building wheel for faust-cchardet (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Building wheel for faust-cchardet (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [19 lines of output]
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build/lib.linux-x86_64-cpython-311
      creating build/lib.linux-x86_64-cpython-311/cchardet
      copying src/cchardet/version.py -> build/lib.linux-x86_64-cpython-311/cchardet
      copying src/cchardet/__init__.py -> build/lib.linux-x86_64-cpython-311/cchardet
      running build_ext
      building 'cchardet._cchardet' extension
      creating build/temp.linux-x86_64-cpython-311
      creating build/temp.linux-x86_64-cpython-311/src
      creating build/temp.linux-x86_64-cpython-311/src/cchardet
      gcc -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -DTHREAD_STACK_SIZE=0x100000 -fPIC -I/usr/local/include/python3.11 -c src/cchardet/_cchardet.cpp -o build/temp.linux-x86_64-cpython-311/src/cchardet/_cchardet.o
      src/cchardet/_cchardet.cpp:775:10: fatal error: uchardet.h: No such file or directory
        775 | #include "uchardet.h"
            |          ^~~~~~~~~~~~
      compilation terminated.
      error: command '/usr/bin/gcc' failed with exit code 1
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for faust-cchardet
Failed to build faust-cchardet
ERROR: Could not build wheels for faust-cchardet, which is required to install pyproject.toml-based projects

Steps to reproduce the behavior

docker run -it python:3.11.1-alpine3.17 /bin/sh
/ # apk add --no-cache pkgconf gcc g++ make cmake
/ # pip install faust-cchardet
wbarnha commented 1 year ago

I believe Alpine Linux requires musllinux wheels, I'll have those built in the next update for you momentarily.

wbarnha commented 1 year ago

Just released 2.1.16, once it's done building, you should have wheels available.

ported-pw commented 1 year ago

Thank you so much! That was super quick!