Skip to content

Commit

Permalink
Migrate from legacy setup.py+setup.cfg to pyproject.toml-based …
Browse files Browse the repository at this point in the history
…packaging (#2869)
  • Loading branch information
devennavani authored Feb 14, 2025
1 parent 6a284ac commit 8736584
Show file tree
Hide file tree
Showing 4 changed files with 59 additions and 76 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -202,10 +202,13 @@ jobs:

- name: Build type stubs
run: inv type-stubs

- name: Install build
run: pip install build

- name: Build package distributions (wheel and source)
run: |
python setup.py sdist bdist_wheel
python -m build
- name: Upload to PyPI
env:
Expand Down
55 changes: 55 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,61 @@
requires = ["setuptools", "wheel"]
build-backend = "setuptools.build_meta"

[project]
name = "modal"
description = "Python client library for Modal"
readme = "README.md"
dynamic = ["version"]
requires-python = ">=3.9"
license = {text = "Apache-2.0"}

authors = [
{ name = "Modal Labs", email = "[email protected]" }
]
dependencies = [
"aiohttp",
"certifi",
"click>=8.1.0",
"fastapi",
"grpclib==0.4.7",
"protobuf>=3.19,<6.0,!=4.24.0",
"rich>=12.0.0",
"synchronicity~=0.9.10",
"toml",
"typer>=0.9",
"types-certifi",
"types-toml",
"watchfiles",
"typing_extensions~=4.6"
]
keywords = ["modal", "client", "cloud", "serverless", "infrastructure"]
classifiers = [
"Topic :: System :: Distributed Computing",
"Operating System :: OS Independent",
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python :: 3"
]

[project.urls]
Homepage = "https://modal.com"
Source = "https://github.com/modal-labs/modal-client"
Documentation = "https://modal.com/docs"
"Issue Tracker" = "https://github.com/modal-labs/modal-client/issues"

[project.scripts]
modal = "modal.__main__:main"

[tool.setuptools.packages.find]
include = ["modal", "modal.*", "modal_version", "modal_proto"]
exclude = ["test*", "modal_docs", "modal_global_objects"]

[tool.setuptools.package-data]
modal = ["requirements/*.md", "requirements/*.txt", "requirements/*.json", "py.typed", "*.pyi"]
modal_proto = ["*.proto", "py.typed", "*.pyi"]

[tool.setuptools.dynamic]
version = {attr = "modal_version.__version__"}

[tool.mypy]
python_version = "3.11"
exclude = "build"
Expand Down
57 changes: 0 additions & 57 deletions setup.cfg

This file was deleted.

18 changes: 0 additions & 18 deletions setup.py

This file was deleted.

0 comments on commit 8736584

Please sign in to comment.