Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
setuptools
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jérome Perrin
setuptools
Commits
17f72f5b
Commit
17f72f5b
authored
Dec 07, 2016
by
Jason R. Coombs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Always check at run time as some builds share files across Python versions.
parent
41a9da18
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
setuptools/namespaces.py
setuptools/namespaces.py
+4
-4
No files found.
setuptools/namespaces.py
View file @
17f72f5b
...
...
@@ -37,15 +37,15 @@ class Installer:
_nspkg_tmpl
=
(
"import sys, types, os, importlib.util, importlib.machinery"
,
"pep420 = sys.version_info > (3, 3)"
,
"has_mfs = sys.version_info > (3, 5)"
,
"p = os.path.join(%(root)s, *%(pth)r)"
,
"ie = os.path.exists(os.path.join(p,'__init__.py'))"
,
"m = not ie and not pep420 and "
"m = not ie and not pep420 and
has_mfs and
"
"sys.modules.setdefault(%(pkg)r, "
"importlib.util.module_from_spec("
"importlib.machinery.PathFinder.find_spec(%(pkg)r, "
"[os.path.dirname(p)])))"
if
sys
.
version_info
>=
(
3
,
5
)
else
"m = not ie and not pep420 and "
"[os.path.dirname(p)])))"
,
"m = not ie and not pep420 and not has_mfs and "
"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)"
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment