Skip to content

Commit

Permalink
MAINT: ENsure setuptools is imported first
Browse files Browse the repository at this point in the history
Import setuptools first to avoid warnings and related issues
  • Loading branch information
bashtage committed Jul 20, 2020
1 parent 0628ece commit 7fd5e38
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ multi_line_output=3
include_trailing_comma=True
use_parentheses=True
line_length=79
known_compat=statsmodels.compat.*
known_compat=statsmodels.compat.*,setuptools,setuptools.*
force_grid_wrap=0
combine_as_imports=True
force_sort_within_sections=True
Expand Down
10 changes: 5 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
pytest --cov=statsmodels statsmodels
coverage html
"""
from setuptools import Extension, find_packages, setup
from setuptools.dist import Distribution

from collections import defaultdict
from distutils.command.clean import clean
import fnmatch
Expand All @@ -14,12 +17,9 @@
import sys

import pkg_resources
from setuptools import Extension, find_packages, setup
from setuptools.dist import Distribution

import versioneer


try:
# SM_FORCE_C is a testing shim to force setup to use C source files
FORCE_C = int(os.environ.get('SM_FORCE_C', 0))
Expand Down Expand Up @@ -48,8 +48,8 @@
upgrade {0} before installing or install into a fresh virtualenv.
"""
for key in SETUP_REQUIREMENTS:
import importlib
from distutils.version import LooseVersion
import importlib
req_ver = LooseVersion(SETUP_REQUIREMENTS[key])
try:
mod = importlib.import_module(key)
Expand Down Expand Up @@ -204,8 +204,8 @@ def build_extensions(self):

def _update_extensions(self):
import numpy
from numpy.distutils.misc_util import get_info
from numpy.distutils.log import set_verbosity
from numpy.distutils.misc_util import get_info
set_verbosity(1)

numpy_includes = [numpy.get_include()]
Expand Down

0 comments on commit 7fd5e38

Please sign in to comment.