-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add CircuitPython libraries to pypi #979
Comments
Changes per instructions here: adafruit/circuitpython#979 ...builds locally. Let's see what Travis thinks.
Changes per instructions here: adafruit/circuitpython#979
@tannewt Mark |
Per instructions at: adafruit/circuitpython#979
Hey @Navyjetfixer. Sorry for the silence. I've been busy. What libraries are you looking to have? Steps 5-8 above are ones you should be able to help with to get started. Someone can then follow up with the others. Thanks! |
I was unable to get Following |
I was attempting to install Motor and PCA9686 on my Pi this morning when I saw the builds were requested in Travis, but did not go through to deploy due to an error in I suggest adding a few steps to the workflow to prevent this:
|
This has been completed on everything except CircuitPlayground Express Otherwise, this is completed for all existing libraries and helper functions. |
We want to use CircuitPython libraries on other platforms such as CPython on Raspberry Pi and MicroPython. To do so, we need to better document the dependencies and get builds auto-released to pypi where
pip
gets them from.Requirements
To do this work you'll need the
adafruit-travis
pypi username and password. You will also needadafruit-adabot
s GitHub password. Please contact @tannewt or @kattni if you are interested.You must have Ruby and
travis
installed. Instructions can be found on the Travis CI repo. On Mac OS, once you have Ruby updated, if you run into issues, you canbrew install travis
(see comment below for details).Instructions
Upgrading a repo requires a number of steps:
travis
(the Ruby CLI) to encrypt the pypi password into the travis.yml. The blob changes every repo. You MUST be logged into the Travis CLI using theadafruit-adabot
GitHub credentials. Runtravis encrypt --com --add deploy.password
and follow the prompt. It will reformat the.travis.yml
and drop the header comment. That's ok and can be left as is. The result will be that .travis.yml has something like this:-
beforeprovider: releases
and addoverwrite: true
as well.&& cd ..
to the end. The end result is:- cd docs && sphinx-build -E -W -b html . _build/html && cd ..
- pip install -r requirements.txt
into.travis.yml
. Full section:note circuitpython-travis-build-tools was renamed circuitpython-build-tools
setup.py
file to the repo. Change the name to match the GitHub repo except lowercase and-
instead of_
. Update the description, url and packages list. If the library is a single py file replacepackages
withpy_modules
. They both take a list without the .py extension. Here is a full example:if its a single-python-file type driver, use something like:
py_modules=['adafruit_mcp230xx'],
install_requires
requirements.txt
file. Check the source files for imports from other libraries and add them in both places. If CircuitPython APIs are used such asdigitalio
,busio
orfrom micropython import const
then addAdafruit-Blinka
as a dependency.adafruit-circuitpython-bus-device
toadafruit-circuitpython-busdevice
in requirements.txtdocs/conf.py
because sphinx and Travis will install therequirements.txt
before running sphinx.python3 setup.py sdist
.TODO
The text was updated successfully, but these errors were encountered: