summaryrefslogtreecommitdiff
path: root/setuptools/command
diff options
context:
space:
mode:
authorSviatoslav Sydorenko <wk@sydorenko.org.ua>2020-12-31 17:54:56 +0100
committerSviatoslav Sydorenko <wk@sydorenko.org.ua>2020-12-31 18:38:48 +0100
commit7b5f8e131cdce8626c138f8815f9001214dc2541 (patch)
treebc9683d1335398ffee61f27e9b6b184522170378 /setuptools/command
parent554ded3e40f5a2f6f426569534d402aad239a199 (diff)
downloadpython-setuptools-git-7b5f8e131cdce8626c138f8815f9001214dc2541.tar.gz
Simplify `command.easy_install.expand_paths`
Diffstat (limited to 'setuptools/command')
-rw-r--r--setuptools/command/easy_install.py19
1 files changed, 12 insertions, 7 deletions
diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py
index df7b1d07..6882efe0 100644
--- a/setuptools/command/easy_install.py
+++ b/setuptools/command/easy_install.py
@@ -1459,13 +1459,18 @@ def expand_paths(inputs):
# Yield existing non-dupe, non-import directory lines from it
for line in lines:
- if not line.startswith("import"):
- line = normalize_path(line.rstrip())
- if line not in seen:
- seen[line] = 1
- if not os.path.isdir(line):
- continue
- yield line, os.listdir(line)
+ if line.startswith("import"):
+ continue
+
+ line = normalize_path(line.rstrip())
+ if line in seen:
+ continue
+
+ seen[line] = 1
+ if not os.path.isdir(line):
+ continue
+
+ yield line, os.listdir(line)
def extract_wininst_cfg(dist_filename):