Skip to content

Commit 6cb7ad4

Browse files
committed
Use pathlib as_posix()
1 parent 5f5982b commit 6cb7ad4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

flit_core/flit_core/config.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -473,7 +473,7 @@ def _license_files_from_globs(project_dir: Path, globs, warn_no_files = True):
473473
)
474474
try:
475475
files = [
476-
str(file.relative_to(project_dir)).replace(osp.sep, "/")
476+
file.relative_to(project_dir).as_posix()
477477
for file in project_dir.glob(pattern)
478478
if file.is_file()
479479
]
@@ -615,7 +615,7 @@ def read_pep621_metadata(proj, path) -> LoadedConfig:
615615
license_p = path.parent / license_f
616616
if not license_p.is_file():
617617
raise ConfigError(f"License file {license_tbl['file']} does not exist")
618-
license_f = str(license_p.relative_to(path.parent)).replace(osp.sep, "/")
618+
license_f = license_p.relative_to(path.parent).as_posix()
619619
license_files.add(license_f)
620620
elif 'text' in license_tbl:
621621
pass

0 commit comments

Comments
 (0)