diff options
author | Nathaniel J. Smith <njs@pobox.com> | 2015-05-24 22:19:04 -0700 |
---|---|---|
committer | Nathaniel J. Smith <njs@pobox.com> | 2015-05-24 22:19:04 -0700 |
commit | 08443023ddaf774d7b956323860be9b3ae2fa19a (patch) | |
tree | 9e0581a986292a4fc221a2fc50edf7cd83a6e0e2 /numpy/distutils/__init__.py | |
parent | fd94000ffd0281b7477b1114ba194b64378808c0 (diff) | |
parent | 3b825d35fdcc72ae4790c70c139639a6bd7df178 (diff) | |
download | numpy-08443023ddaf774d7b956323860be9b3ae2fa19a.tar.gz |
Merge pull request #5892 from andreabedini/master
Simplify numpy/distutils/__init__.py
Diffstat (limited to 'numpy/distutils/__init__.py')
-rw-r--r-- | numpy/distutils/__init__.py | 40 |
1 files changed, 12 insertions, 28 deletions
diff --git a/numpy/distutils/__init__.py b/numpy/distutils/__init__.py index c16b10ae5..9297185ef 100644 --- a/numpy/distutils/__init__.py +++ b/numpy/distutils/__init__.py @@ -2,36 +2,20 @@ from __future__ import division, absolute_import, print_function import sys -if sys.version_info[0] < 3: - from .__version__ import version as __version__ - # Must import local ccompiler ASAP in order to get - # customized CCompiler.spawn effective. - from . import ccompiler - from . import unixccompiler +from .__version__ import version as __version__ +# Must import local ccompiler ASAP in order to get +# customized CCompiler.spawn effective. +from . import ccompiler +from . import unixccompiler - from .info import __doc__ - from .npy_pkg_config import * +from .info import __doc__ +from .npy_pkg_config import * - try: - from . import __config__ - _INSTALLED = True - except ImportError: - _INSTALLED = False -else: - from numpy.distutils.__version__ import version as __version__ - # Must import local ccompiler ASAP in order to get - # customized CCompiler.spawn effective. - import numpy.distutils.ccompiler - import numpy.distutils.unixccompiler - - from numpy.distutils.info import __doc__ - from numpy.distutils.npy_pkg_config import * - - try: - import numpy.distutils.__config__ - _INSTALLED = True - except ImportError: - _INSTALLED = False +try: + from . import __config__ + _INSTALLED = True +except ImportError: + _INSTALLED = False if _INSTALLED: from numpy.testing import Tester |