-
Notifications
You must be signed in to change notification settings - Fork 981
remove deprecated ez_setup.py; update install instructions (fixes #91) #101
Conversation
README.md
Outdated
For all platforms (Raspberry Pi and Beaglebone Black) make sure your system is able to compile Python extensions. On Raspbian or Beaglebone Black's Debian/Ubuntu image you can ensure your system is ready by executing: | ||
|
||
```` | ||
sudo apt-get update | ||
sudo apt-get install build-essential python-dev | ||
sudo apt-get install build-essential python-dev python3-dev |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The instructions are missing python-pip/python3-pip (at least in my Raspbian python-dev/python3-dev does not have it as dependency).
However installing python-pip or python3-pip takes care of installing build-essentials, python-dev/python3-dev and all the rest of the stuff.
As the instructions are for microcomputers, I think it's best to save as much space as possible. And in the end, the less software the user has installed, smaller the risk of having vulnerabilities, so IMHO it's best to fully separate python2 and python3 instructions.
On the other hand, I am not really sure sudo python -m pip install --upgrade pip setuptools wheel
is needed for everyone. At my raspbian it's not required to install using pip (but I am not removing from the proposal anyway).
So my proposal would be:
Installing
Dependencies
For all platforms (Raspberry Pi and Beaglebone Black) make sure your system is able to compile and download Python extensions with pip:
On Raspbian or Beaglebone Black's Debian/Ubuntu image you can ensure your system is ready by running one or two of the following sets of commands:
Python2:
sudo apt-get update
sudo apt-get install python-pip
sudo python -m pip install --upgrade pip setuptools wheel
Python3:
sudo apt-get update
sudo apt-get install python3-pip
sudo python3 -m pip install --upgrade pip setuptools wheel
Install with pip
Use pip
to install from PyPI.
Python2:
sudo pip install Adafruit_DHT
Python3:
sudo pip3 install Adafruit_DHT
Compile and install from the repository
First download the library source code from the GitHub releases page, unzipping the archive, and execute:
Python2:
cd Adafruit_Python_DHT
sudo python setup.py install
Python3:
cd Adafruit_Python_DHT
sudo python3 setup.py install
You could also git clone the repository if you want to test an unreleased version.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested the instructions above, and everything seems to be working fine on Raspbian, even compiling locally from the remove_ez_setup
branch.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the quality feedback. I'll tweak instructions a bit and merge.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Thanks again. Merged, uploaded to both PyPI locations. |
Removes
ez_setup.py
, addspip
/pip3
installation instructions to README.md. Bumps version to 1.3.4.