From c69768687e40dce1382da9c80b16443d9270d466 Mon Sep 17 00:00:00 2001 From: dherrada Date: Wed, 1 Jul 2020 16:46:39 -0400 Subject: [PATCH 1/2] Should fix readme rendering for pypi --- README.rst | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/README.rst b/README.rst index 8346838..3df7397 100644 --- a/README.rst +++ b/README.rst @@ -23,7 +23,24 @@ Only certain types of bitmaps work with this library, and they often have to be Usage Example ============= -.. literalinclude:: ../examples/imageload_simpletest.py +.. code-block:: python + + import board + import displayio + import adafruit_imageload + + image, palette = adafruit_imageload.load( + "images/4bit.bmp", bitmap=displayio.Bitmap, palette=displayio.Palette + ) + tile_grid = displayio.TileGrid(image, pixel_shader=palette) + + group = displayio.Group() + group.append(tile_grid) + board.DISPLAY.show(group) + + while True: + pass + Contributing ============ From 4ef74d79dc8d89c43719eb52e4efd62b1abe39f3 Mon Sep 17 00:00:00 2001 From: dherrada Date: Wed, 1 Jul 2020 17:03:19 -0400 Subject: [PATCH 2/2] Added section to build.yml that builds the pypi package --- .github/workflows/build.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b6977a9..5abe58d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -55,3 +55,9 @@ jobs: - name: Build docs working-directory: docs run: sphinx-build -E -W -b html . _build/html + - name: Build Python package + run: | + pip install --upgrade setuptools wheel twine readme_renderer testresources + python setup.py sdist + python setup.py bdist_wheel --universal + twine check dist/*