Move setup requirements to pyproject.toml
Following PEP 517, we need to define the build requirements in the pyproject.toml, rather than the setup.cfg. This is generally because setup.cfg is configuration for Setuptools, but Python doesn't even know to use Setuptools unless it's declared in the pyproject.toml.
Anyway, this fixes the following error that I was previously getting:
$ pip install autopxd2
Collecting autopxd2
Using cached autopxd2-2.3.0.tar.gz (22 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... error
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> [17 lines of output]
Traceback (most recent call last):
File "/home/migwell/Programming/pinnacl/venv/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
main()
File "/home/migwell/Programming/pinnacl/venv/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "/home/migwell/Programming/pinnacl/venv/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
return hook(config_settings)
File "/tmp/pip-build-env-vusnfmq9/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 325, in get_requires_for_build_wheel
return self._get_build_requires(config_settings, requirements=['wheel'])
File "/tmp/pip-build-env-vusnfmq9/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 295, in _get_build_requires
self.run_setup()
File "/tmp/pip-build-env-vusnfmq9/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 487, in run_setup
super().run_setup(setup_script=setup_script)
File "/tmp/pip-build-env-vusnfmq9/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 311, in run_setup
exec(code, locals())
File "<string>", line 18, in <module>
ModuleNotFoundError: No module named 'wheel'
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.
I can confirm python-autopxd2 currently doesn't compile with python 3.12, and this PR fix the issue ;-)
@multimeric could you modify the CI file (.githib/workflows/test.yml) to add Python 3.12 (and also remove 3.7 since it has reached end of life)
@elijahr are you able to merge this PR ? If you need help on maintaining this repo I can help ^^
I did not see this PR!
@touilleMan sure, I could definitely use some help maintaining. I'll add you. Thanks for offering! I won't merge this, sounds like we are still waiting on some changes.
@elijahr can you re-send the invitation ? I was too slow and noticing it :disappointed:
@touilleMan I have re-sent the invitation
This is finally merge, thank you @multimeric ;-)
@elijahr I had to tweak a bit the CI given lintball didn't provide a way to specify which version of black to use. I've also opened PR #42 to that we can upload a wheel in pypi (and given the project contains only python code, the wheel is compatible with all platforms)
I'm planning on merging PR 42, then release a new version 2.4.0 of the project, do you agree ?
@touilleMan that sounds great!