summaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
authorJoshua Root <jmr@macports.org>2017-02-09 09:31:24 +1100
committerGitHub <noreply@github.com>2017-02-09 09:31:24 +1100
commitb68a72e5472ead00a7ff3772dee672e46a70ecdb (patch)
treebc34c1d71e2336bd075a713b5d112cfe6aae8cca /setup.py
parent08811109230c42d99868e25b457669da408df7ca (diff)
downloadappdirs-b68a72e5472ead00a7ff3772dee672e46a70ecdb.tar.gz
Allow installing without setuptools
Setuptools v34 requires appdirs, which creates an obvious bootstrap problem if appdirs uses setuptools in its setup.py. Therefore, allow installing with distutils if setuptools is not available.
Diffstat (limited to 'setup.py')
-rw-r--r--setup.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/setup.py b/setup.py
index cae6330..f8bbd93 100644
--- a/setup.py
+++ b/setup.py
@@ -2,7 +2,11 @@
import sys
import os
import os.path
-from setuptools import setup
+# appdirs is a dependency of setuptools, so allow installing without it.
+try:
+ from setuptools import setup
+except ImportError:
+ from distutils.core import setup
import appdirs
tests_require = []