nuclear-multimessenger-astronomy / nmma

A pythonic library for probing nuclear physics and cosmology with multimessenger analysis
https://nuclear-multimessenger-astronomy.github.io/nmma/
GNU General Public License v3.0
30 stars 58 forks source link

setup.py call deprecated? #241

Closed tylerbarna closed 1 year ago

tylerbarna commented 1 year ago

I noticed that running python setup.py install raises two warning messages at the start regarding this being deprecated:

(nmma_env) [tbarna@login02 nmma]$ python setup.py install
Confirmed Python version 3.10.13 >= 3.8.0
running install
/home/tbarna/.conda/envs/nmma_env/lib/python3.10/site-packages/setuptools/_distutils/cmd.py:66: SetuptoolsDeprecationWarning: setup.py install is deprecated.
!!

        ********************************************************************************
        Please avoid running ``setup.py`` directly.
        Instead, use pypa/build, pypa/installer or other
        standards-based tools.

        See https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html for details.
        ********************************************************************************

!!
  self.initialize_options()
/home/tbarna/.conda/envs/nmma_env/lib/python3.10/site-packages/setuptools/_distutils/cmd.py:66: EasyInstallDeprecationWarning: easy_install command is deprecated.
!!

        ********************************************************************************
        Please avoid running ``setup.py`` and ``easy_install``.
        Instead, use pypa/build, pypa/installer or other
        standards-based tools.

        See https://github.com/pypa/setuptools/issues/917 for details.
        ********************************************************************************

!!
  self.initialize_options()

Is this something we should care about?

mcoughlin commented 1 year ago

@tylerbarna pip install -e . also works. What do you think @sahiljhawar ?

sahiljhawar commented 1 year ago

Since setuptools deprecated the use of setup.py, the error is shown. setuptools still work in legacy mode but as for future proofing we should definitely move to pyproject.toml based packaging. Yes, pip instal ... works and it will continue to work locally even with the later, the benefit would be regarding the distribution, installing the dependencies. I think even Python 3.11 or 3.12 is phasing out setuptools (and distutils) more rigorously.