MKuranowski / aiocsv

Python: Asynchronous CSV reading/writing
https://pypi.org/project/aiocsv/
MIT License
67 stars 9 forks source link

Fails to compile on Docker (Python v3.11.7) #18

Closed AnderUstarroz closed 8 months ago

AnderUstarroz commented 8 months ago

Seems like this package breaks when trying to build Docker containers with python v3.11.x.

You can reproduce the issue by running the following minimal example.

Run docker build -t testint-aiocsv:latest .

# Dockerfile
FROM python:3.11.7-slim-bullseye

RUN pip install aiocsv==1.2.5

Full logs:

 => ERROR [2/2] RUN pip install aiocsv==1.2.5                                                                             1.8s
------
 > [2/2] RUN pip install aiocsv==1.2.5:
0.945 Collecting aiocsv==1.2.5
1.102   Downloading aiocsv-1.2.5.tar.gz (93 kB)
1.129      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 93.1/93.1 kB 3.6 MB/s eta 0:00:00
1.143   Preparing metadata (setup.py): started
1.410   Preparing metadata (setup.py): finished with status 'done'
1.412 Building wheels for collected packages: aiocsv
1.412   Building wheel for aiocsv (setup.py): started
1.549   Building wheel for aiocsv (setup.py): finished with status 'error'
1.552   error: subprocess-exited-with-error
1.552   
1.552   × python setup.py bdist_wheel did not run successfully.
1.552   │ exit code: 1
1.552   ╰─> [21 lines of output]
1.552       running bdist_wheel
1.552       running build
1.552       running build_py
1.552       file aiocsv.py (for module aiocsv) not found
1.552       creating build
1.552       creating build/lib.linux-aarch64-cpython-311
1.552       creating build/lib.linux-aarch64-cpython-311/aiocsv
1.552       copying aiocsv/__init__.py -> build/lib.linux-aarch64-cpython-311/aiocsv
1.552       copying aiocsv/parser.py -> build/lib.linux-aarch64-cpython-311/aiocsv
1.552       copying aiocsv/protocols.py -> build/lib.linux-aarch64-cpython-311/aiocsv
1.552       copying aiocsv/readers.py -> build/lib.linux-aarch64-cpython-311/aiocsv
1.552       copying aiocsv/writers.py -> build/lib.linux-aarch64-cpython-311/aiocsv
1.552       copying aiocsv/py.typed -> build/lib.linux-aarch64-cpython-311/aiocsv
1.552       copying aiocsv/_parser.pyi -> build/lib.linux-aarch64-cpython-311/aiocsv
1.552       file aiocsv.py (for module aiocsv) not found
1.552       running build_ext
1.552       building 'aiocsv._parser' extension
1.552       creating build/temp.linux-aarch64-cpython-311
1.552       creating build/temp.linux-aarch64-cpython-311/aiocsv
1.552       gcc -pthread -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/usr/local/include/python3.11 -c aiocsv/_parser.c -o build/temp.linux-aarch64-cpython-311/aiocsv/_parser.o
1.552       error: command 'gcc' failed: No such file or directory
1.552       [end of output]
1.552   
1.552   note: This error originates from a subprocess, and is likely not a problem with pip.
1.552   ERROR: Failed building wheel for aiocsv
1.552   Running setup.py clean for aiocsv
1.652 Failed to build aiocsv
1.652 ERROR: Could not build wheels for aiocsv, which is required to install pyproject.toml-based projects
1.751 
MKuranowski commented 8 months ago

Please read the error message:

error: command 'gcc' failed: No such file or directory

You're missing gcc. cibuildwheel doesn't build wheels for ARM, and thus the extension must be compiled manually.

Duplicate of #13.