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

remove deprecated ez_setup.py; update install instructions (fixes #91) #101

Merged
merged 2 commits into from
Jul 31, 2018

Conversation

brennen
Copy link
Contributor

@brennen brennen commented Jul 27, 2018

Removes ez_setup.py, adds pip / pip3 installation instructions to README.md. Bumps version to 1.3.4.

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
Copy link

@juliogonzalez juliogonzalez Jul 29, 2018

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.

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.

Copy link
Contributor Author

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.

Copy link

@juliogonzalez juliogonzalez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@brennen brennen merged commit 18846de into master Jul 31, 2018
@brennen
Copy link
Contributor Author

brennen commented Jul 31, 2018

Thanks again. Merged, uploaded to both PyPI locations.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants