ApeWorX / ape

The smart contract development tool for Pythonistas, Data Scientists, and Security Professionals
https://apeworx.io
Apache License 2.0
899 stars 135 forks source link

Cannot install ape #2391

Closed PatrickAlphaC closed 1 hour ago

PatrickAlphaC commented 3 days ago

Have you ensured that all of these are up to date?

What version of Ape are you on?

XX

What command(s) is the bug in?

Install

Operating System

macOS (Apple Silicon)

Description

uv tool install eth-ape

Results in:

% uv tool install eth-ape
Resolved 107 packages in 390ms
error: Failed to prepare distributions
  Caused by: Failed to download and build `msgspec==0.18.6`
  Caused by: Build backend failed to build wheel through `build_wheel` (exit status: 1)

[stdout]
running bdist_wheel
running build
running build_py
copying msgspec/msgpack.py -> build/lib.macosx-11.0-arm64-cpython-313/msgspec
copying msgspec/__init__.py -> build/lib.macosx-11.0-arm64-cpython-313/msgspec
copying msgspec/yaml.py -> build/lib.macosx-11.0-arm64-cpython-313/msgspec
copying msgspec/structs.py -> build/lib.macosx-11.0-arm64-cpython-313/msgspec
copying msgspec/inspect.py -> build/lib.macosx-11.0-arm64-cpython-313/msgspec
copying msgspec/_json_schema.py -> build/lib.macosx-11.0-arm64-cpython-313/msgspec
copying msgspec/json.py -> build/lib.macosx-11.0-arm64-cpython-313/msgspec
copying msgspec/_utils.py -> build/lib.macosx-11.0-arm64-cpython-313/msgspec
copying msgspec/toml.py -> build/lib.macosx-11.0-arm64-cpython-313/msgspec
copying msgspec/msgpack.pyi -> build/lib.macosx-11.0-arm64-cpython-313/msgspec
copying msgspec/__init__.pyi -> build/lib.macosx-11.0-arm64-cpython-313/msgspec
copying msgspec/json.pyi -> build/lib.macosx-11.0-arm64-cpython-313/msgspec
copying msgspec/structs.pyi -> build/lib.macosx-11.0-arm64-cpython-313/msgspec
copying msgspec/py.typed -> build/lib.macosx-11.0-arm64-cpython-313/msgspec
UPDATING build/lib.macosx-11.0-arm64-cpython-313/msgspec/_version.py
set build/lib.macosx-11.0-arm64-cpython-313/msgspec/_version.py to '0.18.6'
running build_ext
building 'msgspec._core' extension
clang -fno-strict-overflow -Wsign-compare -Wunreachable-code -DNDEBUG -g -O3 -Wall -arch arm64 -mmacosx-version-min=11.0 -Wno-nullability-completeness -Wno-expansion-to-defined -Wno-undef-prefix -fPIC -Werror=unguarded-availability-new -I/Users/patrick/.cache/uv/builds-v0/.tmpiy1jnV/include -I/Users/patrick/.local/share/uv/python/cpython-3.13.0-macos-aarch64-none/include/python3.13 -c msgspec/_core.c -o build/temp.macosx-11.0-arm64-cpython-313/msgspec/_core.o

[stderr]
msgspec/_core.c:500:13: error: call to undeclared function '_PyUnicode_EQ'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
  500 |         if (_PyUnicode_EQ(kwname, key)) {
      |             ^
msgspec/_core.c:4452:12: error: call to undeclared function '_PySet_NextEntry'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
 4452 |     while (_PySet_NextEntry(state->structs_set, &set_pos, &set_item, &set_hash)) {
      |            ^
msgspec/_core.c:7316:17: error: call to undeclared function '_PyUnicode_EQ'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
 7316 |             if (_PyUnicode_EQ(kwname, field)) {
      |                 ^
msgspec/_core.c:7723:17: error: call to undeclared function '_PyUnicode_EQ'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
 7723 |             if (_PyUnicode_EQ(kwname, field)) goto kw_found;
      |                 ^
msgspec/_core.c:11254:72: error: too few arguments to function call, expected 6, have 5
 11254 |     int out = _PyLong_AsByteArray((PyLongObject *)int128, buf, 16, 0, 0);
       |               ~~~~~~~~~~~~~~~~~~~                                      ^
/Users/patrick/.local/share/uv/python/cpython-3.13.0-macos-aarch64-none/include/python3.13/cpython/longobject.h:111:17: note: '_PyLong_AsByteArray' declared here
  111 | PyAPI_FUNC(int) _PyLong_AsByteArray(PyLongObject* v,
      |                 ^                   ~~~~~~~~~~~~~~~~
  112 |     unsigned char* bytes, size_t n,
      |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  113 |     int little_endian, int is_signed, int with_exceptions);
      |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
msgspec/_core.c:12426:12: error: call to undeclared function '_PySet_NextEntry'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
 12426 |     while (_PySet_NextEntry(obj, &ppos, &item, &hash)) {
       |            ^
msgspec/_core.c:13748:12: error: call to undeclared function '_PySet_NextEntry'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
 13748 |     while (_PySet_NextEntry(obj, &ppos, &item, &hash)) {
       |            ^
7 errors generated.
error: command '/usr/bin/clang' failed with exit code 1

Reproduction code

No response

linear[bot] commented 3 days ago

APE-1854 Cannot install ape

PatrickAlphaC commented 1 hour ago

uv defaults to 3.13 where ape currently does not work with 3.13 of python. The following worked:

uv tool install eth-ape --python 3.12