diff options
author | Giampaolo Rodola <g.rodola@gmail.com> | 2021-12-14 23:54:58 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-14 23:54:58 +0100 |
commit | 39dc44bfa5fbb9500166b3480295379602e5bbc5 (patch) | |
tree | ee785ba8d9e189fb2b1bffda19492414cd7c0d2c /setup.py | |
parent | b490b5d51af6ed29709c357a00fcdb6bda26df78 (diff) | |
download | psutil-39dc44bfa5fbb9500166b3480295379602e5bbc5.tar.gz |
Automatically sort imports (isort CLI tool) (#2033)
Diffstat (limited to 'setup.py')
-rwxr-xr-x | setup.py | 12 |
1 files changed, 8 insertions, 4 deletions
@@ -7,6 +7,7 @@ """Cross-platform lib for process and system monitoring in Python.""" from __future__ import print_function + import contextlib import io import os @@ -19,14 +20,17 @@ import sys import tempfile import warnings + with warnings.catch_warnings(): warnings.simplefilter("ignore") try: import setuptools - from setuptools import setup, Extension + from setuptools import Extension + from setuptools import setup except ImportError: setuptools = None - from distutils.core import setup, Extension + from distutils.core import Extension + from distutils.core import setup HERE = os.path.abspath(os.path.dirname(__file__)) @@ -36,7 +40,6 @@ sys.path.insert(0, os.path.join(HERE, "psutil")) from _common import AIX # NOQA from _common import BSD # NOQA from _common import FREEBSD # NOQA -from _common import hilite # NOQA from _common import LINUX # NOQA from _common import MACOS # NOQA from _common import NETBSD # NOQA @@ -44,6 +47,7 @@ from _common import OPENBSD # NOQA from _common import POSIX # NOQA from _common import SUNOS # NOQA from _common import WINDOWS # NOQA +from _common import hilite # NOQA from _compat import PY3 # NOQA from _compat import which # NOQA @@ -236,8 +240,8 @@ elif NETBSD: elif LINUX: def get_ethtool_macro(): # see: https://github.com/giampaolo/psutil/issues/659 - from distutils.unixccompiler import UnixCCompiler from distutils.errors import CompileError + from distutils.unixccompiler import UnixCCompiler with tempfile.NamedTemporaryFile( suffix='.c', delete=False, mode="wt") as f: |