Mercurial > hg-stable
changeset 50730:b1ac55606eb7 stable
setup: fall back to setuptools setup if distutils isn't available
The setuptools comments around this seems slightly outdated. Setuptools is
improving and distutils is being deprecated, so it should perhaps be the
default. But at least, it is a fair fallback.
author | Mads Kiilerich <mads@kiilerich.com> |
---|---|
date | Tue, 27 Jun 2023 12:09:17 +0200 |
parents | b3a5af04da35 |
children | d5cd1fd690f3 |
files | setup.py |
diffstat | 1 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/setup.py Thu Mar 23 16:45:12 2023 +0100 +++ b/setup.py Tue Jun 27 12:09:17 2023 +0200 @@ -112,7 +112,10 @@ if issetuptools: from setuptools import setup else: - from distutils.core import setup + try: + from distutils.core import setup + except ModuleNotFoundError: + from setuptools import setup from distutils.ccompiler import new_compiler from distutils.core import Command, Extension from distutils.dist import Distribution