Skip to content
This repository was archived by the owner on Nov 12, 2019. It is now read-only.

Commit 3f30544

Browse files
committed
Fix python3 pip install issue with ez_setup relative import.
1 parent 310c59b commit 3f30544

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

setup.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
1-
from ez_setup import use_setuptools
2-
use_setuptools()
1+
try:
2+
# Try using ez_setup to install setuptools if not already installed.
3+
from ez_setup import use_setuptools
4+
use_setuptools()
5+
except ImportError:
6+
# Ignore import error and assume Python 3 which already has setuptools.
7+
pass
8+
39
from setuptools import setup, find_packages, Extension
410
import sys
511

@@ -72,7 +78,7 @@
7278

7379
# Call setuptools setup function to install package.
7480
setup(name = 'Adafruit_DHT',
75-
version = '1.3.0',
81+
version = '1.3.1',
7682
author = 'Tony DiCola',
7783
author_email = '[email protected]',
7884
description = 'Library to get readings from the DHT11, DHT22, and AM2302 humidity and temperature sensors on a Raspberry Pi or Beaglebone Black.',

0 commit comments

Comments
 (0)