mirror of https://github.com/pypa/pip
Report files in original (filesystem) case
This commit is contained in:
parent
a2968978c9
commit
ab0644479f
|
@ -120,6 +120,8 @@ def compress_for_output_listing(paths):
|
|||
folders.add(os.path.dirname(path))
|
||||
files.add(path)
|
||||
|
||||
_normcased_files = set(map(os.path.normcase, files))
|
||||
|
||||
folders = compact(folders)
|
||||
|
||||
# This walks the tree using os.walk to not miss extra folders
|
||||
|
@ -130,8 +132,9 @@ def compress_for_output_listing(paths):
|
|||
if fname.endswith(".pyc"):
|
||||
continue
|
||||
|
||||
file_ = os.path.normcase(os.path.join(dirpath, fname))
|
||||
if os.path.isfile(file_) and file_ not in files:
|
||||
file_ = os.path.join(dirpath, fname)
|
||||
if (os.path.isfile(file_) and
|
||||
os.path.normcase(file_) not in _normcased_files):
|
||||
# We are skipping this file. Add it to the set.
|
||||
will_skip.add(file_)
|
||||
|
||||
|
|
|
@ -50,9 +50,9 @@ def test_compressed_listing(tmpdir):
|
|||
def in_tmpdir(paths):
|
||||
li = []
|
||||
for path in paths:
|
||||
li.append(str(os.path.normcase(
|
||||
os.path.join(tmpdir, path.replace("/", os.path.sep))
|
||||
)))
|
||||
li.append(
|
||||
str(os.path.join(tmpdir, path.replace("/", os.path.sep)))
|
||||
)
|
||||
return li
|
||||
|
||||
sample = in_tmpdir([
|
||||
|
|
Loading…
Reference in New Issue