MagicStack / uvloop

Ultra fast asyncio event loop.
Apache License 2.0
10.42k stars 544 forks source link

uvloop fails build on python 3.13.0-slim-bookworm #632

Closed PabloExperimental closed 1 month ago

PabloExperimental commented 1 month ago

Dockerfile

FROM python:3.13-slim-bookworm

# test uvloop
ENV PYTHONASYNCIODEBUG=1

...

RUN apt-get update

RUN pip install hypercorn uvloop

Output:

9.087 Building wheels for collected packages: uvloop
9.090   Building wheel for uvloop (pyproject.toml): started
10.51   Building wheel for uvloop (pyproject.toml): finished with status 'error'
10.53   error: subprocess-exited-with-error
10.53
10.53   × Building wheel for uvloop (pyproject.toml) did not run successfully.
10.53   │ exit code: 1
10.53   ╰─> [260 lines of output]
10.53       running bdist_wheel
10.53       running build
10.53       running build_py
10.53       creating build/lib.linux-x86_64-cpython-313/uvloop
10.53       copying uvloop/__init__.py -> build/lib.linux-x86_64-cpython-313/uvloop
10.53       copying uvloop/_noop.py -> build/lib.linux-x86_64-cpython-313/uvloop
10.53       copying uvloop/_testbase.py -> build/lib.linux-x86_64-cpython-313/uvloop
10.53       copying uvloop/_version.py -> build/lib.linux-x86_64-cpython-313/uvloop
10.53       running egg_info
10.53       writing uvloop.egg-info/PKG-INFO
10.53       writing dependency_links to uvloop.egg-info/dependency_links.txt
10.53       writing requirements to uvloop.egg-info/requires.txt
10.53       writing top-level names to uvloop.egg-info/top_level.txt
10.53       reading manifest file 'uvloop.egg-info/SOURCES.txt'
10.53       reading manifest template 'MANIFEST.in'
10.53       warning: no previously-included files matching '*' found under directory 'vendor/libuv/.git'
10.53       warning: no previously-included files matching '*' found under directory 'vendor/libuv/docs'
10.53       warning: no previously-included files matching '*' found under directory 'vendor/libuv/img'
10.53       adding license file 'LICENSE-APACHE'
10.53       adding license file 'LICENSE-MIT'
10.53       writing manifest file 'uvloop.egg-info/SOURCES.txt'
10.53       /tmp/pip-build-env-p884ry20/overlay/lib/python3.13/site-packages/setuptools/command/build_py.py:218: _Warning: Package 'uvloop.handles' is absent from the `packages` configuration.
10.53       !!
10.53
10.53               ********************************************************************************
10.53               ############################
10.53               # Package would be ignored #
10.53               ############################
10.53               Python recognizes 'uvloop.handles' as an importable package[^1],
10.53               but it is absent from setuptools' `packages` configuration.
10.53
10.53               This leads to an ambiguous overall configuration. If you want to distribute this
10.53               package, please make sure that 'uvloop.handles' is explicitly added
10.53               to the `packages` configuration field.
10.53
10.53               Alternatively, you can also rely on setuptools' discovery methods
10.53               (for example by using `find_namespace_packages(...)`/`find_namespace:`
10.53               instead of `find_packages(...)`/`find:`).
10.53
10.53               You can read more about "package discovery" on setuptools documentation page:
10.53
10.53               - https://setuptools.pypa.io/en/latest/userguide/package_discovery.html
10.53
10.53               If you don't want 'uvloop.handles' to be distributed and are
10.53               already explicitly excluding 'uvloop.handles' via
10.53               `find_namespace_packages(...)/find_namespace` or `find_packages(...)/find`,
10.53               you can try to use `exclude_package_data`, or `include-package-data=False` in
10.53               combination with a more fine grained `package-data` configuration.
10.53
10.53               You can read more about "package data files" on setuptools documentation page:
10.53
10.53               - https://setuptools.pypa.io/en/latest/userguide/datafiles.html
10.53
10.53
10.53               [^1]: For Python, any directory (with suitable naming) can be imported,
10.53                     even if it does not contain any `.py` files.
10.53                     On the other hand, currently there is no concept of package data
10.53                     directory, all directories are treated like packages.
10.53               ********************************************************************************
10.53
10.53       !!
10.53         check.warn(importable)
10.53       /tmp/pip-build-env-p884ry20/overlay/lib/python3.13/site-packages/setuptools/command/build_py.py:218: _Warning: Package 'uvloop.includes' is absent from the `packages` configuration.
10.53       !!
10.53
10.53               ********************************************************************************
10.53               ############################
10.53               # Package would be ignored #
10.53               ############################
10.53               Python recognizes 'uvloop.includes' as an importable package[^1],
10.53               but it is absent from setuptools' `packages` configuration.
10.53
10.53               This leads to an ambiguous overall configuration. If you want to distribute this
10.53               package, please make sure that 'uvloop.includes' is explicitly added
10.53               to the `packages` configuration field.
10.53
10.53               Alternatively, you can also rely on setuptools' discovery methods
10.53               (for example by using `find_namespace_packages(...)`/`find_namespace:`
10.53               instead of `find_packages(...)`/`find:`).
10.53
10.53               You can read more about "package discovery" on setuptools documentation page:
10.53
10.53               - https://setuptools.pypa.io/en/latest/userguide/package_discovery.html
10.53
10.53               If you don't want 'uvloop.includes' to be distributed and are
10.53               already explicitly excluding 'uvloop.includes' via
10.53               `find_namespace_packages(...)/find_namespace` or `find_packages(...)/find`,
10.53               you can try to use `exclude_package_data`, or `include-package-data=False` in
10.53               combination with a more fine grained `package-data` configuration.
10.53
10.53               You can read more about "package data files" on setuptools documentation page:
10.53
10.53               - https://setuptools.pypa.io/en/latest/userguide/datafiles.html
10.53
10.53
10.53               [^1]: For Python, any directory (with suitable naming) can be imported,
10.53                     even if it does not contain any `.py` files.
10.53                     On the other hand, currently there is no concept of package data
10.53                     directory, all directories are treated like packages.
10.53               ********************************************************************************
10.53
10.53       !!
10.53         check.warn(importable)
10.53       copying uvloop/cbhandles.pxd -> build/lib.linux-x86_64-cpython-313/uvloop
10.53       copying uvloop/cbhandles.pyx -> build/lib.linux-x86_64-cpython-313/uvloop
10.53       copying uvloop/dns.pyx -> build/lib.linux-x86_64-cpython-313/uvloop
10.53       copying uvloop/errors.pyx -> build/lib.linux-x86_64-cpython-313/uvloop
10.53       copying uvloop/loop.pxd -> build/lib.linux-x86_64-cpython-313/uvloop
10.53       copying uvloop/loop.pyi -> build/lib.linux-x86_64-cpython-313/uvloop
10.53       copying uvloop/loop.pyx -> build/lib.linux-x86_64-cpython-313/uvloop
10.53       copying uvloop/lru.pyx -> build/lib.linux-x86_64-cpython-313/uvloop
10.53       copying uvloop/pseudosock.pyx -> build/lib.linux-x86_64-cpython-313/uvloop
10.53       copying uvloop/py.typed -> build/lib.linux-x86_64-cpython-313/uvloop
10.53       copying uvloop/request.pxd -> build/lib.linux-x86_64-cpython-313/uvloop
10.53       copying uvloop/request.pyx -> build/lib.linux-x86_64-cpython-313/uvloop
10.53       copying uvloop/server.pxd -> build/lib.linux-x86_64-cpython-313/uvloop
10.53       copying uvloop/server.pyx -> build/lib.linux-x86_64-cpython-313/uvloop
10.53       copying uvloop/sslproto.pxd -> build/lib.linux-x86_64-cpython-313/uvloop
10.53       copying uvloop/sslproto.pyx -> build/lib.linux-x86_64-cpython-313/uvloop
10.53       creating build/lib.linux-x86_64-cpython-313/uvloop/handles
10.53       copying uvloop/handles/async_.pxd -> build/lib.linux-x86_64-cpython-313/uvloop/handles
10.53       copying uvloop/handles/async_.pyx -> build/lib.linux-x86_64-cpython-313/uvloop/handles
10.53       copying uvloop/handles/basetransport.pxd -> build/lib.linux-x86_64-cpython-313/uvloop/handles
10.53       copying uvloop/handles/basetransport.pyx -> build/lib.linux-x86_64-cpython-313/uvloop/handles
10.53       copying uvloop/handles/check.pxd -> build/lib.linux-x86_64-cpython-313/uvloop/handles
10.53       copying uvloop/handles/check.pyx -> build/lib.linux-x86_64-cpython-313/uvloop/handles
10.53       copying uvloop/handles/fsevent.pxd -> build/lib.linux-x86_64-cpython-313/uvloop/handles
10.53       copying uvloop/handles/fsevent.pyx -> build/lib.linux-x86_64-cpython-313/uvloop/handles
10.53       copying uvloop/handles/handle.pxd -> build/lib.linux-x86_64-cpython-313/uvloop/handles
10.53       copying uvloop/handles/handle.pyx -> build/lib.linux-x86_64-cpython-313/uvloop/handles
10.53       copying uvloop/handles/idle.pxd -> build/lib.linux-x86_64-cpython-313/uvloop/handles
10.53       copying uvloop/handles/idle.pyx -> build/lib.linux-x86_64-cpython-313/uvloop/handles
10.53       copying uvloop/handles/pipe.pxd -> build/lib.linux-x86_64-cpython-313/uvloop/handles
10.53       copying uvloop/handles/pipe.pyx -> build/lib.linux-x86_64-cpython-313/uvloop/handles
10.53       copying uvloop/handles/poll.pxd -> build/lib.linux-x86_64-cpython-313/uvloop/handles
10.53       copying uvloop/handles/poll.pyx -> build/lib.linux-x86_64-cpython-313/uvloop/handles
10.53       copying uvloop/handles/process.pxd -> build/lib.linux-x86_64-cpython-313/uvloop/handles
10.53       copying uvloop/handles/process.pyx -> build/lib.linux-x86_64-cpython-313/uvloop/handles
10.53       copying uvloop/handles/stream.pxd -> build/lib.linux-x86_64-cpython-313/uvloop/handles
10.53       copying uvloop/handles/stream.pyx -> build/lib.linux-x86_64-cpython-313/uvloop/handles
10.53       copying uvloop/handles/streamserver.pxd -> build/lib.linux-x86_64-cpython-313/uvloop/handles
10.53       copying uvloop/handles/streamserver.pyx -> build/lib.linux-x86_64-cpython-313/uvloop/handles
10.53       copying uvloop/handles/tcp.pxd -> build/lib.linux-x86_64-cpython-313/uvloop/handles
10.53       copying uvloop/handles/tcp.pyx -> build/lib.linux-x86_64-cpython-313/uvloop/handles
10.53       copying uvloop/handles/timer.pxd -> build/lib.linux-x86_64-cpython-313/uvloop/handles
10.53       copying uvloop/handles/timer.pyx -> build/lib.linux-x86_64-cpython-313/uvloop/handles
10.53       copying uvloop/handles/udp.pxd -> build/lib.linux-x86_64-cpython-313/uvloop/handles
10.53       copying uvloop/handles/udp.pyx -> build/lib.linux-x86_64-cpython-313/uvloop/handles
10.53       creating build/lib.linux-x86_64-cpython-313/uvloop/includes
10.53       copying uvloop/includes/__init__.py -> build/lib.linux-x86_64-cpython-313/uvloop/includes
10.53       copying uvloop/includes/consts.pxi -> build/lib.linux-x86_64-cpython-313/uvloop/includes
10.53       copying uvloop/includes/debug.pxd -> build/lib.linux-x86_64-cpython-313/uvloop/includes
10.53       copying uvloop/includes/flowcontrol.pxd -> build/lib.linux-x86_64-cpython-313/uvloop/includes
10.53       copying uvloop/includes/python.pxd -> build/lib.linux-x86_64-cpython-313/uvloop/includes
10.53       copying uvloop/includes/stdlib.pxi -> build/lib.linux-x86_64-cpython-313/uvloop/includes
10.53       copying uvloop/includes/system.pxd -> build/lib.linux-x86_64-cpython-313/uvloop/includes
10.53       copying uvloop/includes/uv.pxd -> build/lib.linux-x86_64-cpython-313/uvloop/includes
10.53       running build_ext
10.53       checking for a BSD-compatible install... /usr/bin/install -c
10.53       checking whether build environment is sane... yes
10.53       checking for a race-free mkdir -p... /usr/bin/mkdir -p
10.53       checking for gawk... no
10.53       checking for mawk... mawk
10.53       checking whether make sets $(MAKE)... no
10.53       checking whether make supports nested variables... no
10.53       checking whether to enable maintainer-specific portions of Makefiles... yes
10.53       checking build system type... x86_64-pc-linux-gnu
10.53       checking host system type... x86_64-pc-linux-gnu
10.53       checking for gcc... no
10.53       checking for cc... no
10.53       checking for cl.exe... no
10.53       checking for clang... no
10.53       configure: error: in `/tmp/pip-install-ij5ctjfg/uvloop_ed6d945814364667ab391c473f704b5c/build/libuv-x86_64':
10.53       configure: error: no acceptable C compiler found in $PATH
10.53       See `config.log' for more details
10.53       Traceback (most recent call last):
10.53         File "/usr/local/lib/python3.13/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
10.53           main()
10.53           ~~~~^^
10.53         File "/usr/local/lib/python3.13/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
10.53           json_out['return_val'] = hook(**hook_input['kwargs'])
10.53                                    ~~~~^^^^^^^^^^^^^^^^^^^^^^^^
10.53         File "/usr/local/lib/python3.13/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 251, in build_wheel
10.53           return _build_backend().build_wheel(wheel_directory, config_settings,
10.53                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
10.53                                               metadata_directory)
10.53                                               ^^^^^^^^^^^^^^^^^^^
10.53         File "/tmp/pip-build-env-p884ry20/overlay/lib/python3.13/site-packages/setuptools/build_meta.py", line 421, in build_wheel
10.53           return self._build_with_temp_dir(
10.53                  ~~~~~~~~~~~~~~~~~~~~~~~~~^
10.53               ['bdist_wheel'],
10.53               ^^^^^^^^^^^^^^^^
10.53           ...<3 lines>...
10.53               self._arbitrary_args(config_settings),
10.53               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
10.53           )
10.53           ^
10.53         File "/tmp/pip-build-env-p884ry20/overlay/lib/python3.13/site-packages/setuptools/build_meta.py", line 403, in _build_with_temp_dir
10.53           self.run_setup()
10.53           ~~~~~~~~~~~~~~^^
10.53         File "/tmp/pip-build-env-p884ry20/overlay/lib/python3.13/site-packages/setuptools/build_meta.py", line 318, in run_setup
10.53           exec(code, locals())
10.53           ~~~~^^^^^^^^^^^^^^^^
10.53         File "<string>", line 237, in <module>
10.53         File "/tmp/pip-build-env-p884ry20/overlay/lib/python3.13/site-packages/setuptools/__init__.py", line 117, in setup
10.53           return distutils.core.setup(**attrs)
10.53                  ~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
10.53         File "/tmp/pip-build-env-p884ry20/overlay/lib/python3.13/site-packages/setuptools/_distutils/core.py", line 183, in setup
10.53           return run_commands(dist)
10.53         File "/tmp/pip-build-env-p884ry20/overlay/lib/python3.13/site-packages/setuptools/_distutils/core.py", line 199, in run_commands
10.53           dist.run_commands()
10.53           ~~~~~~~~~~~~~~~~~^^
10.53         File "/tmp/pip-build-env-p884ry20/overlay/lib/python3.13/site-packages/setuptools/_distutils/dist.py", line 954, in run_commands
10.53           self.run_command(cmd)
10.53           ~~~~~~~~~~~~~~~~^^^^^
10.53         File "/tmp/pip-build-env-p884ry20/overlay/lib/python3.13/site-packages/setuptools/dist.py", line 950, in run_command
10.53           super().run_command(command)
10.53           ~~~~~~~~~~~~~~~~~~~^^^^^^^^^
10.53         File "/tmp/pip-build-env-p884ry20/overlay/lib/python3.13/site-packages/setuptools/_distutils/dist.py", line 973, in run_command
10.53           cmd_obj.run()
10.53           ~~~~~~~~~~~^^
10.53         File "/tmp/pip-build-env-p884ry20/overlay/lib/python3.13/site-packages/setuptools/command/bdist_wheel.py", line 398, in run
10.53           self.run_command("build")
10.53           ~~~~~~~~~~~~~~~~^^^^^^^^^
10.53         File "/tmp/pip-build-env-p884ry20/overlay/lib/python3.13/site-packages/setuptools/_distutils/cmd.py", line 316, in run_command
10.53           self.distribution.run_command(command)
10.53           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
10.53         File "/tmp/pip-build-env-p884ry20/overlay/lib/python3.13/site-packages/setuptools/dist.py", line 950, in run_command
10.53           super().run_command(command)
10.53           ~~~~~~~~~~~~~~~~~~~^^^^^^^^^
10.53         File "/tmp/pip-build-env-p884ry20/overlay/lib/python3.13/site-packages/setuptools/_distutils/dist.py", line 973, in run_command
10.53           cmd_obj.run()
10.53           ~~~~~~~~~~~^^
10.53         File "/tmp/pip-build-env-p884ry20/overlay/lib/python3.13/site-packages/setuptools/_distutils/command/build.py", line 135, in run
10.53           self.run_command(cmd_name)
10.53           ~~~~~~~~~~~~~~~~^^^^^^^^^^
10.53         File "/tmp/pip-build-env-p884ry20/overlay/lib/python3.13/site-packages/setuptools/_distutils/cmd.py", line 316, in run_command
10.53           self.distribution.run_command(command)
10.53           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
10.53         File "/tmp/pip-build-env-p884ry20/overlay/lib/python3.13/site-packages/setuptools/dist.py", line 950, in run_command
10.53           super().run_command(command)
10.53           ~~~~~~~~~~~~~~~~~~~^^^^^^^^^
10.53         File "/tmp/pip-build-env-p884ry20/overlay/lib/python3.13/site-packages/setuptools/_distutils/dist.py", line 973, in run_command
10.53           cmd_obj.run()
10.53           ~~~~~~~~~~~^^
10.53         File "/tmp/pip-build-env-p884ry20/overlay/lib/python3.13/site-packages/setuptools/command/build_ext.py", line 98, in run
10.53           _build_ext.run(self)
10.53           ~~~~~~~~~~~~~~^^^^^^
10.53         File "/tmp/pip-build-env-p884ry20/overlay/lib/python3.13/site-packages/Cython/Distutils/old_build_ext.py", line 186, in run
10.53           _build_ext.build_ext.run(self)
10.53           ~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^
10.53         File "/tmp/pip-build-env-p884ry20/overlay/lib/python3.13/site-packages/setuptools/_distutils/command/build_ext.py", line 359, in run
10.53           self.build_extensions()
10.53           ~~~~~~~~~~~~~~~~~~~~~^^
10.53         File "<string>", line 200, in build_extensions
10.53         File "<string>", line 175, in build_libuv
10.53         File "/usr/local/lib/python3.13/subprocess.py", line 577, in run
10.53           raise CalledProcessError(retcode, process.args,
10.53                                    output=stdout, stderr=stderr)
10.53       subprocess.CalledProcessError: Command '['./configure']' returned non-zero exit status 1.
10.53       [end of output]
10.53         File "<string>", line 200, in build_extensions
10.53         File "<string>", line 175, in build_libuv
10.53         File "/usr/local/lib/python3.13/subprocess.py", line 577, in run
10.53           raise CalledProcessError(retcode, process.args,
10.53                                    output=stdout, stderr=stderr)
10.53       subprocess.CalledProcessError: Command '['./configure']' returned non-zero exit status 1.
10.53       [end of output]
10.53
10.53   note: This error originates from a subprocess, and is likely not a problem with pip.
10.53 Failed to build uvloop
10.53   ERROR: Failed building wheel for uvloop
10.58 ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (uvloop)

In particular:

10.53       configure: error: no acceptable C compiler found in $PATH

I also tried to install gcc before uvloop but doesn't work.

rafaelsmf commented 1 month ago

Same thing here.

fantix commented 1 month ago

Fixed in 0.21.0 with pre-built wheels for Python 3.13.