PeterDing / BaiduPCS-Py

BaiduPCS API & App 百度网盘客户端 和 API
MIT License
690 stars 113 forks source link

用docker的python镜像构建,会报下面的错误 #110

Open Seifon opened 1 year ago

Seifon commented 1 year ago
#0 173.9       gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/tmp/pip-install-v6ocy15s/httptools_ca538d10eadc4602bd329d3013470470/vendor/llhttp/include -I/tmp/pip-install-v6ocy15s/httptools_ca538d10eadc4602bd329d3013470470/vendor/llhttp/src -I/usr/local/include/python3.8 -c httptools/parser/parser.c -o build/temp.linux-aarch64-3.8/httptools/parser/parser.o -O2
#0 173.9       unable to execute 'gcc': No such file or directory
#0 173.9       error: command 'gcc' failed with exit status 1
#0 173.9       [end of output]
#0 173.9   
#0 173.9   note: This error originates from a subprocess, and is likely not a problem with pip.
#0 173.9   ERROR: Failed building wheel for httptools
#0 173.9   Running setup.py clean for httptools
#0 175.2 Successfully built PyYAML aget docopt mugen
#0 175.2 Failed to build baidupcs-py cffi httptools
#0 175.2 ERROR: Could not build wheels for baidupcs-py, which is required to install pyproject.toml-based projects
Seifon commented 1 year ago

使用的0.7.5版本

Seifon commented 1 year ago

已解决 通过:apk add gcc g++ libffi-dev musl-dev 解决

xyb commented 1 year ago

如果要避免本地编译,需要:

  1. mugen 更新,使用最新的 httptools。已经提交 issue https://github.com/PeterDing/mugen/issues/2
  2. BaiduPCS-Py 发布的版本中增加 wheel 二进制文件
xyb commented 1 year ago

第二个问题已经创建 issue #111

xyb commented 1 year ago

@PeterDing 另外,建议 simple_cipher 剥离出去,作为依赖包,这样 build wheels 也会简单很多。