Skip to content

Commit 3736cbc

Browse files
committed
Revert to using normalized paths in develop to fix test errors
1 parent 33f3243 commit 3736cbc

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

setuptools/command/develop.py

+6-5
Original file line numberDiff line numberDiff line change
@@ -63,17 +63,18 @@ def finalize_options(self):
6363
if self.egg_path is None:
6464
self.egg_path = os.path.abspath(ei.egg_base)
6565

66-
egg_path = os.path.join(self.install_dir, self.egg_path)
67-
if not _path.same_path(egg_path, self.egg_base):
66+
target = _path.normpath(self.egg_base)
67+
egg_path = _path.normpath(os.path.join(self.install_dir, self.egg_path))
68+
if egg_path != target:
6869
raise DistutilsOptionError(
6970
"--egg-path must be a relative path from the install"
70-
f" directory to {self.egg_base}"
71+
" directory to " + target
7172
)
7273

7374
# Make a distribution for the package's source
7475
self.dist = pkg_resources.Distribution(
75-
self.egg_base,
76-
pkg_resources.PathMetadata(self.egg_base, os.path.abspath(ei.egg_info)),
76+
target,
77+
pkg_resources.PathMetadata(target, os.path.abspath(ei.egg_info)),
7778
project_name=ei.egg_name,
7879
)
7980

0 commit comments

Comments
 (0)