From 0f4308ecbe6be940be16203b611187945abdc2f1 Mon Sep 17 00:00:00 2001 From: Corey Hickey Date: Wed, 28 Jul 2021 13:34:38 -0700 Subject: [PATCH] prefer setuptools to distutils.core --- lib/fpm/package/pyfpm/get_metadata.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/fpm/package/pyfpm/get_metadata.py b/lib/fpm/package/pyfpm/get_metadata.py index e89c5f935c..89a803a502 100644 --- a/lib/fpm/package/pyfpm/get_metadata.py +++ b/lib/fpm/package/pyfpm/get_metadata.py @@ -1,4 +1,3 @@ -from distutils.core import Command import os import sys import pkg_resources @@ -7,6 +6,12 @@ except ImportError: import simplejson as json +# distutils.core is to be deprecated in python 3.10 (PEP 632) +try: + from setuptools import Command +except ImportError: + from distutils.core import Command + PY3 = sys.version_info[0] == 3 if PY3: