From 93e65b75cc103ce5474131c2eb375eae88d81a4d Mon Sep 17 00:00:00 2001 From: zhangshine Date: Thu, 11 Jun 2015 11:26:09 +0800 Subject: [PATCH] import setup from `distutils.core` if `setutools` package no installed --- setup.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 965fc27..e1bea54 100644 --- a/setup.py +++ b/setup.py @@ -1,7 +1,10 @@ #!/usr/bin/env python import os -from setuptools import setup +try: + from setuptools import setup +except ImportError: + from distutils.core import setup with open(os.path.join(os.path.dirname(__file__), 'README.rst')) as readme: @@ -37,4 +40,4 @@ setup( 'Programming Language :: Python :: Implementation :: CPython', 'Topic :: Software Development :: Libraries :: Python Modules', ], -) \ No newline at end of file +)