Skip to content

Commit

Permalink
[WIP] Attempt to fix problem with cygwin
Browse files Browse the repository at this point in the history
  • Loading branch information
abravalheri committed Dec 21, 2021
1 parent fb3dc26 commit dd302b5
Showing 1 changed file with 5 additions and 12 deletions.
17 changes: 5 additions & 12 deletions setuptools/config/expand.py
Expand Up @@ -243,29 +243,22 @@ def find_packages(*, namespaces=False, root_dir=None, **kwargs):
where = kwargs.pop('where', ['.'])
if isinstance(where, str):
where = [where]
target = [_nest_url_style_path(root_dir, path) for path in where]
target = [_nest_path(root_dir, path) for path in where]
from distutils import log
log.warn(f"find_packages cwd={os.getcwd()!r} root_dir={root_dir!r}")
for p in target:
log.warn(f"find_packages where={p!r} {kwargs!r}")
return list(chain_iter(PackageFinder.find(x, **kwargs) for x in target))


def _nest_url_style_path(parent, path):
def _nest_path(parent, path):
from distutils import log

log.warn(f"_nest_url_style_path parent={parent!r} path={path!r}")
log.warn(f"_nest_path parent={parent!r} path={path!r}"
f" norm={os.path.normpath(path)!r}")

path = parent if path == "." else os.path.join(parent, path)
return _url_style_path(path)


def _url_style_path(path):
from distutils import log

parts = Path(os.path.normpath(path)).parts
log.warn(f"_url_style_path parts={parts!r}")
return "/".join(parts) or "."
return os.path.normpath(path)


def version(value):
Expand Down

0 comments on commit dd302b5

Please sign in to comment.