Skip to content

Commit 33c11e9

Browse files
committed
Adds try catch import of setuptools usage
Try except import allows for the usage of setuptools if available but does not require them in order to run. The fallback is on the distutils package that comes with Python standard.
1 parent 1945f05 commit 33c11e9

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

setup.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
from distutils.core import setup # setuptools breaks
1+
try:
2+
from setuptools import setup
3+
except ImportError:
4+
from distutils.core import setup # if setuptools breaks
25

36
# Dynamically calculate the version
47
version_tuple = __import__('rest_hooks').VERSION

0 commit comments

Comments
 (0)