ebresie / python4nb

This is a Python Plugin for Netbeans.
Apache License 2.0
13 stars 1 forks source link

Support setup.cfg and. setup.py project cases #42

Open ebresie opened 1 year ago

ebresie commented 1 year ago

Need to support package/project setup leveraging setup.cfg and/or setup.py method. More emphasis is on pyproject.toml but this will allow "legacy" or "setup" cases sypport.

For additional details see

ebresie commented 1 year ago

From https://www.reddit.com/r/learnpython/comments/yqq551/comment/ivpl7rj/?utm_source=share&utm_medium=web2x&context=3

pyproject.toml is the new standardized format to describe project metadata declaratively, introduced with PEP 621 . It's easier to work with and allows for shared configuration between different tools.

setup.py is the old de facto standard for packaging. Its main downside is that it requires you to run arbitrary, possibly untrusted Python code to even figure out what the project you're dealing with is and how to build it.

setup.cfg is a convenience feature in setuptools, the library usually used for writing setup.py files, which allows for a more declarative format, but still requires a setup.py even if it just calls one function.

ebresie commented 1 year ago

Either part of this or a separate issue, need to consider support for "requirements.txt" which is used by setuptools to provide details on dependency management. This may need to be handled at a different level as some things like setup.cfg also provides some dependency management.

"install these dependencies (normally in a virtual environment) through pip using the following command: pip install -r requirements.txt" (1)

References

  1. https://towardsdatascience.com/requirements-vs-setuptools-python-ae3ee66e28af
  2. https://towardsdatascience.com/setuptools-python-571e7d5500f2