MKuranowski / aiocsv

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

gcc dependency for build #13

Closed boolka closed 1 year ago

boolka commented 1 year ago

`=> ERROR [server server 6/7] RUN --mount=type=cache,sharing=locked,target=/root/.cache/pdm pdm sync --dev 5.6s


[server server 6/7] RUN --mount=type=cache,sharing=locked,target=/root/.cache/pdm pdm sync --dev:
0.701 Lock file version is not compatible with PDM, installation may fail
0.715 STATUS: Resolving packages from lockfile...
0.962 STATUS: Fetching hashes for resolved packages...
1.011 Synchronizing working set with lock file: 50 to add, 0 to update, 0 to remove
1.011 1.254 ✔ Install setuptools 66.1.1 successful 1.444 ✔ Install aiohttp-jwt 0.6.1 successful 1.463 ✔ Install aiofile 3.8.5 successful 1.468 ✔ Install aiohttp-session 2.12.0 successful 1.514 ✔ Install aio-pika 9.1.4 successful 1.529 ✔ Install aiormq 6.7.6 successful 1.780 ✔ Install aiosignal 1.3.1 successful 1.782 ✔ Install async-timeout 4.0.2 successful 1.831 ✔ Install certifi 2022.12.7 successful 1.863 ✔ Install attrs 22.2.0 successful 2.122 ✔ Install caio 0.9.12 successful 2.301 ✔ Install fysom 2.1.6 successful 2.367 ✔ Install config 0.1.0 successful 2.421 ✔ Install aiohttp-swagger 1.0.16 successful 2.481 ✔ Install data-markup 0.1.0 successful 2.596 ✔ Install idna 3.4 successful 2.610 ✔ Install iniconfig 2.0.0 successful 2.642 ✔ Install importlib-metadata 6.0.0 successful 2.699 ✔ Install charset-normalizer 2.1.1 successful 2.804 ✔ Install aiohttp 3.8.3 successful 2.865 ✔ Install frozenlist 1.3.3 successful 2.870 ✔ Install jinja2 3.1.2 successful 2.887 ✔ Install miniopy-async 1.15 successful 2.944 ✔ Install packaging 23.0 successful 3.026 ✔ Install pluggy 1.0.0 successful 3.044 ✔ Install pamqp 3.2.1 successful 3.125 ✔ Install psycopg 3.1.10 successful 3.175 ✔ Install psycopg-pool 3.1.6 successful 3.226 ✔ Install pyjwt 2.7.0 successful 3.313 ✔ Install pytest-asyncio 0.20.3 successful 3.392 ✔ Install markupsafe 2.1.2 successful 3.410 ✔ Install pytest 7.2.0 successful 3.439 ✔ Install hiredis 2.1.1 successful 3.520 ✔ Install rfc5424-logging-handler 1.4.3 successful 3.654 ✔ Install redis 4.4.2 successful 3.666 ✖ Install aiocsv 1.2.4 failed 3.667 ✔ Install sqlparse 0.4.3 successful 3.808 ✔ Install tabulate 0.9.0 successful 3.826 ✔ Install tzlocal 5.0.1 successful 3.864 ✔ Install typing-extensions 4.4.0 successful 3.961 ✔ Install pyyaml 6.0 successful 4.039 ✔ Install urllib3 1.26.15 successful 4.111 ✔ Install yoyo-migrations 8.2.0 successful 4.167 ✔ Install zipp 3.11.0 successful 4.320 ✔ Install pytz 2023.3 successful 4.443 ✔ Install watchdog 2.2.1 successful 4.812 ✔ Install psycopg-binary 3.1.10 successful 5.076 ✔ Install multidict 6.0.4 successful 5.077 ✔ Install yarl 1.8.2 successful 5.193 ✔ Install ruff 0.0.223 successful 5.193 Retry failed jobs 5.423 ✖ Install aiocsv 1.2.4 failed 5.424 5.424 ERRORS: 5.425 add aiocsv failed: 5.425 Traceback (most recent call last): 5.425 File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 58, in run 5.425 result = self.fn(*self.args, **self.kwargs) 5.425 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 5.425 File 5.425 "/usr/local/lib/python3.11/site-packages/pdm/installers/synchronizers.py", line 5.425 275, in install_candidate 5.425 self.manager.install(can) 5.425 File "/usr/local/lib/python3.11/site-packages/pdm/installers/manager.py", line 5.425 33, in install 5.425 installer(str(prepared.build()), self.environment, prepared.direct_url()) 5.425 ^^^^^^^^^^^^^^^^ 5.425 File "/usr/local/lib/python3.11/site-packages/pdm/models/candidates.py", line 5.425 389, in build 5.425 self.wheel = Path(builder.build(build_dir, 5.425 metadata_directory=self._metadata_dir)) 5.425 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 5.425 ^^^^^ 5.425 File "/usr/local/lib/python3.11/site-packages/pdm/builders/wheel.py", line 28, 5.425 in build 5.425 filename = self._hook.build_wheel(out_dir, config_settings, 5.425 metadata_directory) 5.425 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 5.425 ^^^ 5.425 File "/usr/local/lib/python3.11/site-packages/pyproject_hooks/_impl.py", line 5.425 209, in build_wheel 5.425 return self._call_hook('build_wheel', { 5.425 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 5.425 File "/usr/local/lib/python3.11/site-packages/pyproject_hooks/_impl.py", line 5.425 311, in _call_hook 5.425 self._subprocess_runner( 5.425 File "/usr/local/lib/python3.11/site-packages/pdm/builders/base.py", line 260, 5.425 in subprocess_runner 5.425 return log_subprocessor(cmd, cwd, extra_environ=env) 5.425 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 5.425 File "/usr/local/lib/python3.11/site-packages/pdm/builders/base.py", line 107, 5.425 in log_subprocessor 5.425 raise build_error(e) from None 5.425 pdm.exceptions.BuildError: Build backend raised error: Showing the last 10 lines 5.425 of the build output: 5.425 running bdist_wheel 5.425 running build 5.425 running build_py 5.425 file aiocsv.py (for module aiocsv) not found 5.425 file aiocsv.py (for module aiocsv) not found 5.425 running build_ext 5.425 building 'aiocsv._parser' extension 5.425 gcc -pthread -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC 5.425 -I/usr/local/include/python3.11 -c aiocsv/_parser.c -o 5.425 build/temp.linux-aarch64-cpython-311/aiocsv/_parser.o 5.425 error: command 'gcc' failed: No such file or directory 5.426 5.426 See /tmp/pdm-install-alwp3jo7.log for detailed debug log. 5.426 [InstallationError]: Some package operations are not complete yet 5.426 Add '-v' to see the detailed traceback

failed to solve: process "/bin/sh -c pdm sync --dev" did not complete successfully: exit code: 1`

Why do the lib needs gcc for successful compilation ? And why this is not mentioned in the README file ?

MKuranowski commented 1 year ago

The CSV parser is written in Cython. Cython is automatically converted into C (see _parser.pyx and _parser.c). To build the parser extension a C compiler is required.

While pre-complied wheels are provided, cibuildwheel only creates them for x86_64 machines, and you're running on ARM.

Still, the readme should include a note about this.