Skip to content

Commit

Permalink
README and Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
Gadgetoid committed Aug 10, 2018
1 parent d5d54f6 commit 16827db
Show file tree
Hide file tree
Showing 3 changed files with 76 additions and 0 deletions.
39 changes: 39 additions & 0 deletions Makefile
@@ -0,0 +1,39 @@
.PHONY: usage install uninstall
usage:
@echo "Usage: make <target>, where target is one of:\n"
@echo "install: install the library locally from source"
@echo "uninstall: uninstall the local library"
@echo "python-readme: generate library/README.rst from README.md"
@echo "python-wheels: build python .whl files for distribution"
@echo "python-sdist: build python source distribution"
@echo "python-clean: clean python build and dist directories"
@echo "python-dist: build all python distribution files"

install:
./install.sh

uninstall:
./uninstall.sh

python-readme: library/README.rst

library/README.rst: README.md
pandoc --from=markdown --to=rst -o library/README.rst README.md

python-wheels:
cd library; python3 setup.py bdist_wheel
cd library; python setup.py bdist_wheel

python-sdist:
cd library; python setup.py sdist

python-clean:
-rm -r library/dist
-rm -r library/build
-rm -r library/*.egg-info

python-dist: python-clean python-readme python-wheels python-sdist
ls library/dist

python-deploy: python-dist
twine upload library/dist/*
16 changes: 16 additions & 0 deletions README.md
@@ -0,0 +1,16 @@
# LTR559 Proximity/Presence/Light Sensor

Suitable for detecting proximity of an object at close range the LTR559 is great for approach detection and ambient light compensation. The range is useful to around 2cm, and this is the type of sensor you might find in a smartphone to determine if you're holding it against your head.

# Installing

Stable library from PyPi:

* Just run `sudo pip install ltr559`

Latest/development library from GitHub:

* `git clone https://github.com/pimoroni/ltr559-python`
* `cd ltr559-python`
* `sudo ./install.sh`

21 changes: 21 additions & 0 deletions library/README.rst
@@ -0,0 +1,21 @@
LTR559 Proximity/Presence/Light Sensor
======================================

Suitable for detecting proximity of an object at close range the LTR559
is great for approach detection and ambient light compensation. The
range is useful to around 2cm, and this is the type of sensor you might
find in a smartphone to determine if you're holding it against your
head.

Installing
==========

Stable library from PyPi:

- Just run ``sudo pip install ltr559``

Latest/development library from GitHub:

- ``git clone https://github.com/pimoroni/ltr559-python``
- ``cd ltr559-python``
- ``sudo ./install.sh``

0 comments on commit 16827db

Please sign in to comment.