Skip to content

Commit c553b0f

Browse files
committed
Work around obscure setuptools error
1 parent 4860945 commit c553b0f

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

.isort.cfg

+1
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,6 @@
22
py_version=37
33
profile = black
44
combine_as_imports = true
5+
skip = setup.py
56
# TODO: Decide if this is wanted:
67
# combine_straight_imports = true

setup.py

+6-4
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,12 @@
3131
import subprocess
3232
import sys
3333
import winreg
34+
35+
# setuptools must be imported before distutils for markh in some python versions.
36+
# CI doesn't hit this, so not sure what's going on.
37+
from setuptools import setup
38+
from setuptools.command.build_ext import build_ext
39+
3440
from distutils import log
3541
from distutils.command.build import build
3642
from distutils.command.install import install
@@ -39,10 +45,6 @@
3945
from distutils.core import Extension
4046
from tempfile import gettempdir
4147

42-
# The rest of our imports.
43-
from setuptools import setup
44-
from setuptools.command.build_ext import build_ext
45-
4648
# some modules need a static CRT to avoid problems caused by them having a
4749
# manifest.
4850
static_crt_modules = ["winxpgui"]

0 commit comments

Comments
 (0)