Skip to content

Commit dd302b5

Browse files
committed
[WIP] Attempt to fix problem with cygwin
1 parent fb3dc26 commit dd302b5

File tree

1 file changed

+5
-12
lines changed

1 file changed

+5
-12
lines changed

setuptools/config/expand.py

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -243,29 +243,22 @@ def find_packages(*, namespaces=False, root_dir=None, **kwargs):
243243
where = kwargs.pop('where', ['.'])
244244
if isinstance(where, str):
245245
where = [where]
246-
target = [_nest_url_style_path(root_dir, path) for path in where]
246+
target = [_nest_path(root_dir, path) for path in where]
247247
from distutils import log
248248
log.warn(f"find_packages cwd={os.getcwd()!r} root_dir={root_dir!r}")
249249
for p in target:
250250
log.warn(f"find_packages where={p!r} {kwargs!r}")
251251
return list(chain_iter(PackageFinder.find(x, **kwargs) for x in target))
252252

253253

254-
def _nest_url_style_path(parent, path):
254+
def _nest_path(parent, path):
255255
from distutils import log
256256

257-
log.warn(f"_nest_url_style_path parent={parent!r} path={path!r}")
257+
log.warn(f"_nest_path parent={parent!r} path={path!r}"
258+
f" norm={os.path.normpath(path)!r}")
258259

259260
path = parent if path == "." else os.path.join(parent, path)
260-
return _url_style_path(path)
261-
262-
263-
def _url_style_path(path):
264-
from distutils import log
265-
266-
parts = Path(os.path.normpath(path)).parts
267-
log.warn(f"_url_style_path parts={parts!r}")
268-
return "/".join(parts) or "."
261+
return os.path.normpath(path)
269262

270263

271264
def version(value):

0 commit comments

Comments
 (0)