summaryrefslogtreecommitdiff
path: root/setuptools/config.py
diff options
context:
space:
mode:
authorAlan Fregtman <941331+darkvertex@users.noreply.github.com>2021-07-21 23:30:32 -0400
committerAlan Fregtman <941331+darkvertex@users.noreply.github.com>2021-07-21 23:30:32 -0400
commitf094b7767b35e23f8e81f2f54c67cac9043e66be (patch)
tree3a1c5d00ff38c39e04472019e1985b0fa86a263c /setuptools/config.py
parentcb05fb0c94716b1d328ecca0573346218505b859 (diff)
downloadpython-setuptools-git-f094b7767b35e23f8e81f2f54c67cac9043e66be.tar.gz
globbing for [options.data_files]: Remove special treatment for filenames with globby characters that exist literally.
Diffstat (limited to 'setuptools/config.py')
-rw-r--r--setuptools/config.py17
1 files changed, 4 insertions, 13 deletions
diff --git a/setuptools/config.py b/setuptools/config.py
index 6e7c64e7..5deece38 100644
--- a/setuptools/config.py
+++ b/setuptools/config.py
@@ -271,24 +271,15 @@ class ConfigHandler:
values = cls._parse_list(value, separator=separator)
expanded_values = []
for value in values:
- trimmed_value = value.strip()
# Has globby characters?
if any(char in value for char in glob_characters):
- value = os.path.abspath(value)
-
- # check if this path has globby characters but does in fact exist:
- if os.path.exists(value):
- # if it does, treat it literally and do not expand any patterns:
- expanded_values.append(get_relpath(value))
- continue
-
- # else expand the glob pattern while keeping paths *relative*:
- value = sorted(
- get_relpath(path) for path in iglob(value))
- expanded_values.extend(value)
+ # then expand the glob pattern while keeping paths *relative*:
+ expanded_values.extend(sorted(
+ get_relpath(path) for path in iglob(os.path.abspath(value))))
else:
+ # take the value as-is:
expanded_values.append(value)
return expanded_values