From af152065ee3f74a3d36265e83a5e310bc7e3ca1e Mon Sep 17 00:00:00 2001 From: Ben Greiner Date: Sun, 17 Jul 2022 22:09:03 +0200 Subject: [PATCH] migrate build command from distutils to setuptools --- setup.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 21681887..421ec6b7 100755 --- a/setup.py +++ b/setup.py @@ -1,7 +1,6 @@ #!/usr/bin/env python import re -from distutils.command.build import build from glob import glob from itertools import chain from os.path import basename @@ -12,6 +11,11 @@ from setuptools import Command from setuptools import find_packages from setuptools import setup +try: + # https://setuptools.pypa.io/en/latest/deprecated/distutils-legacy.html + from setuptools.command.build import build +except ImportError: + from distutils.command.build import build from setuptools.command.develop import develop from setuptools.command.easy_install import easy_install from setuptools.command.install_lib import install_lib