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:
add a setup.py file, which we don't use for deployment, to ease the work of potential contributors
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 ?
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!
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 ispip install poetry
beforepip install .
Only reason I see for a setup.py file is the will to replicate development installation (as inpip install -e .
). There are two options:pip install dephell
(only once) thendephell --from=pyproject.toml --to=setup.py
. This generate the setup.py file needed to runpip install -e .
and do in-place development. Accordingly we would addsetup.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 ?