-
Notifications
You must be signed in to change notification settings - Fork 44
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
Migrate from legacy setup.py
+setup.cfg
to pyproject.toml
-based packaging
#2869
Conversation
setup.py
+setup.cfg
to pyproject.toml
setup.py
+setup.cfg
to pyproject.toml
setup.py
+setup.cfg
to pyproject.toml
-based packaging
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cool
modal_proto = ["*.proto", "py.typed", "*.pyi"] | ||
|
||
[tool.setuptools.dynamic] | ||
version = {attr = "modal_version.__version__"} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we still need modal_version
here? Seems like we could be dynamically getting the version from modal.__version__
(with that getting populated by some auto-generated file that lives under modal/
).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah we can probably eliminate the need for the separate package -- that change has a couple of touch points so I'll make it in a separate PR.
This PR updates our build system to use modern Python packaging standards by:
setup.cfg
andsetup.py
topyproject.toml
-based configurationsetuptools
direct usage to the standardized build package for creating distributionsChanges
setup.cfg
topyproject.toml
using the[project]
table formatsetup.py
in favor of dynamic version detection viapyproject.toml
(seetool.setuptools.dynamic
)pip install build
step in CI workflow to install Python's standardized build frontend: https://github.com/pypa/buildpython -m build
instead ofpython setup.py sdist bdist_wheel
All package specifications (dependencies, entry points, package data, etc.) remain functionally equivalent to the previous configuration.