1111KNOWN_BACKENDS : Dict [str , str ] = {
1212 "setuptools.build_meta:__legacy__" : "dowsing.setuptools:SetuptoolsReader" ,
1313 "setuptools.build_meta" : "dowsing.setuptools:SetuptoolsReader" ,
14+ "jupyter_packaging.build_api" : "dowsing.setuptools:SetuptoolsReader" ,
1415 "flit_core.buildapi" : "dowsing.flit:FlitReader" ,
1516 "flit.buildapi" : "dowsing.flit:FlitReader" ,
1617 "maturin" : "dowsing.maturin:MaturinReader" ,
@@ -26,13 +27,14 @@ def get_backend(path: Path) -> Tuple[List[str], BaseReader]:
2627 requires : List [str ] = []
2728 if pyproject .exists ():
2829 doc = tomlkit .parse (pyproject .read_text ())
29- if "build-system" in doc :
30- # 1b. include any build-system requires
31- if "requires" in doc ["build-system" ]:
32- requires .extend (doc ["build-system" ]["requires" ])
33- if "build-backend" in doc ["build-system" ]:
34- backend = doc ["build-system" ]["build-backend" ]
35- # TODO backend-path
30+ table = doc .get ("build-system" , {})
31+
32+ # 1b. include any build-system requires
33+ if "requires" in table :
34+ requires .extend (table ["requires" ])
35+ if "build-backend" in table :
36+ backend = table ["build-backend" ]
37+ # TODO backend-path
3638
3739 try :
3840 backend_path = KNOWN_BACKENDS [backend ]
0 commit comments