From 4e89e324f438d23354efd2d5e82cd793fe408208 Mon Sep 17 00:00:00 2001 From: Tony DiCola Date: Thu, 20 Oct 2016 03:02:13 +0000 Subject: [PATCH] Fix python 3 pip install issue with relative ez_setup import. --- setup.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/setup.py b/setup.py index 3c1884b..c847fd1 100644 --- a/setup.py +++ b/setup.py @@ -1,5 +1,11 @@ -from ez_setup import use_setuptools -use_setuptools() +try: + # Try using ez_setup to install setuptools if not already installed. + from ez_setup import use_setuptools + use_setuptools() +except ImportError: + # Ignore import error and assume Python 3 which already has setuptools. + pass + from setuptools import setup, find_packages classifiers = ['Development Status :: 4 - Beta', @@ -12,7 +18,7 @@ 'Topic :: System :: Hardware'] setup(name = 'Adafruit_BMP', - version = '1.5.1', + version = '1.5.2', author = 'Tony DiCola', author_email = 'tdicola@adafruit.com', description = 'Library for accessing the BMP series pressure and temperature sensors like the BMP085/BMP180 on a Raspberry Pi or Beaglebone Black.',