Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to pyproject.toml #2405

Closed
Panaetius opened this issue Oct 12, 2021 · 2 comments · Fixed by #2471
Closed

Switch to pyproject.toml #2405

Panaetius opened this issue Oct 12, 2021 · 2 comments · Fixed by #2471
Assignees

Comments

@Panaetius
Copy link
Member

As per https://pip.pypa.io/en/stable/reference/build-system/pyproject-toml/?#fallback-behaviour setup.py is already just fallback behavior and it looks like support for pyproject.toml in pip is pretty mature right now. We've already encountered issues with #2404 and I think in the future there is a high chance of further issues as pyproject.toml becomes the standard and support for setuptools slowly becomes obsolete.

As such we should

  • update our pyproject.toml to contain all the relevant information from our setup.py, with most likely poetry as the build system
  • add config that's outside setup.py to the pyproject.toml (e.g. pytest.ini config) where possible
  • have a transitional phase where we still have setup.py, by automatically converting from poetry to setup.py using something like Dephell in a Github action.

And alternative would be to add all settings to pyproject.toml but still use setuptools as the build system (see https://setuptools.pypa.io/en/latest/build_meta.html#how-to-use-it ). This is the a bit more conservative approach.

Benefits of switching to Poetry for me are faster dependency resolution and more control over pinning packages (similar to how pipenv does it without having all the baggage pipenv has).

@Panaetius
Copy link
Member Author

We decided on switching to and trying poetry.

We probably also want a Github Action to check that poetry.lock is up to date.

@Panaetius
Copy link
Member Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant