diff options
author | Jason R. Coombs <jaraco@jaraco.com> | 2020-07-08 20:24:44 -0400 |
---|---|---|
committer | Jason R. Coombs <jaraco@jaraco.com> | 2020-07-08 20:24:44 -0400 |
commit | 461c8f4892f1fbb74448ee4323ab5c05532a4072 (patch) | |
tree | 432df36cde1809b1a1d81e91a34c770e8e5add79 /setuptools/_distutils/command/build_py.py | |
parent | aff64ae89e00e25fb3868bf528a14c18e7af0cf4 (diff) | |
parent | bbe8e80bcbafff8cf3d135d17a8526c8ac5f4b27 (diff) | |
download | external_python_setuptools-461c8f4892f1fbb74448ee4323ab5c05532a4072.tar.gz external_python_setuptools-461c8f4892f1fbb74448ee4323ab5c05532a4072.tar.bz2 external_python_setuptools-461c8f4892f1fbb74448ee4323ab5c05532a4072.zip |
Merge commit 'bbe8e80bcbafff8cf3d135d17a8526c8ac5f4b27' of https://github.com/pypa/distutils into refresh-distutils
Diffstat (limited to 'setuptools/_distutils/command/build_py.py')
-rw-r--r-- | setuptools/_distutils/command/build_py.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/setuptools/_distutils/command/build_py.py b/setuptools/_distutils/command/build_py.py index cf0ca57c..edc2171c 100644 --- a/setuptools/_distutils/command/build_py.py +++ b/setuptools/_distutils/command/build_py.py @@ -5,7 +5,7 @@ Implements the Distutils 'build_py' command.""" import os import importlib.util import sys -from glob import glob +import glob from distutils.core import Command from distutils.errors import * @@ -125,7 +125,7 @@ class build_py (Command): files = [] for pattern in globs: # Each pattern has to be converted to a platform-specific path - filelist = glob(os.path.join(src_dir, convert_path(pattern))) + filelist = glob.glob(os.path.join(glob.escape(src_dir), convert_path(pattern))) # Files that match more than one pattern are only added once files.extend([fn for fn in filelist if fn not in files and os.path.isfile(fn)]) @@ -216,7 +216,7 @@ class build_py (Command): def find_package_modules(self, package, package_dir): self.check_package(package, package_dir) - module_files = glob(os.path.join(package_dir, "*.py")) + module_files = glob.glob(os.path.join(glob.escape(package_dir), "*.py")) modules = [] setup_script = os.path.abspath(self.distribution.script_name) |