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
b7354452
Commit
b7354452
authored
Dec 24, 2016
by
Jason R. Coombs
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'issue-889'
parents
f1f9200d
07a7b06d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
4 deletions
+9
-4
setuptools/monkey.py
setuptools/monkey.py
+9
-4
No files found.
setuptools/monkey.py
View file @
b7354452
...
@@ -7,6 +7,7 @@ import distutils.filelist
...
@@ -7,6 +7,7 @@ import distutils.filelist
import
platform
import
platform
import
types
import
types
import
functools
import
functools
import
inspect
from
.py26compat
import
import_module
from
.py26compat
import
import_module
from
setuptools.extern
import
six
from
setuptools.extern
import
six
...
@@ -35,12 +36,16 @@ def get_unpatched_class(cls):
...
@@ -35,12 +36,16 @@ def get_unpatched_class(cls):
Also ensures that no other distutils extension monkeypatched the distutils
Also ensures that no other distutils extension monkeypatched the distutils
first.
first.
"""
"""
while
cls
.
__module__
.
startswith
(
'setuptools'
):
external_bases
=
(
cls
,
=
cls
.
__bases__
cls
if
not
cls
.
__module__
.
startswith
(
'distutils'
):
for
cls
in
inspect
.
getmro
(
cls
)
if
not
cls
.
__module__
.
startswith
(
'setuptools'
)
)
base
=
next
(
external_bases
)
if
not
base
.
__module__
.
startswith
(
'distutils'
):
msg
=
"distutils has already been patched by %r"
%
cls
msg
=
"distutils has already been patched by %r"
%
cls
raise
AssertionError
(
msg
)
raise
AssertionError
(
msg
)
return
cls
return
base
def
patch_all
():
def
patch_all
():
...
...
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