summaryrefslogtreecommitdiff
path: root/setuptools/command
diff options
context:
space:
mode:
Diffstat (limited to 'setuptools/command')
-rw-r--r--setuptools/command/editable_wheel.py17
-rw-r--r--setuptools/command/test.py2
2 files changed, 14 insertions, 5 deletions
diff --git a/setuptools/command/editable_wheel.py b/setuptools/command/editable_wheel.py
index d05c3a75..d60cfbeb 100644
--- a/setuptools/command/editable_wheel.py
+++ b/setuptools/command/editable_wheel.py
@@ -294,7 +294,7 @@ class editable_wheel(Command):
msg = f"""{traceback.format_exc()}\n
If you are seeing this warning it is very likely that a setuptools
plugin or customization overrides the `{cmd_name}` command, without
- tacking into consideration how editable installs run build steps
+ taking into consideration how editable installs run build steps
starting from v64.0.0.
Plugin authors and developers relying on custom build steps are encouraged
@@ -393,7 +393,7 @@ class _StaticPth:
def __enter__(self):
msg = f"""
Editable install will be performed using .pth file to extend `sys.path` with:
- {self.path_entries!r}
+ {list(map(os.fspath, self.path_entries))!r}
"""
_logger.warning(msg + _LENIENT_WARNING)
return self
@@ -503,7 +503,11 @@ class _TopLevelFinder:
return self
def __exit__(self, _exc_type, _exc_value, _traceback):
- ...
+ msg = """\n
+ Please be careful with folders in your working directory with the same
+ name as your package as they may take precedence during imports.
+ """
+ warnings.warn(msg, InformationOnly)
def _can_symlink_files(base_dir: Path) -> bool:
@@ -551,13 +555,18 @@ def _simple_layout(
False
>>> _simple_layout(['a', 'a.b'], {"": "src", "a.b": "_ab"}, "/tmp/myproj")
False
+ >>> # Special cases, no packages yet:
+ >>> _simple_layout([], {"": "src"}, "/tmp/myproj")
+ True
+ >>> _simple_layout([], {"a": "_a", "": "src"}, "/tmp/myproj")
+ False
"""
layout = {
pkg: find_package_path(pkg, package_dir, project_dir)
for pkg in packages
}
if not layout:
- return False
+ return set(package_dir) in ({}, {""})
parent = os.path.commonpath([_parent_path(k, v) for k, v in layout.items()])
return all(
_normalize_path(Path(parent, *key.split('.'))) == _normalize_path(value)
diff --git a/setuptools/command/test.py b/setuptools/command/test.py
index 652f3e4a..8dde513c 100644
--- a/setuptools/command/test.py
+++ b/setuptools/command/test.py
@@ -118,7 +118,7 @@ class test(Command):
return list(self._test_args())
def _test_args(self):
- if not self.test_suite and sys.version_info >= (2, 7):
+ if not self.test_suite:
yield 'discover'
if self.verbose:
yield '--verbose'