ionelmc/python-lazy-object-proxy

Binary wheels for PyPy

jcpunk opened this issue · 6 comments

Can binary wheels be generated for PyPy?

Can you compile the C extension on PyPy?

I'll confess I've not looked too closely at what sort of wheel I get when I run pypy3 -m pip install lazy-object-proxy but it does spit out something useful:

$ pypy3 -m pip install --user lazy-object-proxy
Collecting lazy-object-proxy
  Using cached lazy-object-proxy-1.6.0.tar.gz (44 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
    Preparing wheel metadata ... done
Building wheels for collected packages: lazy-object-proxy
  Building wheel for lazy-object-proxy (PEP 517) ... done
  Created wheel for lazy-object-proxy: filename=lazy_object_proxy-1.6.0-pp37-pypy37_pp73-linux_x86_64.whl size=11386 sha256=62a6b80b057f5ed5dc80e9254da2694fdd6b7877b96d3afdc49af48b380b26e1
  Stored in directory: /home/riehecky/.cache/pip/wheels/53/55/7e/8acf6d78d3d7cd49fd495ed3360b02bc6228461fe649bb686d

Yes but it's not actually a proper wheel. If you'd check the verbose logs or actually inspect the wheel you'd see that it doesn't have any C extension.
For example on pypy3 7.3.1:

building 'lazy_object_proxy.cext' extension
gcc -pthread -DNDEBUG -O2 -fPIC -Isrc/lazy_object_proxy -I/usr/lib64/pypy3-7.3/include -c src/lazy_object_proxy/cext.c -o build/temp.linux-x86_64-3.6/src/lazy_object_proxy/cext.o
src/lazy_object_proxy/cext.c: In function ‘Proxy_reversed’:
src/lazy_object_proxy/cext.c:914:54: error: ‘PyReversed_Type’ undeclared (first use in this function)
  914 |     return PyObject_CallFunctionObjArgs((PyObject *)&PyReversed_Type,
      |                                                      ^~~~~~~~~~~~~~~
src/lazy_object_proxy/cext.c:914:54: note: each undeclared identifier is reported only once for each function it appears in
********************************************************************************
WARNING:

    An optional code optimization (C extension) could not be compiled.

    Optimizations for this package will not be available!

CAUSE:

    CompileError(DistutilsExecError("command 'gcc' failed with exit status 1",),)
********************************************************************************

cgholke succeeded to do a wheel for PyPy-3.7 but now missing the pypy-3.8 one

That wheel doesn't have anything special, it's a simple pure-python package. I could put a generic pure wheel for pypys on pypi just to stop having these discussions I guess...

Just released 1.7.0 and it has a lazy_object_proxy-1.7.0-pp37.pp38-none-any.whl wheel.