diff options
author | Jon Dufresne <jon.dufresne@gmail.com> | 2018-09-15 16:05:05 -0700 |
---|---|---|
committer | Jon Dufresne <jon.dufresne@gmail.com> | 2018-09-15 16:05:05 -0700 |
commit | 9405d8cbc56c8347daf28e2309d5398947bc37b4 (patch) | |
tree | 2d5abe9d6df245ded8686ed0c7963d91c4dc6b58 | |
parent | 6b6b1a6e8d5d831fe17b168b4bf33d2c22bb2cc0 (diff) | |
download | psycopg2-9405d8cbc56c8347daf28e2309d5398947bc37b4.tar.gz |
Drop legacy distutils in setup.py
distutils is not recommended for use and unnecessary for modern Python
environments. Use only setuptools instead. From
https://docs.python.org/3/library/distutils.html:
> Most Python users will not want to use this module directly, but
> instead use the cross-version tools maintained by the Python Packaging
> Authority. In particular, setuptools is an enhanced alternative to
> distutils ...
>
> The recommended pip installer runs all setup.py scripts with
> setuptools, even if the script itself only imports distutils. Refer to
> the Python Packaging User Guide for more information.
-rw-r--r-- | setup.py | 5 |
1 files changed, 1 insertions, 4 deletions
@@ -32,10 +32,7 @@ import os import sys import re import subprocess -try: - from setuptools import setup, Extension -except ImportError: - from distutils.core import setup, Extension +from setuptools import setup, Extension from distutils.command.build_ext import build_ext from distutils.sysconfig import get_python_inc from distutils.ccompiler import get_default_compiler |