[Bug 272618] devel/py-maturin: command name is wrong for non-default python versions
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 20 Jul 2023 11:47:45 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=272618 Bug ID: 272618 Summary: devel/py-maturin: command name is wrong for non-default python versions Product: Ports & Packages Version: Latest Hardware: Any OS: Any Status: New Severity: Affects Some People Priority: --- Component: Individual Port(s) Assignee: kai@FreeBSD.org Reporter: jcfyecrayz@liamekaens.com Assignee: kai@FreeBSD.org Flags: maintainer-feedback?(kai@FreeBSD.org) Created attachment 243501 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=243501&action=edit [patch] fix 'maturin' command name referenced in __init__.py for any python flavor If devel/py-maturin is built for a non-default python flavor (e.g., 'make FLAVOR=py38'), the port installs bin/maturin-<ver> and does not install bin/maturin. This is normal and expected. The site-packages/maturin/__init__.py file, however, explicitly defines the command to use as 'maturin'. Because of this when using maturin to build other ports, they can fail with "No such file or directory: 'maturin'". For instance, 'make -C devel/py-rpds-py FLAVOR=py38' (assuming that the current default python of 3.9 has not been overridden to 3.8) gives the following error: ============= ===> Building for py38-rpds-py-0.7.1_1 starting pep517 build cd /z1/local/users/jhein/.nobak/wd/usr/ports/devel/py-rpds-py/work-py38/rpds_py-0.7.1 && /usr/bin/env XDG_DATA_HOME=/z1/local/users/jhei> * Getting build dependencies for wheel... * Building wheel... Running `maturin pep517 build-wheel -i /usr/local/bin/python3.8 --compatibility off` Traceback (most recent call last): File "/usr/local/lib/python3.8/site-packages/pyproject_hooks/_in_process/_in_process.py", line 353, in <module> main() File "/usr/local/lib/python3.8/site-packages/pyproject_hooks/_in_process/_in_process.py", line 335, in main json_out['return_val'] = hook(**hook_input['kwargs']) File "/usr/local/lib/python3.8/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/local/lib/python3.8/site-packages/maturin/__init__.py", line 90, in build_wheel return _build_wheel(wheel_directory, config_settings, metadata_directory) File "/usr/local/lib/python3.8/site-packages/maturin/__init__.py", line 73, in _build_wheel result = subprocess.run(command, stdout=subprocess.PIPE) File "/usr/local/lib/python3.8/subprocess.py", line 493, in run with Popen(*popenargs, **kwargs) as process: File "/usr/local/lib/python3.8/subprocess.py", line 858, in __init__ self._execute_child(args, executable, preexec_fn, close_fds, File "/usr/local/lib/python3.8/subprocess.py", line 1720, in _execute_child raise child_exception_type(errno_num, err_msg, err_filename) FileNotFoundError: [Errno 2] No such file or directory: 'maturin' ERROR Backend subprocess exited when trying to invoke build_wheel *** Error code 1 Stop. make: stopped in /usr/ports/devel/py-rpds-py ============= Attached is a patch to change the command name to maturin-<python_ver> which will work for all flavors of python whether the version is the default or not. -- You are receiving this mail because: You are the assignee for the bug.