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

Commit d943526

Browse files
author
mpratt14
authoredApr 2, 2019
Fix previous pull request for setup.py
doing a better job than #96 prints possible requirement for root or admin privileges tries to import pip before calling ensurepip (which isnt needed for python 3) this time, don't even keep the method from ez_setup.py, there's no point... commenting it out with ''' ''' gave me an IOError bump version because why not?
1 parent 377c684 commit d943526

File tree

1 file changed

+14
-15
lines changed

1 file changed

+14
-15
lines changed
 

‎setup.py

+14-15
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,28 @@
1-
ensurepip
2-
3-
#try the following if ensurepip is not sufficient
4-
#ensurepip --upgrade
5-
#pip install --upgrade pip setuptools
1+
print 'THIS INSTALL SCRIPT MAY REQUIRE ROOT/ADMIN PERMISSIONS'
2+
print 'Especially if you installed python for "all users"'
3+
print 'try the following in command prompt if ensurepip is not sufficient'
4+
print '$ python -m ensurepip --upgrade'
5+
print '$ python -m pip install --upgrade pip setuptools'
66

7+
import sys
78
try:
8-
# Try using ez_setup to install setuptools if not already installed.
9-
from ez_setup import use_setuptools
10-
use_setuptools()
9+
import pip
10+
from setuptools import setup, find_packages
1111
except ImportError:
12-
# Ignore import error and assume Python 3 which already has setuptools.
13-
pass
14-
15-
from setuptools import setup, find_packages
16-
17-
import sys
12+
import ensurepip
13+
ensurepip.version()
14+
ensurepip.bootstrap()
15+
from setuptools import setup, find_packages
1816

1917
# Define required packages.
2018
requires = ['adafruit-pureio']
19+
2120
# Assume spidev is required on non-windows & non-mac platforms (i.e. linux).
2221
if sys.platform != 'win32' and sys.platform != 'darwin':
2322
requires.append('spidev')
2423

2524
setup(name = 'Adafruit_GPIO',
26-
version = '1.0.3',
25+
version = '1.0.4',
2726
author = 'Tony DiCola',
2827
author_email = 'tdicola@adafruit.com',
2928
description = 'Library to provide a cross-platform GPIO interface on the Raspberry Pi and Beaglebone Black using the RPi.GPIO and Adafruit_BBIO libraries.',

0 commit comments

Comments
 (0)