uvloop
uvloop copied to clipboard
Error installing uvloop via pip for PyPy3.9
- uvloop version: 0.17.0
- Python version: Python 3.9.16(PyPy 7.3.11)
- Platform: MacOS 12.01
-
Can you reproduce the bug with
PYTHONASYNCIODEBUG
in env?: y
> pip install uvloop
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Collecting uvloop
Using cached https://pypi.tuna.tsinghua.edu.cn/packages/ba/86/6dda1760481abf244cbd3908b79a4520d757040ca9ec37a79fc0fd01e2a0/uvloop-0.17.0.tar.gz (2.3 MB)
Preparing metadata (setup.py) ... done
Building wheels for collected packages: uvloop
Building wheel for uvloop (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [276 lines of output]
running bdist_wheel
running build
running build_py
creating build
creating build/lib.macosx-10.9-x86_64-3.9
creating build/lib.macosx-10.9-x86_64-3.9/uvloop
copying uvloop/_version.py -> build/lib.macosx-10.9-x86_64-3.9/uvloop
copying uvloop/_noop.py -> build/lib.macosx-10.9-x86_64-3.9/uvloop
copying uvloop/_testbase.py -> build/lib.macosx-10.9-x86_64-3.9/uvloop
copying uvloop/__init__.py -> build/lib.macosx-10.9-x86_64-3.9/uvloop
running egg_info
writing uvloop.egg-info/PKG-INFO
writing dependency_links to uvloop.egg-info/dependency_links.txt
writing requirements to uvloop.egg-info/requires.txt
writing top-level names to uvloop.egg-info/top_level.txt
reading manifest file 'uvloop.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no previously-included files matching '*' found under directory 'vendor/libuv/.git'
warning: no previously-included files matching '*' found under directory 'vendor/libuv/docs'
warning: no previously-included files matching '*' found under directory 'vendor/libuv/img'
adding license file 'LICENSE-APACHE'
adding license file 'LICENSE-MIT'
writing manifest file 'uvloop.egg-info/SOURCES.txt'
copying uvloop/cbhandles.pxd -> build/lib.macosx-10.9-x86_64-3.9/uvloop
copying uvloop/cbhandles.pyx -> build/lib.macosx-10.9-x86_64-3.9/uvloop
copying uvloop/dns.pyx -> build/lib.macosx-10.9-x86_64-3.9/uvloop
copying uvloop/errors.pyx -> build/lib.macosx-10.9-x86_64-3.9/uvloop
copying uvloop/loop.c -> build/lib.macosx-10.9-x86_64-3.9/uvloop
copying uvloop/loop.pxd -> build/lib.macosx-10.9-x86_64-3.9/uvloop
copying uvloop/loop.pyi -> build/lib.macosx-10.9-x86_64-3.9/uvloop
copying uvloop/loop.pyx -> build/lib.macosx-10.9-x86_64-3.9/uvloop
copying uvloop/lru.pyx -> build/lib.macosx-10.9-x86_64-3.9/uvloop
copying uvloop/pseudosock.pyx -> build/lib.macosx-10.9-x86_64-3.9/uvloop
copying uvloop/py.typed -> build/lib.macosx-10.9-x86_64-3.9/uvloop
copying uvloop/request.pxd -> build/lib.macosx-10.9-x86_64-3.9/uvloop
copying uvloop/request.pyx -> build/lib.macosx-10.9-x86_64-3.9/uvloop
copying uvloop/server.pxd -> build/lib.macosx-10.9-x86_64-3.9/uvloop
copying uvloop/server.pyx -> build/lib.macosx-10.9-x86_64-3.9/uvloop
copying uvloop/sslproto.pxd -> build/lib.macosx-10.9-x86_64-3.9/uvloop
copying uvloop/sslproto.pyx -> build/lib.macosx-10.9-x86_64-3.9/uvloop
creating build/lib.macosx-10.9-x86_64-3.9/uvloop/handles
copying uvloop/handles/async_.pxd -> build/lib.macosx-10.9-x86_64-3.9/uvloop/handles
copying uvloop/handles/async_.pyx -> build/lib.macosx-10.9-x86_64-3.9/uvloop/handles
copying uvloop/handles/basetransport.pxd -> build/lib.macosx-10.9-x86_64-3.9/uvloop/handles
copying uvloop/handles/basetransport.pyx -> build/lib.macosx-10.9-x86_64-3.9/uvloop/handles
copying uvloop/handles/check.pxd -> build/lib.macosx-10.9-x86_64-3.9/uvloop/handles
copying uvloop/handles/check.pyx -> build/lib.macosx-10.9-x86_64-3.9/uvloop/handles
copying uvloop/handles/fsevent.pxd -> build/lib.macosx-10.9-x86_64-3.9/uvloop/handles
copying uvloop/handles/fsevent.pyx -> build/lib.macosx-10.9-x86_64-3.9/uvloop/handles
copying uvloop/handles/handle.pxd -> build/lib.macosx-10.9-x86_64-3.9/uvloop/handles
copying uvloop/handles/handle.pyx -> build/lib.macosx-10.9-x86_64-3.9/uvloop/handles
copying uvloop/handles/idle.pxd -> build/lib.macosx-10.9-x86_64-3.9/uvloop/handles
copying uvloop/handles/idle.pyx -> build/lib.macosx-10.9-x86_64-3.9/uvloop/handles
copying uvloop/handles/pipe.pxd -> build/lib.macosx-10.9-x86_64-3.9/uvloop/handles
copying uvloop/handles/pipe.pyx -> build/lib.macosx-10.9-x86_64-3.9/uvloop/handles
copying uvloop/handles/poll.pxd -> build/lib.macosx-10.9-x86_64-3.9/uvloop/handles
copying uvloop/handles/poll.pyx -> build/lib.macosx-10.9-x86_64-3.9/uvloop/handles
copying uvloop/handles/process.pxd -> build/lib.macosx-10.9-x86_64-3.9/uvloop/handles
copying uvloop/handles/process.pyx -> build/lib.macosx-10.9-x86_64-3.9/uvloop/handles
copying uvloop/handles/stream.pxd -> build/lib.macosx-10.9-x86_64-3.9/uvloop/handles
copying uvloop/handles/stream.pyx -> build/lib.macosx-10.9-x86_64-3.9/uvloop/handles
copying uvloop/handles/streamserver.pxd -> build/lib.macosx-10.9-x86_64-3.9/uvloop/handles
copying uvloop/handles/streamserver.pyx -> build/lib.macosx-10.9-x86_64-3.9/uvloop/handles
copying uvloop/handles/tcp.pxd -> build/lib.macosx-10.9-x86_64-3.9/uvloop/handles
copying uvloop/handles/tcp.pyx -> build/lib.macosx-10.9-x86_64-3.9/uvloop/handles
copying uvloop/handles/timer.pxd -> build/lib.macosx-10.9-x86_64-3.9/uvloop/handles
copying uvloop/handles/timer.pyx -> build/lib.macosx-10.9-x86_64-3.9/uvloop/handles
copying uvloop/handles/udp.pxd -> build/lib.macosx-10.9-x86_64-3.9/uvloop/handles
copying uvloop/handles/udp.pyx -> build/lib.macosx-10.9-x86_64-3.9/uvloop/handles
creating build/lib.macosx-10.9-x86_64-3.9/uvloop/includes
copying uvloop/includes/__init__.py -> build/lib.macosx-10.9-x86_64-3.9/uvloop/includes
copying uvloop/includes/compat.h -> build/lib.macosx-10.9-x86_64-3.9/uvloop/includes
copying uvloop/includes/consts.pxi -> build/lib.macosx-10.9-x86_64-3.9/uvloop/includes
copying uvloop/includes/debug.h -> build/lib.macosx-10.9-x86_64-3.9/uvloop/includes
copying uvloop/includes/debug.pxd -> build/lib.macosx-10.9-x86_64-3.9/uvloop/includes
copying uvloop/includes/flowcontrol.pxd -> build/lib.macosx-10.9-x86_64-3.9/uvloop/includes
copying uvloop/includes/fork_handler.h -> build/lib.macosx-10.9-x86_64-3.9/uvloop/includes
copying uvloop/includes/python.pxd -> build/lib.macosx-10.9-x86_64-3.9/uvloop/includes
copying uvloop/includes/stdlib.pxi -> build/lib.macosx-10.9-x86_64-3.9/uvloop/includes
copying uvloop/includes/system.pxd -> build/lib.macosx-10.9-x86_64-3.9/uvloop/includes
copying uvloop/includes/uv.pxd -> build/lib.macosx-10.9-x86_64-3.9/uvloop/includes
running build_ext
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a race-free mkdir -p... ./install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking build system type... x86_64-apple-darwin21.1.0
checking host system type... x86_64-apple-darwin21.1.0
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether the compiler supports GNU C... yes
checking whether gcc accepts -g... yes
checking for gcc option to enable C11 features... none needed
checking whether gcc understands -c and -o together... yes
checking whether make supports the include directive... yes (GNU style)
checking dependency style of gcc... gcc3
checking for gcc way to treat warnings as errors... -Werror
checking if gcc supports __attribute__(( visibility("default") ))... yes
checking if gcc supports -fvisibility=hidden... yes
checking if gcc supports -fno-strict-aliasing flag... yes
checking if gcc supports -g flag... yes
checking if gcc supports -std=gnu89 flag... yes
checking if gcc supports -Wall flag... yes
checking if gcc supports -Wextra flag... yes
checking if gcc supports -Wno-long-long flag... yes
checking if gcc supports -Wno-unused-parameter flag... yes
checking if gcc supports -Wstrict-prototypes flag... yes
checking for ar... ar
checking the archiver (ar) interface... ar
checking how to print strings... printf
checking for a sed that does not truncate output... /usr/bin/sed
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for fgrep... /usr/bin/grep -F
checking for ld used by gcc... /Library/Developer/CommandLineTools/usr/bin/ld
checking if the linker (/Library/Developer/CommandLineTools/usr/bin/ld) is GNU ld... no
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 786432
checking how to convert x86_64-apple-darwin21.1.0 file names to x86_64-apple-darwin21.1.0 format... func_convert_file_noop
checking how to convert x86_64-apple-darwin21.1.0 file names to toolchain format... func_convert_file_noop
checking for /Library/Developer/CommandLineTools/usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for archiver @FILE support... no
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for a working dd... /bin/dd
checking how to truncate binary pipes... /bin/dd bs=4096 count=1
checking for mt... no
checking if : is a manifest tool... no
checking for dsymutil... dsymutil
checking for nmedit... nmedit
checking for lipo... lipo
checking for otool... otool
checking for otool64... no
checking for -single_module linker flag... yes
checking for -exported_symbols_list linker flag... yes
checking for -force_load linker flag... yes
checking for stdio.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for strings.h... yes
checking for sys/stat.h... yes
checking for sys/types.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... yes
checking for gcc option to produce PIC... -fno-common -DPIC
checking if gcc PIC flag -fno-common -DPIC works... yes
checking if gcc static flag -static works... no
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/Library/Developer/CommandLineTools/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... darwin21.1.0 dyld
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking whether make supports nested variables... (cached) yes
checking how to run the C preprocessor... gcc -E
checking whether gcc is Clang... yes
checking whether Clang needs flag to prevent "argument unused" warning when linking with -pthread... no
checking for joinable pthread attribute... PTHREAD_CREATE_JOINABLE
checking whether more special flags are required for pthreads... no
checking for PTHREAD_PRIO_INHERIT... yes
checking for library containing dlopen... none required
checking for library containing kstat_lookup... no
checking for library containing gethostbyname... none required
checking for library containing perfstat_cpu... no
checking for library containing clock_gettime... none required
checking for library containing sendfile... none required
checking for library containing socket... none required
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... no
checking for sys/ahafs_evProds.h... no
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating libuv.pc
config.status: executing depfiles commands
config.status: executing libtool commands
CC src/libuv_la-fs-poll.lo
CC src/libuv_la-idna.lo
CC src/libuv_la-random.lo
CC src/libuv_la-inet.lo
CC src/libuv_la-strscpy.lo
CC src/libuv_la-threadpool.lo
CC src/libuv_la-timer.lo
CC src/libuv_la-uv-data-getter-setters.lo
CC src/libuv_la-uv-common.lo
CC src/libuv_la-version.lo
CC src/unix/libuv_la-async.lo
CC src/unix/libuv_la-core.lo
CC src/unix/libuv_la-dl.lo
CC src/unix/libuv_la-fs.lo
CC src/unix/libuv_la-getaddrinfo.lo
CC src/unix/libuv_la-getnameinfo.lo
CC src/unix/libuv_la-loop-watcher.lo
CC src/unix/libuv_la-loop.lo
CC src/unix/libuv_la-pipe.lo
CC src/unix/libuv_la-poll.lo
CC src/unix/libuv_la-process.lo
CC src/unix/libuv_la-random-devurandom.lo
CC src/unix/libuv_la-signal.lo
CC src/unix/libuv_la-stream.lo
CC src/unix/libuv_la-tcp.lo
CC src/unix/libuv_la-thread.lo
CC src/unix/libuv_la-tty.lo
CC src/unix/libuv_la-udp.lo
CC src/unix/libuv_la-bsd-ifaddrs.lo
CC src/unix/libuv_la-darwin-proctitle.lo
CC src/unix/libuv_la-darwin.lo
CC src/unix/libuv_la-fsevents.lo
CC src/unix/libuv_la-kqueue.lo
CC src/unix/libuv_la-proctitle.lo
CC src/unix/libuv_la-random-getentropy.lo
CCLD libuv.la
building 'uvloop.loop' extension
creating build/temp.macosx-10.9-x86_64-3.9
creating build/temp.macosx-10.9-x86_64-3.9/uvloop
gcc -pthread -arch x86_64 -DNDEBUG -O2 -I/usr/local/opt/tcl-tk/include -fPIC -I/Volumes/Code/tools/.pyenv/versions/test/include -I/Volumes/Code/tools/.pyenv/versions/pypy3.9-7.3.11/include/pypy3.9 -I/private/var/folders/x2/9b8bb0x56snggt3fkr20xpz00000gn/T/pip-install-nmv0eyux/uvloop_e70d8699b89b4c91a3986f81626a876f/vendor/libuv/include -c uvloop/loop.c -o build/temp.macosx-10.9-x86_64-3.9/uvloop/loop.o -O2
In file included from uvloop/loop.c:767:
uvloop/includes/compat.h:74:12: error: implicit declaration of function 'PyContext_CopyCurrent' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
return PyContext_CopyCurrent();
^
uvloop/includes/compat.h:74:12: note: did you mean 'Context_CopyCurrent'?
uvloop/includes/compat.h:73:12: note: 'Context_CopyCurrent' declared here
PyObject * Context_CopyCurrent(void) {
^
uvloop/includes/compat.h:74:12: warning: incompatible integer to pointer conversion returning 'int' from a function with result type 'PyObject *' (aka 'struct _object *') [-Wint-conversion]
return PyContext_CopyCurrent();
^~~~~~~~~~~~~~~~~~~~~~~
uvloop/includes/compat.h:78:12: error: implicit declaration of function 'PyContext_Enter' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
return PyContext_Enter(ctx);
^
uvloop/includes/compat.h:78:12: note: did you mean 'Context_Enter'?
uvloop/includes/compat.h:77:5: note: 'Context_Enter' declared here
int Context_Enter(PyObject *ctx) {
^
uvloop/includes/compat.h:82:12: error: implicit declaration of function 'PyContext_Exit' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
return PyContext_Exit(ctx);
^
uvloop/includes/compat.h:82:12: note: did you mean 'Context_Exit'?
uvloop/includes/compat.h:81:5: note: 'Context_Exit' declared here
int Context_Exit(PyObject *ctx) {
^
uvloop/loop.c:108454:5: error: implicit declaration of function 'PyOS_BeforeFork' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
PyOS_BeforeFork();
^
uvloop/loop.c:108515:5: error: implicit declaration of function 'PyOS_AfterFork_Parent' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
PyOS_AfterFork_Parent();
^
uvloop/loop.c:109630:3: error: implicit declaration of function 'PyOS_AfterFork_Child' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
PyOS_AfterFork_Child();
^
1 warning and 6 errors generated.
error: command '/usr/bin/gcc' failed with exit code 1
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for uvloop
Running setup.py clean for uvloop
Failed to build uvloop
ERROR: Could not build wheels for uvloop, which is required to install pyproject.toml-based projects`
Using built-in specs.
COLLECT_GCC=gcc-12
COLLECT_LTO_WRAPPER=/usr/local/Cellar/gcc/12.2.0/bin/../libexec/gcc/x86_64-apple-darwin21/12/lto-wrapper
Target: x86_64-apple-darwin21
Configured with: ../configure --prefix=/usr/local/opt/gcc --libdir=/usr/local/opt/gcc/lib/gcc/current --disable-nls --enable-checking=release --with-gcc-major-version-only --enable-languages=c,c++,objc,obj-c++,fortran --program-suffix=-12 --with-gmp=/usr/local/opt/gmp --with-mpfr=/usr/local/opt/mpfr --with-mpc=/usr/local/opt/libmpc --with-isl=/usr/local/opt/isl --with-zstd=/usr/local/opt/zstd --with-pkgversion='Homebrew GCC 12.2.0' --with-bugurl=https://github.com/Homebrew/homebrew-core/issues --with-system-zlib --build=x86_64-apple-darwin21 --with-sysroot=/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 12.2.0 (Homebrew GCC 12.2.0)
I don't think uvloop ever worked with PyPy.
Aren't there already wheels here?
Do you see any PyPy wheels there?
I see pypi wheels there
I don't. Can you give one example of a PyPy wheel filename that you see there?
Sorry, I wasn’t aware that there was a difference.
PyPI = Python Package Index, the hosting service for Python packages. There are no "pypi wheels", they're just wheels which are just often hosted on the PyPI.
Well, there are wheels on the page I linked. Don’t know if they can be used with pypy
Those are CPython wheels, not PyPy wheels. PyPy wheels would have a specific tag like ppXX
. See the Pillow project for an example.
Can’t you build pypy wheels with cibuildwheels?
First uvloop would have to work with PyPy when installed from source.
It did work for some time, I had it in aiocoap's CI matrix. Sadly I don't have precise data on when it stopped working, because I had it disabled due to unrelated issues (I couldn't install the cryptography module on pypy for some time in that particular setup).
Same issue