We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ddd6d2f commit c972f45Copy full SHA for c972f45
repo2docker/buildpacks/pyproject/__init__.py
@@ -135,5 +135,14 @@ def detect(self):
135
return False
136
137
pyproject_file = self.binder_path("pyproject.toml")
138
+ with open(pyproject_file, "rb") as _pyproject_file:
139
+ pyproject_toml = tomllib.load(_pyproject_file)
140
+
141
+ if (
142
+ ("project" in pyproject_toml)
143
+ and ("build-system" in pyproject_toml)
144
+ and ("requires" in pyproject_toml["build-system"])
145
+ ):
146
+ return os.path.exists(pyproject_file)
147
- return os.path.exists(pyproject_file)
148
+ return False
0 commit comments