remove use of deprecated distutils

distutils is slated for deprecation in the stdlib

we can use packaging for version parsing and setuptools in setup.py

packaging is technically an extra dependency, but rarely missing because it's so widespread
This commit is contained in:
Min RK
2021-08-03 12:20:07 +02:00
parent d55518b1ca
commit 6082c1965a
3 changed files with 9 additions and 12 deletions

View File

@@ -12,8 +12,11 @@ import shutil
import sys
from subprocess import check_call
from setuptools import Command
from setuptools import setup
from setuptools.command.bdist_egg import bdist_egg
from setuptools.command.build_py import build_py
from setuptools.command.sdist import sdist
v = sys.version_info
@@ -131,15 +134,6 @@ setup_args = dict(
},
)
# ---------------------------------------------------------------------------
# custom distutils commands
# ---------------------------------------------------------------------------
# imports here, so they are after setuptools import if there was one
from distutils.cmd import Command
from distutils.command.build_py import build_py
from distutils.command.sdist import sdist
def mtime(path):
"""shorthand for mtime"""