mdmintz / pynose

pynose fixes nose to extend unittest and make testing easier
https://pypi.org/project/pynose/
GNU Lesser General Public License v2.1
14 stars 6 forks source link

Retrofit pynose with `pyproject.toml` structure #41

Closed mdmintz closed 2 months ago

mdmintz commented 2 months ago

Retrofit pynose with pyproject.toml structure.

Lots of the "cool kids" have already switched over to using pyproject.toml. Now, I'm forced to switch over due to deprecation warnings when calling "pip install -e .":

DEPRECATION: Legacy editable install of <PACKAGE> from <PACKAGE_PATH> (setup.py develop) is deprecated. pip 25.0 will enforce this behaviour change. A possible replacement is to add a pyproject.toml or enable --use-pep517, and use setuptools >= 64. If the resulting installation is not behaving as expected, try using --config-settings editable_mode=compat. Please consult the setuptools documentation for more information. Discussion can be found at https://github.com/pypa/pip/issues/11457

Python.org has instructions: https://packaging.python.org/en/latest/guides/writing-pyproject-toml/

Thankfully, pyproject.toml has a [project.dynamic] field that can auto-populate data from setup.py for the following items: ['version', 'description', 'readme', 'requires-python', 'license', 'authors', 'maintainers', 'keywords', 'classifiers', 'urls', 'scripts', 'gui-scripts', 'entry-points', 'dependencies', 'optional-dependencies']. This means that I can reuse a lot of my existing setup.py definitions when creating the pyproject.toml file.