Unable to install in pypy
Attempting to install coincurve in both pypy3.10 and pypy3.11 on Ubuntu results in:
File "/tmp/pip-install-qfbnaz4o/coincurve_afdb4624c0fc432786b913d146e8d692/hatch_build.py", line 26, in initialize
cffi_shared_lib = _cffi_backend.__file__
AttributeError: module '_cffi_backend' has no attribute '__file__'
I've gone through the install docs, but no dice. Any recommendations?
I also just ran into this issue. Have you had any luck resolving it?
The line in question is this one: https://github.com/ofek/coincurve/blob/4285045a4cf9ec7a09121b0c85721baaaf76180a/hatch_build.py#L26
Have you had any luck resolving it?
Nothing yet.
It would help if one of you could run PyPy with CFFI installed and then print(dir(_cffi_backend))
It would help if one of you could run PyPy with CFFI installed and then
print(dir(_cffi_backend))
In [1]: !python --version
Python 3.10.16 (64367dfeb263, Feb 24 2025, 17:31:14)
[PyPy 7.3.19 with GCC 10.2.1 20210130 (Red Hat 10.2.1-11)]
In [2]: import _cffi_backend
In [3]: print(dir(_cffi_backend))
['CField', 'CLibrary', 'CType', 'FFI', 'FFI_CDECL', 'FFI_DEFAULT_ABI', 'Lib', 'RTLD_DEEPBIND', 'RTLD_GLOBAL', 'RTLD_LAZY', 'RTLD_LOCAL', 'RTLD_NODELETE', 'RTLD_NOLOAD', 'RTLD_NOW', '_CDataBase', '__CData_iterator', '__FFIAllocator', '__FFIFunctionWrapper', '__FFIGlobSupport', '__doc__', '__loader__', '__name__', '__package__', '__spec__', '__version__', '_get_common_types', '_get_types', '_offset_in_bytes', 'alignof', 'buffer', 'callback', 'cast', 'complete_struct_or_union', 'from_buffer', 'from_handle', 'gcp', 'get_errno', 'getcname', 'load_library', 'memmove', 'new_array_type', 'new_enum_type', 'new_function_type', 'new_pointer_type', 'new_primitive_type', 'new_struct_type', 'new_union_type', 'new_void_type', 'newp', 'newp_handle', 'rawaddressof', 'release', 'set_errno', 'sizeof', 'string', 'typeof', 'typeoffsetof', 'unpack']
Per PyPy, they are recommending that since it's already installed in PyPy, that it shouldn't be attempted to install again.
https://github.com/python-cffi/cffi/issues/173
That seems like a good approach, thanks.