Skip to content

Commit

Permalink
fix[2748]: Use setuptools to parse pyproject.toml
Browse files Browse the repository at this point in the history
  • Loading branch information
peterroelants committed Jan 12, 2025
1 parent 3c986b7 commit 41b0a7d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modal/image.py
Original file line number Diff line number Diff line change
Expand Up @@ -1146,9 +1146,9 @@ def pip_install_from_pyproject(

def build_dockerfile(version: ImageBuilderVersion) -> DockerfileSpec:
# Defer toml import so we don't need it in the container runtime environment
import toml
from setuptools.config.pyprojecttoml import read_configuration

config = toml.load(os.path.expanduser(pyproject_toml))
config = read_configuration(os.path.expanduser(pyproject_toml))

dependencies = []
if "project" not in config or "dependencies" not in config["project"]:
Expand Down

0 comments on commit 41b0a7d

Please sign in to comment.