File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -271,10 +271,11 @@ def _get_internal_depends(self) -> Iterator[str]:
271271 depends = (dep for ext in self .extensions for dep in ext .depends )
272272 for dep in depends :
273273 try :
274- path = os .path .abspath (dep )
275- rel_path = str (Path (path ).relative_to (project_root ))
276- assert ".." not in rel_path # abspath should have taken care of that
277- yield rel_path .replace (os .sep , "/" ) # POSIX-style relative paths
274+ path = os .path .abspath (os .path .join (project_root , dep ))
275+ # if dep is absolute, os.path.join will ignore project_root
276+ rel_path = Path (path ).relative_to (project_root )
277+ assert ".." not in rel_path .parts # abspath should take care of that
278+ yield rel_path .as_posix () # POSIX-style relative paths
278279 except ValueError :
279280 log .warn (f"ignoring { dep } for distribution: outside of project dir" )
280281
You can’t perform that action at this time.
0 commit comments