Support pyproject.toml? (missing setuptools when running tests)
On my Debian bookworm system, the default python version is now 3.10. I also have python3.9 installed, so I tried running the tests against this version, but it failed:
$ tox -e py39
py39 create: /home/bjonglez/code/enoslib/.tox/py39
py39 installdeps: -r/home/bjonglez/code/enoslib/test-requirements.txt
ERROR: invocation failed (exit code 1), logfile: /home/bjonglez/code/enoslib/.tox/py39/log/py39-1.log
=============================================== log start ===============================================
Collecting flake8>=3.3.0
Using cached flake8-5.0.4-py2.py3-none-any.whl (61 kB)
Collecting pytest
Using cached pytest-7.1.3-py3-none-any.whl (298 kB)
Collecting freezegun>=1.2.1
Using cached freezegun-1.2.2-py3-none-any.whl (17 kB)
Collecting pytest-cov
Using cached pytest_cov-3.0.0-py3-none-any.whl (20 kB)
Collecting mock>=2.0.0
Using cached mock-4.0.3-py3-none-any.whl (28 kB)
Collecting ddt>=1.1.0
Using cached ddt-1.6.0-py2.py3-none-any.whl (7.1 kB)
Collecting sphinx~=4.3.0
Using cached Sphinx-4.3.2-py3-none-any.whl (3.1 MB)
Collecting pydata-sphinx-theme
Using cached pydata_sphinx_theme-0.10.1-py3-none-any.whl (1.5 MB)
Collecting autodocsumm~=0.2.0
Using cached autodocsumm-0.2.9-py3-none-any.whl (13 kB)
Collecting nbsphinx>=0.8.0
Using cached nbsphinx-0.8.9-py3-none-any.whl (25 kB)
Collecting requests[socks]
Using cached requests-2.28.1-py3-none-any.whl (62 kB)
Collecting mypy
Using cached mypy-0.971-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl (17.6 MB)
Collecting ipdb
Using cached ipdb-0.13.9.tar.gz (16 kB)
Preparing metadata (setup.py): started
Preparing metadata (setup.py): finished with status 'error'
error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [1 lines of output]
ERROR: Can not execute `setup.py` since setuptools is not available in the build environment.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed
× Encountered error while generating package metadata.
╰─> See above for output.
note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
================================================ log end ================================================
ERROR: could not install deps [-r/home/bjonglez/code/enoslib/test-requirements.txt]; v = InvocationError('/home/bjonglez/code/enoslib/.tox/py39/bin/python -m pip install -r/home/bjonglez/code/enoslib/test-requirements.txt', 1)
________________________________________________ summary ________________________________________________
ERROR: py39: could not install deps [-r/home/bjonglez/code/enoslib/test-requirements.txt]; v = InvocationError('/home/bjonglez/code/enoslib/.tox/py39/bin/python -m pip install -r/home/bjonglez/code/enoslib/test-requirements.txt', 1)
From what I understand, this is because I don't have setuptools installed for Python 3.9.
According to https://github.com/pypa/packaging-problems/issues/573 this can be solved by adding a pyproject.toml to the project.
I'm completely lost in all the Python packaging options, hence this issue: should we add a pyproject.toml project description?