diff options
author | Jason R. Coombs <jaraco@jaraco.com> | 2020-01-19 12:46:30 -0500 |
---|---|---|
committer | Jason R. Coombs <jaraco@jaraco.com> | 2020-01-19 12:46:30 -0500 |
commit | 3d4d8b9dde61b87271861b8c7ebeb168ac4fa72b (patch) | |
tree | ffbf9cd5a02337ced626892b672b7e21bd305717 /setuptools/namespaces.py | |
parent | a0e8d0568d84e29066a5b45aade5aafe28237ec0 (diff) | |
download | external_python_setuptools-3d4d8b9dde61b87271861b8c7ebeb168ac4fa72b.tar.gz external_python_setuptools-3d4d8b9dde61b87271861b8c7ebeb168ac4fa72b.tar.bz2 external_python_setuptools-3d4d8b9dde61b87271861b8c7ebeb168ac4fa72b.zip |
👹 Feed the hobgoblins (delint).
Diffstat (limited to 'setuptools/namespaces.py')
-rw-r--r-- | setuptools/namespaces.py | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/setuptools/namespaces.py b/setuptools/namespaces.py index dc16106d..5f403c96 100644 --- a/setuptools/namespaces.py +++ b/setuptools/namespaces.py @@ -47,13 +47,17 @@ class Installer: "p = os.path.join(%(root)s, *%(pth)r)", "importlib = has_mfs and __import__('importlib.util')", "has_mfs and __import__('importlib.machinery')", - "m = has_mfs and " + ( + "m = has_mfs and " "sys.modules.setdefault(%(pkg)r, " - "importlib.util.module_from_spec(" - "importlib.machinery.PathFinder.find_spec(%(pkg)r, " - "[os.path.dirname(p)])))", - "m = m or " - "sys.modules.setdefault(%(pkg)r, types.ModuleType(%(pkg)r))", + "importlib.util.module_from_spec(" + "importlib.machinery.PathFinder.find_spec(%(pkg)r, " + "[os.path.dirname(p)])))" + ), + ( + "m = m or " + "sys.modules.setdefault(%(pkg)r, types.ModuleType(%(pkg)r))" + ), "mp = (m or []) and m.__dict__.setdefault('__path__',[])", "(p not in mp) and mp.append(p)", ) |