Skip to content

Commit 175fb64

Browse files
authored
Merge pull request #6 from lesamouraipourpre/pypi
Enable uploading of the driver to PyPI.
2 parents c569002 + 6df2d80 commit 175fb64

File tree

3 files changed

+90
-17
lines changed

3 files changed

+90
-17
lines changed

README.rst

Lines changed: 33 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ Introduction
2121

2222
CircuitPython `displayio` driver for SSD1681-based ePaper displays
2323

24-
2524
Dependencies
2625
=============
2726
This driver depends on:
@@ -38,6 +37,30 @@ Adafruit 1.54" Tri-Color eInk / ePaper 200x200 Display with SRAM
3837

3938
`Purchase one from the Adafruit shop <http://www.adafruit.com/products/4868>`_
4039

40+
Installing from PyPI
41+
=====================
42+
43+
On supported GNU/Linux systems like the Raspberry Pi, you can install the driver locally `from
44+
PyPI <https://pypi.org/project/adafruit-circuitpython-ssd1681/>`_. To install for current user:
45+
46+
.. code-block:: shell
47+
48+
pip3 install adafruit-circuitpython-ssd1681
49+
50+
To install system-wide (this may be required in some cases):
51+
52+
.. code-block:: shell
53+
54+
sudo pip3 install adafruit-circuitpython-ssd1681
55+
56+
To install in a virtual environment in your current project:
57+
58+
.. code-block:: shell
59+
60+
mkdir project-name && cd project-name
61+
python3 -m venv .env
62+
source .env/bin/activate
63+
pip3 install adafruit-circuitpython-ssd1681
4164
4265
Usage Example
4366
=============
@@ -47,7 +70,7 @@ Usage Example
4770
import time
4871
import board
4972
import displayio
50-
import adafruit_ssd1608
73+
import adafruit_ssd1681
5174
5275
displayio.release_displays()
5376
@@ -63,27 +86,28 @@ Usage Example
6386
)
6487
time.sleep(1)
6588
66-
display = adafruit_ssd1608.SSD1608(
89+
display = adafruit_ssd1681.SSD1681(
6790
display_bus, width=200, height=200, busy_pin=epd_busy, rotation=180
6891
)
6992
7093
g = displayio.Group()
7194
95+
# CircuitPython 6 & 7 compatible
7296
f = open("/display-ruler.bmp", "rb")
73-
7497
pic = displayio.OnDiskBitmap(f)
75-
# CircuitPython 6 & 7 compatible
7698
t = displayio.TileGrid(
7799
pic, pixel_shader=getattr(pic, "pixel_shader", displayio.ColorConverter())
78100
)
79-
# CircuitPython 7 compatible only
101+
102+
# # CircuitPython 7 compatible only
103+
# pic = displayio.OnDiskBitmap("/display-ruler.bmp")
80104
# t = displayio.TileGrid(pic, pixel_shader=pic.pixel_shader)
105+
81106
g.append(t)
82107
83108
display.show(g)
84109
85110
display.refresh()
86-
87111
print("refreshed")
88112
89113
time.sleep(120)
@@ -98,5 +122,5 @@ before contributing to help this project stay welcoming.
98122
Documentation
99123
=============
100124

101-
For information on building library documentation, please check out
102-
`this guide <https://learn.adafruit.com/creating-and-sharing-a-circuitpython-library/sharing-our-docs-on-readthedocs#sphinx-5-1>`_.
125+
For information on building library documentation, please check out `this guide
126+
<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-ssd1681",
26+
use_scm_version=True,
27+
setup_requires=["setuptools_scm"],
28+
description="CircuitPython `displayio` drivers for SSD1681-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_SSD1681",
33+
# Author details
34+
author="Adafruit Industries",
35+
author_email="[email protected]",
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 ssd1681 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_ssd1681"],
57+
)

setup.py.disabled

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

0 commit comments

Comments
 (0)