diff --git a/setup.py b/setup.py index c72e13623c2d..36ca62a880f4 100644 --- a/setup.py +++ b/setup.py @@ -38,7 +38,10 @@ # The setuptools version of sdist adds a setup.cfg file to the tree. # We don't want that, so we simply remove it, and it will fall back to # vanilla distutils. -del setuptools.command.sdist.sdist.make_release_tree +try: + del setuptools.command.sdist.sdist.make_release_tree +except AttributeError: + pass from distutils.errors import CompileError from distutils.dist import Distribution