mirror of
https://github.com/psycopg/psycopg2.git
synced 2024-11-24 18:03:43 +03:00
Modify setup.py to support setuptools/wheel
To support creation of whl files for PyPI, setuptools need to be imported instead of distutils. Created try/except case to fall back to integrated distutils if setuptools is not installed.
This commit is contained in:
parent
2833d4f5ff
commit
ef09ebe62a
3
setup.py
3
setup.py
|
@ -57,6 +57,9 @@ import os
|
||||||
import sys
|
import sys
|
||||||
import re
|
import re
|
||||||
import subprocess
|
import subprocess
|
||||||
|
try:
|
||||||
|
from setuptools import setup, Extension
|
||||||
|
except ImportError:
|
||||||
from distutils.core import setup, Extension
|
from distutils.core import setup, Extension
|
||||||
from distutils.command.build_ext import build_ext
|
from distutils.command.build_ext import build_ext
|
||||||
from distutils.sysconfig import get_python_inc
|
from distutils.sysconfig import get_python_inc
|
||||||
|
|
Loading…
Reference in New Issue
Block a user