ifduyue / python-xxhash

Python Binding for xxHash
https://pypi.org/project/xxhash/
BSD 2-Clause "Simplified" License
366 stars 30 forks source link

Version 1.4.0 doesn't build with Docker python:3.6.8-alpine (xxh3.h missing) #30

Closed ddennerline closed 5 years ago

ddennerline commented 5 years ago

The docker file below produces an error with latest 1.4.0. If version is 1.3.0, the build succeeds.

FROM python:3.6.8-alpine

RUN apk update
RUN apk add --no-cache python-dev g++
RUN pip3 install --upgrade pip
RUN pip3 install xxhash
#RUN pip3 install xxhash==1.3.0

ENTRYPOINT ["/bin/sh", "-c", "echo Hello"]

A subset of the logging:

 Running setup.py install for xxhash: started
    Running setup.py install for xxhash: finished with status 'error'
    ERROR: Command errored out with exit status 1:
     command: /usr/local/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-zihw2dts/xxhash/setup.py'"'"'; __file__='"'"'/tmp/pip-install-zihw2dts/xxhash/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-zbzdmx6s/install-record.txt --single-version-externally-managed --compile
         cwd: /tmp/pip-install-zihw2dts/xxhash/
    Complete output (20 lines):
    running install
    running build
    running build_py
    creating build
    creating build/lib.linux-x86_64-3.6
    creating build/lib.linux-x86_64-3.6/xxhash
    copying xxhash/__init__.py -> build/lib.linux-x86_64-3.6/xxhash
    running build_ext
    building '_xxhash' extension
    creating build/temp.linux-x86_64-3.6
    creating build/temp.linux-x86_64-3.6/src
    creating build/temp.linux-x86_64-3.6/deps
    creating build/temp.linux-x86_64-3.6/deps/xxhash
    gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -DTHREAD_STACK_SIZE=0x100000 -fPIC -Ideps/xxhash -I/usr/local/include/python3.6m -c src/_xxhash.c -o build/temp.linux-x86_64-3.6/src/_xxhash.o
    gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -DTHREAD_STACK_SIZE=0x100000 -fPIC -Ideps/xxhash -I/usr/local/include/python3.6m -c deps/xxhash/xxhash.c -o build/temp.linux-x86_64-3.6/deps/xxhash/xxhash.o
    deps/xxhash/xxhash.c:1115:10: fatal error: xxh3.h: No such file or directory
     #include "xxh3.h"
              ^~~~~~~~
    compilation terminated.
    error: command 'gcc' failed with exit status 1
    ----------------------------------------
ERROR: Command errored out with exit status 1: /usr/local/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-zihw2dts/xxhash/setup.py'"'"'; __file__='"'"'/tmp/pip-install-zihw2dts/xxhash/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-zbzdmx6s/install-record.txt --single-version-externally-managed --compile Check the logs for full command output.

   deps/xxhash/xxhash.c:1115:10: fatal error: xxh3.h: No such file or directory
     #include "xxh3.h"
              ^~~~~~~~
    compilation terminated.
Althorion commented 5 years ago

Already fixed by https://github.com/ifduyue/python-xxhash/commit/64ffe1ba629d4c6728d5a281eebd8999fee18951, but a release bump would be nice…

ifduyue commented 5 years ago

I'll make a release as soon as possible

ifduyue commented 5 years ago

1.4.1 is on PyPI https://pypi.org/project/xxhash/1.4.1/