Skip to content

Commit ead376f

Browse files
authored
Merge pull request #3 from lesamouraipourpre/pypi
Enable uploading of the driver to PyPI
2 parents e4c3361 + 36605d8 commit ead376f

File tree

3 files changed

+89
-15
lines changed

3 files changed

+89
-15
lines changed

README.rst

Lines changed: 32 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ Introduction
2222

2323
CircuitPython `displayio` driver for SSD1680-based ePaper displays
2424

25-
2625
Dependencies
2726
=============
2827
This driver depends on:
@@ -43,6 +42,31 @@ or individual libraries can be installed using
4342

4443
`Purchase the FeatherWing from the Adafruit shop <http://www.adafruit.com/products/4814>`_
4544

45+
Installing from PyPI
46+
=====================
47+
48+
On supported GNU/Linux systems like the Raspberry Pi, you can install the driver locally `from
49+
PyPI <https://pypi.org/project/adafruit-circuitpython-ssd1680/>`_. To install for current user:
50+
51+
.. code-block:: shell
52+
53+
pip3 install adafruit-circuitpython-ssd1680
54+
55+
To install system-wide (this may be required in some cases):
56+
57+
.. code-block:: shell
58+
59+
sudo pip3 install adafruit-circuitpython-ssd1680
60+
61+
To install in a virtual environment in your current project:
62+
63+
.. code-block:: shell
64+
65+
mkdir project-name && cd project-name
66+
python3 -m venv .env
67+
source .env/bin/activate
68+
pip3 install adafruit-circuitpython-ssd1680
69+
4670
Usage Example
4771
=============
4872

@@ -78,21 +102,22 @@ Usage Example
78102
79103
g = displayio.Group()
80104
105+
# CircuitPython 6 & 7 compatible
81106
f = open("/display-ruler.bmp", "rb")
82-
83107
pic = displayio.OnDiskBitmap(f)
84-
# CircuitPython 6 & 7 compatible
85108
t = displayio.TileGrid(
86109
pic, pixel_shader=getattr(pic, "pixel_shader", displayio.ColorConverter())
87110
)
88-
# CircuitPython 7 compatible only
111+
112+
# # CircuitPython 7 compatible only
113+
# pic = displayio.OnDiskBitmap("/display-ruler.bmp")
89114
# t = displayio.TileGrid(pic, pixel_shader=pic.pixel_shader)
115+
90116
g.append(t)
91117
92118
display.show(g)
93119
94120
display.refresh()
95-
96121
print("refreshed")
97122
98123
time.sleep(120)
@@ -108,5 +133,5 @@ before contributing to help this project stay welcoming.
108133
Documentation
109134
=============
110135

111-
For information on building library documentation, please check out
112-
`this guide <https://learn.adafruit.com/creating-and-sharing-a-circuitpython-library/sharing-our-docs-on-readthedocs#sphinx-5-1>`_.
136+
For information on building library documentation, please check out `this guide
137+
<https://learn.adafruit.com/creating-and-sharing-a-circuitpython-library/sharing-our-docs-on-readthedocs#sphinx-5-1>`_.

setup.py

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries
2+
#
3+
# SPDX-License-Identifier: MIT
4+
5+
"""A setuptools based setup module.
6+
7+
See:
8+
https://packaging.python.org/en/latest/distributing.html
9+
https://github.com/pypa/sampleproject
10+
"""
11+
12+
from setuptools import setup, find_packages
13+
14+
# To use a consistent encoding
15+
from codecs import open
16+
from os import path
17+
18+
here = path.abspath(path.dirname(__file__))
19+
20+
# Get the long description from the README file
21+
with open(path.join(here, "README.rst"), encoding="utf-8") as f:
22+
long_description = f.read()
23+
24+
setup(
25+
name="adafruit-circuitpython-ssd1680",
26+
use_scm_version=True,
27+
setup_requires=["setuptools_scm"],
28+
description="CircuitPython `displayio` drivers for SSD1680-based ePaper displays",
29+
long_description=long_description,
30+
long_description_content_type="text/x-rst",
31+
# The project's main homepage.
32+
url="https://github.com/adafruit/Adafruit_CircuitPython_SSD1680",
33+
# Author details
34+
author="Adafruit Industries",
35+
author_email="circuitpython@adafruit.com",
36+
install_requires=["Adafruit-Blinka"],
37+
# Choose your license
38+
license="MIT",
39+
# See https://pypi.python.org/pypi?%3Aaction=list_classifiers
40+
classifiers=[
41+
"Development Status :: 3 - Alpha",
42+
"Intended Audience :: Developers",
43+
"Topic :: Software Development :: Libraries",
44+
"Topic :: System :: Hardware",
45+
"License :: OSI Approved :: MIT License",
46+
"Programming Language :: Python :: 3",
47+
"Programming Language :: Python :: 3.4",
48+
"Programming Language :: Python :: 3.5",
49+
],
50+
# What does your project relate to?
51+
keywords="adafruit blinka circuitpython micropython ssd1680 displayio epd epaper",
52+
# You can just specify the packages manually here if your project is
53+
# simple. Or you can use find_packages().
54+
# TODO: IF LIBRARY FILES ARE A PACKAGE FOLDER,
55+
# CHANGE `py_modules=['...']` TO `packages=['...']`
56+
py_modules=["adafruit_ssd1680"],
57+
)

setup.py.disabled

Lines changed: 0 additions & 8 deletions
This file was deleted.

0 commit comments

Comments
 (0)