You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since there is no fallback, this causes a NameError and a subsequent build failure
To Reproduce
Set up build environment without Cython
python -m build
Expected behavior
Succesful compilation without cython support.
Logs/tracebacks
Running command Building wheel for yarl (pyproject.toml)
**********************
* Accelerated build *
**********************
Traceback (most recent call last):
File "/nix/store/slhj69him45n2pck7wkknnffi4ay0jy0-python3.11-pip-23.2.1/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in<module>
main()
File "/nix/store/slhj69him45n2pck7wkknnffi4ay0jy0-python3.11-pip-23.2.1/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/nix/store/slhj69him45n2pck7wkknnffi4ay0jy0-python3.11-pip-23.2.1/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 251, in build_wheel
return _build_backend().build_wheel(wheel_directory, config_settings,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/nix/store/qp5zys77biz7imbk6yy85q5pdv7qk84j-python3-3.11.6/lib/python3.11/contextlib.py", line 81, in inner
return func(*args, **kwds)
^^^^^^^^^^^^^^^^^^^
File "/build/yarl-1.9.3/packaging/pep517_backend/_backend.py", line 325, in build_wheel
with maybe_prebuild_c_extensions(
File "/nix/store/qp5zys77biz7imbk6yy85q5pdv7qk84j-python3-3.11.6/lib/python3.11/contextlib.py", line 137, in__enter__returnnext(self.gen)
^^^^^^^^^^^^^^
File "/build/yarl-1.9.3/packaging/pep517_backend/_backend.py", line 304, in maybe_prebuild_c_extensions
_cythonize_cli_cmd(cythonize_args)
^^^^^^^^^^^^^^^^^^
NameError: name '_cythonize_cli_cmd' is not defined
Python Version
3.11.6
multidict Version
6.0.4
yarl Version
1.9.3
OS
NixOS 23.05
Additional context
No response
Code of Conduct
I agree to follow the aio-libs Code of Conduct
The text was updated successfully, but these errors were encountered:
If you want a pure Python build, you must request it explicitly. If you want C-extensions, provision the build env properly. Cython is injected dynamically, only when building wheels is requested (including editable installs), through the corresponding PEP 517 hook, just like wheel.
Building with pypa/build in its default mode works because it follows the PEP and calls the corresponding hooks to determine all the deps, not just the statically listed ones.
I think that there's a CLI flag for build for verifying that the current env contains all the deps. Try using that as a self-check.
Describe the bug
If cython isn't available, then the import fails but gets suppressed:
yarl/packaging/pep517_backend/_backend.py
Lines 43 to 48 in 0ca5599
However the imported function is always invoked during the build:
yarl/packaging/pep517_backend/_backend.py
Line 303 in 0ca5599
Since there is no fallback, this causes a
NameError
and a subsequent build failureTo Reproduce
python -m build
Expected behavior
Succesful compilation without cython support.
Logs/tracebacks
Python Version
3.11.6
multidict Version
6.0.4
yarl Version
1.9.3
OS
NixOS 23.05
Additional context
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: