Skip to content

Commit e2631b3

Browse files
committed
import commands from setuptools
importing build_py from distutils breaks in setuptools 58
1 parent 0d89241 commit e2631b3

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

setup.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,11 @@
1212
import sys
1313
from subprocess import check_call
1414

15+
from setuptools import Command
1516
from setuptools import setup
1617
from setuptools.command.bdist_egg import bdist_egg
18+
from setuptools.command.build_py import build_py
19+
from setuptools.command.sdist import sdist
1720

1821

1922
v = sys.version_info
@@ -132,14 +135,9 @@ def get_package_data():
132135
)
133136

134137
# ---------------------------------------------------------------------------
135-
# custom distutils commands
138+
# custom setuptools commands
136139
# ---------------------------------------------------------------------------
137140

138-
# imports here, so they are after setuptools import if there was one
139-
from distutils.cmd import Command
140-
from distutils.command.build_py import build_py
141-
from distutils.command.sdist import sdist
142-
143141

144142
def mtime(path):
145143
"""shorthand for mtime"""

0 commit comments

Comments
 (0)