yarl: Trying to build a wheel of YARL with the command `python -m build --wheel` issued at the root returns an error from `_backend.py`

Describe the bug

Using Python 3.9.18

So, if I navigate to the root of the yarl directory and issue the command python -m build --wheel, I get the following:

python -m build --wheel

Creating virtualenv isolated environment...
Installing packages in isolated environment... (expandvars, setuptools >= 47, tomli; python_version < '3.11')
Getting build dependencies for wheel...
running egg_info
writing yarl.egg-info/PKG-INFO
writing dependency_links to yarl.egg-info/dependency_links.txt
writing requirements to yarl.egg-info/requires.txt
writing top-level names to yarl.egg-info/top_level.txt
reading manifest file 'yarl.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no previously-included files matching '.cache' found anywhere in distribution
warning: no previously-included files found matching 'yarl/.c'
warning: no previously-included files found matching 'yarl/.html'
warning: no previously-included files found matching 'yarl/.so'
warning: no previously-included files found matching 'yarl/*.pyd'
no previously-included directories found matching 'docs/_build'
adding license file 'LICENSE'
adding license file 'NOTICE'
writing manifest file 'yarl.egg-info/SOURCES.txt'
Installing packages in isolated environment... (Cython, wheel)
Building wheel...
Accelerated build *
**Traceback (most recent call last):
File "/{venv_home}/env/lib64/python3.9/site-packages/pyproject_hooks/_in_process/_in_process.py", line 353, in
main()
File "/{venv_home}/env/lib64/python3.9/site-packages/pyproject_hooks/_in_process/_in_process.py", line 335, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "/{venv_home}/env/lib64/python3.9/site-packages/pyproject_hooks/_in_process/_in_process.py", line 251, in build_wheel
return _build_backend().build_wheel(wheel_directory, config_settings,
File "/usr/lib64/python3.9/contextlib.py", line 79, in inner
return func(*args, **kwds)
File "/tmp/py_dependencies/yarl-1.9.4/packaging/pep517_backend/_backend.py", line 287, in build_wheel
with maybe_prebuild_c_extensions(
File "/usr/lib64/python3.9/contextlib.py", line 119, in enter
return next(self.gen)
File "/tmp/py_dependencies/yarl-1.9.4/packaging/pep517_backend/_backend.py", line 266, in maybe_prebuild_c_extensions
_cythonize_cli_cmd(cythonize_args)
NameError: name '_cythonize_cli_cmd' is not defined

ERROR Backend subprocess exited when trying to invoke build_wheel**

The same thing happens if I try with building a wheel using frozenlist-1.4.1

To Reproduce

See above

Expected behavior

The wheel is built successfully.

Logs/tracebacks

Traceback (most recent call last):
File "/{venv_home}/env/lib64/python3.9/site-packages/pyproject_hooks/_in_process/_in_process.py", line 353, in
main()
File "/{venv_home}/env/lib64/python3.9/site-packages/pyproject_hooks/_in_process/_in_process.py", line 335, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "/{venv_home}/env/lib64/python3.9/site-packages/pyproject_hooks/_in_process/_in_process.py", line 251, in build_wheel
return _build_backend().build_wheel(wheel_directory, config_settings,
File "/usr/lib64/python3.9/contextlib.py", line 79, in inner
return func(*args, **kwds)
File "/tmp/py_dependencies/yarl-1.9.4/packaging/pep517_backend/_backend.py", line 287, in build_wheel
with maybe_prebuild_c_extensions(
File "/usr/lib64/python3.9/contextlib.py", line 119, in enter
return next(self.gen)
File "/tmp/py_dependencies/yarl-1.9.4/packaging/pep517_backend/_backend.py", line 266, in maybe_prebuild_c_extensions
_cythonize_cli_cmd(cythonize_args)
NameError: name '_cythonize_cli_cmd' is not defined

ERROR Backend subprocess exited when trying to invoke build_wheel

Python Version

Python 3.9.18

multidict Version

Name: multidict
Version: 6.0.5
Summary: multidict implementation
Home-page: https://github.com/aio-libs/multidict
Author: Andrew Svetlov
Author-email: andrew.svetlov@gmail.com
License: Apache 2
Location: /{venv_home}/env/lib/python3.9/site-packages
Requires:
Required-by:

yarl Version

Name: yarl
Version: 1.9.4
Summary: Yet another URL library
Home-page: https://github.com/aio-libs/yarl
Author: Andrew Svetlov
Author-email: andrew.svetlov@gmail.com
License: Apache-2.0
Location: /{venv_home}/env/lib/python3.9/site-packages
Requires: idna, multidict
Required-by:

OS

NAME="Red Hat Enterprise Linux"
VERSION="9.3 (Plow)"
ID="rhel"
ID_LIKE="fedora"
VERSION_ID="9.3"
PLATFORM_ID="platform:el9"
PRETTY_NAME="Red Hat Enterprise Linux 9.3 (Plow)"
ANSI_COLOR="0;31"
LOGO="fedora-logo-icon"
CPE_NAME="cpe:/o:redhat:enterprise_linux:9::baseos"
HOME_URL="https://www.redhat.com/"
DOCUMENTATION_URL="https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/9"
BUG_REPORT_URL="https://bugzilla.redhat.com/"

REDHAT_BUGZILLA_PRODUCT="Red Hat Enterprise Linux 9"
REDHAT_BUGZILLA_PRODUCT_VERSION=9.3
REDHAT_SUPPORT_PRODUCT="Red Hat Enterprise Linux"
REDHAT_SUPPORT_PRODUCT_VERSION="9.3"

Additional context

No response

Code of Conduct

  • I agree to follow the aio-libs Code of Conduct

About this issue

  • Original URL
  • State: open
  • Created 4 months ago
  • Comments: 18 (6 by maintainers)

Most upvoted comments

I got the build from PyPi: https://pypi.org/project/yarl/.

I mean, where did you get the python -m build command from, how did you install the build package, not how you build yarl. (It’s hard to use build as the project name in a sentence.)