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

Plan migration from setup.py to pyproject.toml #984

Open
spjuhel opened this issue Dec 10, 2024 · 2 comments
Open

Plan migration from setup.py to pyproject.toml #984

spjuhel opened this issue Dec 10, 2024 · 2 comments

Comments

@spjuhel
Copy link
Collaborator

spjuhel commented Dec 10, 2024

Is your feature request related to a problem? Please describe.
The setup.py file is soon to be deprecated (Q1 2025), as the Python packaging ecosystem is moving towards adopting pyproject.toml as the standard for build configuration. Continuing to rely on setup.py might lead to compatibility issues with future versions of Python packaging tools and hinder best practices.

See for instance this

 DEPRECATION: Legacy editable install of climada_python[dev]==5.0.1.dev0 from [...]
 (setup.py develop) is deprecated. pip 25.0 will enforce this behaviour change. A possible replacement is to add a 
 pyproject.toml or enable --use-pep517, and use setuptools >= 64. If the resulting installation is not behaving as expected, try
 using --config-settings editable_mode=compat. Please consult the setuptools documentation for more information.
 Discussion can be found at https://github.com/pypa/pip/issues/11457

Describe the solution you'd like
Plan and execute the migration of the project from setup.py to pyproject.toml:

  1. See what needs to be migrated and how.
  2. Make sure local builds work properly.
  3. Make sure CI/CD workflows/builds work properly.

Additional context
Switching to pyproject.toml will align the project with modern packaging standards, making it more future-proof and accessible for contributors familiar with the new system.
Reference: PEP 517/518 outlines the guidelines for using pyproject.toml for build systems.

See also: https://peps.python.org/pep-0660/

Maybe consider using poetry ?

@emanuel-schmid
Copy link
Collaborator

thanks for the input. Totally agreed and already on my mental todo list for a while 😁
Will be done in any case before the next release. Promise.

@peanutfun
Copy link
Member

Might be a good opportunity to also set version limits in the pyproject.toml and not only in the conda environment specs?

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

No branches or pull requests

3 participants