iamrony777 / javinfo-api

An API to scrape Japanese adult video data from various sites
60 stars 16 forks source link

Build error #15

Closed signing-suntans0y closed 1 year ago

signing-suntans0y commented 1 year ago

Hi iamrony777, apologies for a noob question in advance. While trying to build a docker image I am getting the following error.

0 160.8 check.warn(importable)

0 160.8 /usr/local/lib/python3.11/site-packages/setuptools/command/build_py.py:202: SetuptoolsDeprecationWarning: Installing 'uvloop.includes' as data is deprecated, please list it in packages.

0 160.8 !!

0 160.8

0 160.8

0 160.8

0 160.8 # Package would be ignored

0 160.8

0 160.8 Python recognizes 'uvloop.includes' as an importable package,

0 160.8 but it is not listed in the packages configuration of setuptools.

0 160.8

0 160.8 'uvloop.includes' has been automatically added to the distribution only

0 160.8 because it may contain data files, but this behavior is likely to change

0 160.8 in future versions of setuptools (and therefore is considered deprecated).

0 160.8

0 160.8 Please make sure that 'uvloop.includes' is included as a package by using

0 160.8 the packages configuration field or the proper discovery methods

0 160.8 (for example by using find_namespace_packages(...)/find_namespace:

0 160.8 instead of find_packages(...)/find:).

0 160.8

0 160.8 You can read more about "package discovery" and "data files" on setuptools

0 160.8 documentation page.

0 160.8

0 160.8

0 160.8 !!

0 160.8 building 'uvloop.loop' extension

0 160.8 creating build/temp.linux-aarch64-cpython-311

0 160.8 creating build/temp.linux-aarch64-cpython-311/uvloop

0 160.8 gcc -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -DTHREAD_STACK_SIZE=0x100000 -fPIC -I/usr/local/include/python3.11 -I/tmp/pip-wheel-1j2g1hhw/uvloop_f485260deea54c04b493ff91e427feea/vendor/libuv/include -c uvloop/loop.c -o build/temp.linux-aarch64-cpython-311/uvloop/loop.o -O2

0 160.8 uvloop/loop.c:214:12: fatal error: longintrepr.h: No such file or directory

0 160.8 214 | #include "longintrepr.h"

0 160.8 | ^~~~~~~

0 160.8 compilation terminated.

0 160.8 error: command '/usr/bin/gcc' failed with exit code 1

0 160.8 [end of output]

0 160.8

0 160.8 note: This error originates from a subprocess, and is likely not a problem with pip.

0 160.8 ERROR: Failed building wheel for uvloop

0 160.8 Running setup.py clean for uvloop

0 161.0 Building wheel for watchdog (setup.py): started

0 161.2 Building wheel for watchdog (setup.py): finished with status 'done'

0 161.2 Created wheel for watchdog: filename=watchdog-2.1.9-py3-none-any.whl size=78393 sha256=f48fad5499747856b33332f8c65395a464d5acdcc884bc908e5a04954dcb44be

0 161.2 Stored in directory: /root/.cache/pip/wheels/6c/83/70/756b9cdd0256de299434cdfc81375baffca3e3a6a305c83afc

0 161.2 Building wheel for wrapt (setup.py): started

0 162.0 Building wheel for wrapt (setup.py): finished with status 'done'

0 162.0 Created wheel for wrapt: filename=wrapt-1.14.1-cp311-cp311-linux_aarch64.whl size=35027 sha256=7c90efbae1dbd9a58ea033e2b3b0d03f04278a4577fd61cc71f9c2a6dbc32a65

0 162.0 Stored in directory: /root/.cache/pip/wheels/6c/5f/ff/a07f5f99c11c1480c6d2d1d6e0adadd8c1d05bdd668173bc42

0 162.0 Successfully built lxml markupsafe pillow pyyaml watchdog wrapt

0 162.0 Failed to build uvloop

0 162.0 ERROR: Failed to build one or more wheels


failed to solve: executor failed running [/bin/sh -c MAKEFLAGS="-j$(nproc)" SETUPFLAGS="-j$(nproc)" ; pip wheel --wheel-dir=/app/wheels -r requirements.txt]: exit code: 1

iamrony777 commented 1 year ago

Yup , Python 3.11 fails to build an older version of uvloop

For now modify dockerfile

https://github.com/iamrony777/javinfo-api/blob/9da36af83244d3b0bcd3db0dda31f80a58490d69/Dockerfile.build#L2 https://github.com/iamrony777/javinfo-api/blob/9da36af83244d3b0bcd3db0dda31f80a58490d69/Dockerfile.build#L29

change base image from python:alpine to python:3.10.7-alpine