1. Éric Araujo
  2. distutils2-features

Commits

Éric Araujo  committed 088dbb9

Don’t import sysconfig from the (2.7) stdlib.

distutils2._backport.sysconfig is actually *newer* than the versions in
the 2.7 and 3.2 standard libraries.

  • Participants
  • Parent commits de0bf6d
  • Branches default

Comments (0)

Files changed (5)

File distutils2/command/build_ext.py

View file
 from distutils2.util import newer_group
 from distutils2.compiler.extension import Extension
 from distutils2 import logger
-try:
-    import sysconfig
-except ImportError:
-    from distutils2._backport import sysconfig
+from distutils2._backport import sysconfig
 
 # this keeps compatibility from 2.3 to 2.5
 if sys.version < "2.6":

File distutils2/command/build_scripts.py

View file
 from distutils2.command.cmd import Command
 from distutils2.util import convert_path, newer
 from distutils2 import logger
-try:
-    import sysconfig
-except ImportError:
-    from distutils2._backport import sysconfig
+from distutils2._backport import sysconfig
 from distutils2.compat import Mixin2to3
 
 # check if Python is called on the first line with this expression

File distutils2/tests/test_command_build_scripts.py

View file
 
 from distutils2.command.build_scripts import build_scripts
 from distutils2.dist import Distribution
-try:
-    import sysconfig
-except ImportError:
-    from distutils2._backport import sysconfig
+from distutils2._backport import sysconfig
 
 from distutils2.tests import unittest, support
 

File distutils2/tests/test_cygwinccompiler.py

View file
 """Tests for distutils.cygwinccompiler."""
 import sys
 import os
-try:
-    import sysconfig
-except ImportError:
-    from distutils2._backport import sysconfig
+
+from distutils2._backport import sysconfig
 
 from distutils2.tests import run_unittest
 from distutils2.tests import captured_stdout

File distutils2/tests/test_unixccompiler.py

View file
 """Tests for distutils.unixccompiler."""
 import sys
 
-try:
-    import sysconfig
-except ImportError:
-    from distutils2._backport import sysconfig
-
+from distutils2._backport import sysconfig
 from distutils2.compiler.unixccompiler import UnixCCompiler
 from distutils2.tests import unittest