@@ -470,7 +470,7 @@ def _handle_pth_file(path: Path) -> list[_SP]:
470470def _handle_editable_module (path : Path ) -> list [_SP ]:
471471 if _match_pattern (path .name , (* _editable_editables_patterns , * _editable_scikit_build_core_patterns )):
472472 # Support for how 'editables' write these files:
473- # example line: `F.map_module('griffe ', '/media/ data/dev/griffelib/packages/griffe/ src/griffe /__init__.py')`.
473+ # example line: `F.map_module('pkg ', '/data/dev/pkg/ src/pkg /__init__.py')`.
474474 # And how 'scikit-build-core' writes these files:
475475 # example line: `install({'griffe': '/media/data/dev/griffelib/packages/griffe/src/griffe/__init__.py'}, {'cmake_example': ...}, None, False, True)`.
476476 try :
@@ -483,7 +483,7 @@ def _handle_editable_module(path: Path) -> list[_SP]:
483483 return [_SP (new_path )]
484484 if _match_pattern (path .name , _editable_setuptools_patterns ):
485485 # Support for how 'setuptools' writes these files:
486- # example line: `MAPPING = {'griffe ': '/media/ data/dev/griffe/packages/griffelib/ src/griffe ', 'briffe ': '/media/ data/dev/griffe /src/briffe '}`.
486+ # example line: `MAPPING = {'pkg ': '/data/dev/pkg/ src/pkg ', 'pkg2 ': '/data/dev/pkg /src/pkg2 '}`.
487487 # with annotation: `MAPPING: dict[str, str] = {...}`.
488488 parsed_module = ast .parse (path .read_text (encoding = "utf8" ))
489489 for node in parsed_module .body :
@@ -508,7 +508,7 @@ def _handle_editable_module(path: Path) -> list[_SP]:
508508 and node .value .func .id == "install"
509509 and isinstance (node .value .args [1 ], ast .Constant )
510510 ):
511- build_path = Path (node .value .args [1 ].value , "packages/griffelib/ src" ) # type: ignore[arg-type]
511+ build_path = Path (node .value .args [1 ].value , "src" ) # type: ignore[arg-type]
512512 # NOTE: What if there are multiple packages?
513513 pkg_name = next (build_path .iterdir ()).name
514514 return [_SP (build_path , always_scan_for = pkg_name )]
0 commit comments