From b68a72e5472ead00a7ff3772dee672e46a70ecdb Mon Sep 17 00:00:00 2001 From: Joshua Root Date: Thu, 9 Feb 2017 09:31:24 +1100 Subject: [PATCH] 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. --- setup.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 = []