Skip to content

Commit 833ebab

Browse files
committed
adding_library_installation_description and changing_from py_module to packages`
1 parent 36c7fca commit 833ebab

File tree

2 files changed

+24
-1
lines changed

2 files changed

+24
-1
lines changed

README.rst

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,29 @@ To install in a virtual environment in your current project:
5757
source .env/bin/activate
5858
pip3 install adafruit-circuitpython-dps310
5959
60+
61+
Installing to a connected CircuitPython Device
62+
==============================================
63+
Some devices, eg. the QT-PY, are very limited in memory. The DPS310 library contains
64+
two variants - basic and advanced - which give different levels of functionality.
65+
66+
Installing the DPS310 library could have the following outcomes:
67+
68+
* It installs successfully and your code runs successfully. Woo-hoo! Continue with
69+
your amazing project.
70+
* It installs successfully and your code fails to run with a memory allocation
71+
error. Try one of the following:
72+
73+
* If your ``code.py`` is large, especially if it has lots of comments, you
74+
can shrink it into a ``.mpy`` file instead. See the Adafruit
75+
`Learn Guide <https://learn.adafruit.com/Memory-saving-tips-for-CircuitPython/non-volatile-not-enough-disk-space>`_
76+
on shrinking your code.
77+
* Only use the basic DPS310 implementation, and remove the following file:
78+
``<CIRCUITPY>/lib/adafruit_dps310/advanced.mpy`` where <CIRCUITPY> is the
79+
mounted location of your device. Make sure that your code only uses the basic
80+
implementation.
81+
82+
6083
Usage Example
6184
=============
6285

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,5 +58,5 @@
5858
# simple. Or you can use find_packages().
5959
# TODO: IF LIBRARY FILES ARE A PACKAGE FOLDER,
6060
# CHANGE `py_modules=['...']` TO `packages=['...']`
61-
py_modules=["adafruit_dps310"],
61+
packages=["adafruit_dps310"],
6262
)

0 commit comments

Comments
 (0)