setup.py

setuptools と distutils

setuptools.setupdistutils.core.setup はだいたい同じ。

def setup(**attrs):
    # Make sure we have any requirements needed to interpret 'attrs'.
    _install_setup_requires(attrs)
    return distutils.core.setup(**attrs)

deprecated

from distutils.core import setup
setup(name='foo',
      version='1.0',
      py_modules=['foo'],
      )

警告

setup.py:1: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives

setuptools.setup を使おう。