EconForge / interpolation.py

BSD 2-Clause "Simplified" License
123 stars 35 forks source link

Shall we keep a setup.py file ? #62

Closed albop closed 4 years ago

albop commented 4 years ago

We have moved to using a pyroject.toml file, together with poetry. This centralizes all package information (no requirements.txt, setup.py, setup.cfg, ...). If one doesn't want to use the poetry tools for development, it is still possible to install the package in a regular way by doing pip install .. This works as long as poetry is installed: according to the new standard pep517, pip will defer package building to poetry and it won't make any apparent difference. So all is needed is pip install poetry before pip install . Only reason I see for a setup.py file is the will to replicate development installation (as in pip install -e .). There are two options:

  1. add a setup.py file, which we don't use for deployment, to ease the work of potential contributors
  2. explain it's possible to generate a setup.py file for development purposes with the following workflow: pip install dephell (only once) then dephell --from=pyproject.toml --to=setup.py. This generate the setup.py file needed to run pip install -e . and do in-place development. Accordingly we would add setup.py to .gitignore. My preference goes to 2 since setup.py files are a thing of the past. @grburgess, since you raised the issue, do you think it's a satisfying solution ?
grburgess commented 4 years ago

Heh. I did not know they were a thing of the past! I will have to do some investigation into this as it looks very nice. It looks like option 2 works fro contributors so I think that will work for me as well. Thanks!