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
32a9bf9e
Commit
32a9bf9e
authored
Jul 04, 2013
by
Brett Cannon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue #18200: Back out usage of ModuleNotFoundError (8d28d44f3a9a)
parent
dc363484
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
13 additions
and
11 deletions
+13
-11
archive_util.py
archive_util.py
+1
-1
ccompiler.py
ccompiler.py
+4
-3
dist.py
dist.py
+5
-4
msvccompiler.py
msvccompiler.py
+2
-2
util.py
util.py
+1
-1
No files found.
archive_util.py
View file @
32a9bf9e
...
...
@@ -9,7 +9,7 @@ import sys
try
:
import
zipfile
except
ModuleNotFound
Error
:
except
Import
Error
:
zipfile
=
None
...
...
ccompiler.py
View file @
32a9bf9e
...
...
@@ -3,7 +3,7 @@
Contains CCompiler, an abstract base class that defines the interface
for the Distutils compiler abstraction model."""
import
importlib
,
sys
,
os
,
re
import
sys
,
os
,
re
from
distutils.errors
import
*
from
distutils.spawn
import
spawn
from
distutils.file_util
import
move_file
...
...
@@ -1013,9 +1013,10 @@ def new_compiler(plat=None, compiler=None, verbose=0, dry_run=0, force=0):
try
:
module_name
=
"distutils."
+
module_name
module
=
importlib
.
import_module
(
module_name
)
__import__
(
module_name
)
module
=
sys
.
modules
[
module_name
]
klass
=
vars
(
module
)[
class_name
]
except
ModuleNotFound
Error
:
except
Import
Error
:
raise
DistutilsModuleError
(
"can't compile C/C++ code: unable to load module '%s'"
%
\
module_name
)
...
...
dist.py
View file @
32a9bf9e
...
...
@@ -4,11 +4,11 @@ Provides the Distribution class, which represents the module distribution
being built/installed/distributed.
"""
import
importlib
,
sys
,
os
,
re
import
sys
,
os
,
re
try
:
import
warnings
except
ModuleNotFound
Error
:
except
Import
Error
:
warnings
=
None
from
distutils.errors
import
*
...
...
@@ -788,8 +788,9 @@ Common commands: (see '--help-commands' for more)
klass_name
=
command
try
:
module
=
importlib
.
import_module
(
module_name
)
except
ModuleNotFoundError
:
__import__
(
module_name
)
module
=
sys
.
modules
[
module_name
]
except
ImportError
:
continue
try
:
...
...
msvccompiler.py
View file @
32a9bf9e
...
...
@@ -28,7 +28,7 @@ try:
RegEnumValue
=
winreg
.
EnumValue
RegError
=
winreg
.
error
except
ModuleNotFound
Error
:
except
Import
Error
:
try
:
import
win32api
import
win32con
...
...
@@ -39,7 +39,7 @@ except ModuleNotFoundError:
RegEnumKey
=
win32api
.
RegEnumKey
RegEnumValue
=
win32api
.
RegEnumValue
RegError
=
win32api
.
error
except
ModuleNotFound
Error
:
except
Import
Error
:
log
.
info
(
"Warning: Can't read registry to find the "
"necessary compiler setting
\
n
"
"Make sure that Python modules winreg, "
...
...
util.py
View file @
32a9bf9e
...
...
@@ -388,7 +388,7 @@ def byte_compile (py_files,
try:
from tempfile import mkstemp
(script_fd, script_name) = mkstemp(".py")
except
ModuleNotFound
Error:
except
Import
Error:
from tempfile import mktemp
(script_fd, script_name) = None, mktemp(".py")
log.info("writing byte-compilation script '%s'", script_name)
...
...
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