File tree Expand file tree Collapse file tree 1 file changed +10
-9
lines changed
repo2docker/buildpacks/pyproject Expand file tree Collapse file tree 1 file changed +10
-9
lines changed Original file line number Diff line number Diff line change @@ -135,14 +135,15 @@ def detect(self):
135135 return False
136136
137137 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 )
138+ if os .path .exists (pyproject_file ):
139+ with open (pyproject_file , "rb" ) as _pyproject_file :
140+ pyproject_toml = tomllib .load (_pyproject_file )
141+
142+ if (
143+ ("project" in pyproject_toml )
144+ and ("build-system" in pyproject_toml )
145+ and ("requires" in pyproject_toml ["build-system" ])
146+ ):
147+ return os .path .exists (pyproject_file )
147148
148149 return False
You can’t perform that action at this time.
0 commit comments