-
Notifications
You must be signed in to change notification settings - Fork 618
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
setup.py --with-openmp option not compatible with PEP517 (pyproject.toml) build #1875
Comments
It doesn't seem to work with the current handling in setup.py however. Permutations of
indicating the option is ignored. |
I have found out how to use this after reading the source:
|
One can read a little bit of somewhat useful information in PEP517 -- https://peps.python.org/pep-0517/#config-settings. I tried |
I've added a note to the source on this in #1978, so I'll close this issue once that is merged. |
Not sure if it's that simple.
actually gives me a build error: $ python3.10 -m build --skip-dependency-check --no-isolation --wheel --config-setting="--global-option=--with-openmp"
* Building wheel...
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/pep517/in_process/_in_process.py", line 363, in <module>
main()
File "/usr/lib/python3/dist-packages/pep517/in_process/_in_process.py", line 345, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "/usr/lib/python3/dist-packages/pep517/in_process/_in_process.py", line 261, in build_wheel
return _build_backend().build_wheel(wheel_directory, config_settings,
File "/usr/lib/python3/dist-packages/setuptools/build_meta.py", line 230, in build_wheel
return self._build_with_temp_dir(['bdist_wheel'], '.whl',
File "/usr/lib/python3/dist-packages/setuptools/build_meta.py", line 211, in _build_with_temp_dir
sys.argv = (sys.argv[:1] + setup_command +
TypeError: can only concatenate list (not "str") to list
ERROR Backend subproccess exited when trying to invoke build_wheel The other method
appears to work in the sense that it builds successfully. But after installing the package it reports that openmp is still missing
|
|
@drew-parsons Is this still an issue for the Debian package? I'm not quite sure how to reproduce my side, but I am cutting the 4.7.1 release soon, so this would be a good time to address this if we can. |
Looks like it's resolved now (unless documentation should be updated on how to use the --with-openmp option with the new build method. I'm not sure if end users should now be using wheels builds). Both
So it's saying we should be using |
Bug Description
setup.py manages a
--with-openmp
build option to provide openmp support.pyproject.toml was introduced in QuTiP 4.6.0 to allow PEP517 build without (directly) using setup.py.
But the
--with-openmp
option that previously worked with a setup.py build does not seem to be compatible with a PEP517 build.The problem shows up in the Debian build of the qutip package. Debian provides its own tool (pybuild from the dh-python package) to manage the build of python packages. PEP517 is relatively new, so by default pybuild uses setup.py if it is available. pybuild will use PEP517 instead, if the pybuild-plugin-pyproject package is installed and pyproject.toml is available.
Without pybuild-plugin-pyproject installed, the Debian build was invoking
using setup.py and specifying
--with-openmp
. A successful build log for this method can be found at https://buildd.debian.org/status/fetch.php?pkg=qutip&arch=amd64&ver=4.6.2-3&stamp=1641397514&raw=0With pybuild-plugin-pyproject installed, the Debian build invokes a wheel build (command line given below). But
--with-openmp
causes the build to fail.Code to Reproduce the Bug
Code Output
Expected Behaviour
The PEP517 build should be able to be configured to support openmp.
Your Environment
Additional Context
PEP517 support is new for Debian. It is possible the pybuild build tool needs to be adapted to handle setup.py options like
--with-openmp
in the context of PEP517. But I've tried to pose the issue here in terms of the underlying python3 build commands without needing to consider pybuild as such.Is there a different way in which
--with-openmp
should be configured when using a PEP517 build?The text was updated successfully, but these errors were encountered: