diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f3a4593..041a337 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -10,71 +10,5 @@ jobs: test: runs-on: ubuntu-latest steps: - - name: Dump GitHub context - env: - GITHUB_CONTEXT: ${{ toJson(github) }} - run: echo "$GITHUB_CONTEXT" - - name: Translate Repo Name For Build Tools filename_prefix - id: repo-name - run: | - echo ::set-output name=repo-name::$( - echo ${{ github.repository }} | - awk -F '\/' '{ print tolower($2) }' | - tr '_' '-' - ) - - name: Set up Python 3.x - uses: actions/setup-python@v2 - with: - python-version: "3.x" - - name: Versions - run: | - python3 --version - - name: Checkout Current Repo - uses: actions/checkout@v1 - with: - submodules: true - - name: Checkout tools repo - uses: actions/checkout@v2 - with: - repository: adafruit/actions-ci-circuitpython-libs - path: actions-ci - - name: Install dependencies - # (e.g. - apt-get: gettext, etc; pip: circuitpython-build-tools, requirements.txt; etc.) - run: | - source actions-ci/install.sh - - name: Pip install pylint, Sphinx, pre-commit - run: | - pip install --force-reinstall pylint Sphinx sphinx-rtd-theme pre-commit - - name: Library version - run: git describe --dirty --always --tags - - name: Setup problem matchers - uses: adafruit/circuitpython-action-library-ci-problem-matchers@v1 - - name: Pre-commit hooks - run: | - pre-commit run --all-files - - name: Build assets - run: circuitpython-build-bundles --filename_prefix ${{ steps.repo-name.outputs.repo-name }} --library_location . - - name: Archive bundles - uses: actions/upload-artifact@v2 - with: - name: bundles - path: ${{ github.workspace }}/bundles/ - - name: Check For docs folder - id: need-docs - run: | - echo ::set-output name=docs::$( find . -wholename './docs' ) - - name: Build docs - if: contains(steps.need-docs.outputs.docs, 'docs') - working-directory: docs - run: sphinx-build -E -W -b html . _build/html - - name: Check For setup.py - id: need-pypi - run: | - echo ::set-output name=setup-py::$( find . -wholename './setup.py' ) - - name: Build Python package - if: contains(steps.need-pypi.outputs.setup-py, 'setup.py') - run: | - pip install --upgrade setuptools wheel twine readme_renderer testresources - python setup.py sdist - python setup.py bdist_wheel --universal - twine check dist/* + - name: Run Build CI workflow + uses: adafruit/workflows-circuitpython-libs/build@main diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml deleted file mode 100644 index b279a99..0000000 --- a/.github/workflows/release.yml +++ /dev/null @@ -1,88 +0,0 @@ -# SPDX-FileCopyrightText: 2017 Scott Shawcroft, written for Adafruit Industries -# -# SPDX-License-Identifier: MIT - -name: Release Actions - -on: - release: - types: [published] - -jobs: - upload-release-assets: - runs-on: ubuntu-latest - steps: - - name: Dump GitHub context - env: - GITHUB_CONTEXT: ${{ toJson(github) }} - run: echo "$GITHUB_CONTEXT" - - name: Translate Repo Name For Build Tools filename_prefix - id: repo-name - run: | - echo ::set-output name=repo-name::$( - echo ${{ github.repository }} | - awk -F '\/' '{ print tolower($2) }' | - tr '_' '-' - ) - - name: Set up Python 3.x - uses: actions/setup-python@v2 - with: - python-version: "3.x" - - name: Versions - run: | - python3 --version - - name: Checkout Current Repo - uses: actions/checkout@v1 - with: - submodules: true - - name: Checkout tools repo - uses: actions/checkout@v2 - with: - repository: adafruit/actions-ci-circuitpython-libs - path: actions-ci - - name: Install deps - run: | - source actions-ci/install.sh - - name: Build assets - run: circuitpython-build-bundles --filename_prefix ${{ steps.repo-name.outputs.repo-name }} --library_location . - - name: Upload Release Assets - # the 'official' actions version does not yet support dynamically - # supplying asset names to upload. @csexton's version chosen based on - # discussion in the issue below, as its the simplest to implement and - # allows for selecting files with a pattern. - # https://github.com/actions/upload-release-asset/issues/4 - #uses: actions/upload-release-asset@v1.0.1 - uses: csexton/release-asset-action@master - with: - pattern: "bundles/*" - github-token: ${{ secrets.GITHUB_TOKEN }} - - upload-pypi: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v1 - - name: Check For setup.py - id: need-pypi - run: | - echo ::set-output name=setup-py::$( find . -wholename './setup.py' ) - - name: Set up Python - if: contains(steps.need-pypi.outputs.setup-py, 'setup.py') - uses: actions/setup-python@v2 - with: - python-version: '3.x' - - name: Install dependencies - if: contains(steps.need-pypi.outputs.setup-py, 'setup.py') - run: | - python -m pip install --upgrade pip - pip install setuptools wheel twine - - name: Build and publish - if: contains(steps.need-pypi.outputs.setup-py, 'setup.py') - env: - TWINE_USERNAME: ${{ secrets.pypi_username }} - TWINE_PASSWORD: ${{ secrets.pypi_password }} - run: | - for file in $(find -not -path "./.*" -not -path "./docs*" -name "*.py"); do - sed -i -e "s/0.0.0-auto.0/${{github.event.release.tag_name}}/" $file; - done; - python setup.py sdist - twine upload dist/* diff --git a/.github/workflows/release_gh.yml b/.github/workflows/release_gh.yml new file mode 100644 index 0000000..423009e --- /dev/null +++ b/.github/workflows/release_gh.yml @@ -0,0 +1,23 @@ +# SPDX-FileCopyrightText: 2017 Scott Shawcroft, written for Adafruit Industries +# +# SPDX-License-Identifier: MIT + +name: GitHub Release Actions + +on: + release: + types: [published] + +jobs: + upload-release-assets: + runs-on: ubuntu-latest + steps: + - name: Run GitHub Release CI workflow + uses: adafruit/workflows-circuitpython-libs/release-gh@main + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + upload-url: ${{ github.event.release.upload_url }} + # TODO: If you're creating a package (library is a folder), add this + # argument along with the prefix (or full name) of the package folder + # so the MPY bundles are built correctly:s + # package-prefix: displayio_effects diff --git a/.github/workflows/release_pypi.yml b/.github/workflows/release_pypi.yml new file mode 100644 index 0000000..65775b7 --- /dev/null +++ b/.github/workflows/release_pypi.yml @@ -0,0 +1,19 @@ +# SPDX-FileCopyrightText: 2017 Scott Shawcroft, written for Adafruit Industries +# +# SPDX-License-Identifier: MIT + +name: PyPI Release Actions + +on: + release: + types: [published] + +jobs: + upload-release-assets: + runs-on: ubuntu-latest + steps: + - name: Run PyPI Release CI workflow + uses: adafruit/workflows-circuitpython-libs/release-pypi@main + with: + pypi-username: ${{ secrets.pypi_username }} + pypi-password: ${{ secrets.pypi_password }} diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 0afe50a..ff19dde 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,40 +1,21 @@ -# SPDX-FileCopyrightText: 2020 Diego Elio Pettenò +# SPDX-FileCopyrightText: 2024 Justin Myers for Adafruit Industries # # SPDX-License-Identifier: Unlicense repos: -- repo: https://github.com/python/black - rev: 20.8b1 + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v4.5.0 hooks: - - id: black -- repo: https://github.com/fsfe/reuse-tool - rev: v0.12.1 + - id: check-yaml + - id: end-of-file-fixer + - id: trailing-whitespace + - repo: https://github.com/astral-sh/ruff-pre-commit + rev: v0.3.4 hooks: - - id: reuse -- repo: https://github.com/pre-commit/pre-commit-hooks - rev: v2.3.0 + - id: ruff-format + - id: ruff + args: ["--fix"] + - repo: https://github.com/fsfe/reuse-tool + rev: v3.0.1 hooks: - - id: check-yaml - - id: end-of-file-fixer - - id: trailing-whitespace -- repo: https://github.com/pycqa/pylint - rev: pylint-2.7.1 - hooks: - - id: pylint - name: pylint (library code) - types: [python] - exclude: "^(docs/|examples/|tests/|setup.py$)" -- repo: local - hooks: - - id: pylint_examples - name: pylint (examples code) - description: Run pylint rules on "examples/*.py" files - entry: /usr/bin/env bash -c - args: ['([[ ! -d "examples" ]] || for example in $(find . -path "./examples/*.py"); do pylint --disable=missing-docstring,invalid-name,consider-using-f-string $example; done)'] - language: system - - id: pylint_tests - name: pylint (tests code) - description: Run pylint rules on "tests/*.py" files - entry: /usr/bin/env bash -c - args: ['([[ ! -d "tests" ]] || for test in $(find . -path "./tests/*.py"); do pylint --disable=missing-docstring $test; done)'] - language: system + - id: reuse diff --git a/.readthedocs.yaml b/.readthedocs.yaml index b79ec5b..ee38fa0 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -8,8 +8,11 @@ # Required version: 2 +sphinx: + configuration: docs/conf.py + build: - os: ubuntu-20.04 + os: ubuntu-lts-latest tools: python: "3" diff --git a/README.rst b/README.rst index 88544ca..d9b4e88 100644 --- a/README.rst +++ b/README.rst @@ -17,9 +17,9 @@ Introduction :alt: Build Status -.. image:: https://img.shields.io/badge/code%20style-black-000000.svg - :target: https://github.com/psf/black - :alt: Code Style: Black +.. image:: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json + :target: https://github.com/astral-sh/ruff + :alt: Code Style: Ruff Add some flair to your widgets with effects! diff --git a/displayio_effects/__init__.py b/displayio_effects/__init__.py index 021b2bf..c1bc85a 100644 --- a/displayio_effects/__init__.py +++ b/displayio_effects/__init__.py @@ -21,9 +21,9 @@ https://circuitpython.org/downloads """ - WIDGET_TYPE_ATTR = "_widget_type" + # pylint: disable=too-few-public-methods class WidgetType: """Enum values for customizable widget types. Valid options are: diff --git a/displayio_effects/colorwheel_effect.py b/displayio_effects/colorwheel_effect.py index eb64bf4..9f16aa7 100644 --- a/displayio_effects/colorwheel_effect.py +++ b/displayio_effects/colorwheel_effect.py @@ -4,7 +4,7 @@ # SPDX-License-Identifier: MIT # pylint: disable=protected-access """ -`displayio_effects.fluctuation_effect` +`displayio_effects.colorwheel_effect` ================================================================================ Add the colorwheel effect to your widgets @@ -21,9 +21,10 @@ https://circuitpython.org/downloads """ +from adafruit_itertools import cycle from rainbowio import colorwheel -from adafruit_itertools.adafruit_itertools import cycle -from displayio_effects import WidgetType, WIDGET_TYPE_ATTR + +from displayio_effects import WIDGET_TYPE_ATTR, WidgetType __version__ = "0.0.0-auto.0" __repo__ = "https://github.com/tekktrik/CircuitPython_Org_DisplayIO_Effects.git" @@ -69,9 +70,7 @@ def hook_colorwheel_effect(widget_class, widget_type): """ if not COLORWHEEL_WIDGET_VALUES.get(widget_type): - raise ValueError( - "The given widget does not have the ability to use this effect" - ) + raise ValueError("The given widget does not have the ability to use this effect") setattr(widget_class, WIDGET_TYPE_ATTR, widget_type) diff --git a/displayio_effects/fluctuation_effect.py b/displayio_effects/fluctuation_effect.py index fef7a8c..d7b8e32 100644 --- a/displayio_effects/fluctuation_effect.py +++ b/displayio_effects/fluctuation_effect.py @@ -22,7 +22,8 @@ """ import random -from displayio_effects import WidgetType, WIDGET_TYPE_ATTR + +from displayio_effects import WIDGET_TYPE_ATTR, WidgetType __version__ = "0.0.0-auto.0" __repo__ = "https://github.com/tekktrik/CircuitPython_Org_DisplayIO_Effects.git" @@ -79,11 +80,10 @@ def update_fluctuation(self): self._fluctuation_destination = None return - if self._fluctuation_destination in (None, self._fluctuation_hold_value): + if self._fluctuation_destination in {None, self._fluctuation_hold_value}: limit_bound = self._fluctuation_amplitude * 10 self._fluctuation_destination = ( - random.uniform(-limit_bound, limit_bound) / 10 - + self._fluctuation_hold_value + random.uniform(-limit_bound, limit_bound) / 10 + self._fluctuation_hold_value ) value = getattr(self, value_name) @@ -124,9 +124,7 @@ def hook_fluctuation_effect(widget_class, widget_type): """ if not FLUCTUATION_WIDGET_VALUES.get(widget_type): - raise ValueError( - "The given widget does not have the ability to use this effect" - ) + raise ValueError("The given widget does not have the ability to use this effect") setattr(widget_class, WIDGET_TYPE_ATTR, widget_type) diff --git a/docs/api.rst b/docs/api.rst index e8830c9..357234c 100644 --- a/docs/api.rst +++ b/docs/api.rst @@ -4,5 +4,11 @@ .. If your library file(s) are nested in a directory (e.g. /adafruit_foo/foo.py) .. use this format as the module name: "adafruit_foo.foo" +API Reference +############# + .. automodule:: displayio_effects.fluctuation_effect :members: + +.. automodule:: displayio_effects.colorwheel_effect + :members: diff --git a/docs/conf.py b/docs/conf.py index 1761605..3e9ca3d 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -1,9 +1,8 @@ -# -*- coding: utf-8 -*- - # SPDX-FileCopyrightText: 2017 Scott Shawcroft, written for Adafruit Industries # # SPDX-License-Identifier: MIT +import datetime import os import sys @@ -16,6 +15,7 @@ # ones. extensions = [ "sphinx.ext.autodoc", + "sphinxcontrib.jquery", "sphinx.ext.intersphinx", "sphinx.ext.napoleon", "sphinx.ext.todo", @@ -27,6 +27,7 @@ # autodoc module docs will fail to generate with a warning. # autodoc_mock_imports = ["digitalio", "busio"] +autodoc_preserve_defaults = True intersphinx_mapping = { "python": ("https://docs.python.org/3", None), @@ -46,7 +47,12 @@ # General information about the project. project = "CircuitPython DisplayIO_Effects Library" -copyright = "2022 Alec Delaney" +creation_year = "2022" +current_year = str(datetime.datetime.now().year) +year_duration = ( + current_year if current_year == creation_year else creation_year + " - " + current_year +) +copyright = year_duration + " Alec Delaney" author = "Alec Delaney" # The version info for the project you're documenting, acts as replacement for @@ -63,7 +69,7 @@ # # This is also used if you do content translation via gettext catalogs. # Usually you set "language" from the command line for these cases. -language = None +language = "en" # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. @@ -101,19 +107,9 @@ # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. # -on_rtd = os.environ.get("READTHEDOCS", None) == "True" - -if not on_rtd: # only import and set the theme if we're building docs locally - try: - import sphinx_rtd_theme - - html_theme = "sphinx_rtd_theme" - html_theme_path = [sphinx_rtd_theme.get_html_theme_path(), "."] - except: - html_theme = "default" - html_theme_path = ["."] -else: - html_theme_path = ["."] +import sphinx_rtd_theme + +html_theme = "sphinx_rtd_theme" # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, diff --git a/examples/displayio_effects_colorwheel.py b/examples/displayio_effects_colorwheel.py index d772726..96b2471 100644 --- a/examples/displayio_effects_colorwheel.py +++ b/examples/displayio_effects_colorwheel.py @@ -8,10 +8,12 @@ """ import time + import board import displayio import terminalio from displayio_dial import Dial + from displayio_effects import WidgetType, colorwheel_effect # Fonts used for the Dial tick labels @@ -47,12 +49,11 @@ my_group = displayio.Group() my_group.append(my_dial) -display.show(my_group) # add high level Group to the display +display.root_group = my_group # add high level Group to the display # Set the dial to the value before turning on the fluctuation effect my_dial.value = 50 while True: - my_dial.update_colorwheel() time.sleep(0.01) diff --git a/examples/displayio_effects_gauge.py b/examples/displayio_effects_gauge.py index 122481c..a6caa8a 100644 --- a/examples/displayio_effects_gauge.py +++ b/examples/displayio_effects_gauge.py @@ -6,11 +6,12 @@ Use the random fluctuation effect for the Gauge. """ - import time + import board import displayio from displayio_gauge import Gauge + from displayio_effects import WidgetType, fluctuation_effect display = board.DISPLAY @@ -24,7 +25,7 @@ color_palette[0] = 0x000000 bg_sprite = displayio.TileGrid(color_bitmap, pixel_shader=color_palette, x=0, y=0) main_group.append(bg_sprite) -display.show(main_group) +display.root_group = main_group fluctuation_effect.hook_fluctuation_effect(Gauge, WidgetType.GAUGE) @@ -45,5 +46,4 @@ while True: - my_gauge.update_fluctuation() diff --git a/examples/displayio_effects_simpletest.py b/examples/displayio_effects_simpletest.py index ea7dfda..a33362c 100644 --- a/examples/displayio_effects_simpletest.py +++ b/examples/displayio_effects_simpletest.py @@ -11,6 +11,7 @@ import displayio import terminalio from displayio_dial import Dial + from displayio_effects import WidgetType, fluctuation_effect # Fonts used for the Dial tick labels @@ -47,7 +48,7 @@ my_group = displayio.Group() my_group.append(my_dial) -display.show(my_group) # add high level Group to the display +display.root_group = my_group # add high level Group to the display # Set the dial to the value before turning on the fluctuation effect my_dial.value = 50 @@ -56,5 +57,4 @@ my_dial.fluctuation_move_rate = 0.01 # Fluctuate at "0.01" per throttle_update() while True: - my_dial.update_fluctuation() diff --git a/pyproject.toml b/pyproject.toml index f3c35ae..89476f8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,50 @@ -# SPDX-FileCopyrightText: 2020 Diego Elio Pettenò +# SPDX-FileCopyrightText: 2022 Alec Delaney, written for Adafruit Industries +# SPDX-FileCopyrightText: Copyright (c) 2025 Alec Delaney for circuitpython # -# SPDX-License-Identifier: Unlicense +# SPDX-License-Identifier: MIT -[tool.black] -target-version = ['py35'] +[build-system] +requires = [ + "setuptools", + "wheel", + "setuptools-scm", +] + +[project] +name = "circuitpython-displayio-effects" +description = "Add some flair to your displayio widgets with effects!" +version = "0.0.0+auto.0" +readme = "README.rst" +authors = [ + {name = "circuitpython"} +] +urls = {Homepage = "https://github.com/circuitpython/CircuitPython_Org_DisplayIO_Effects"} +keywords = [ + "adafruit", + "blinka", + "circuitpython", + "micropython", + "displayio_effects", + "effects,", + "displayio,", + "widget", +] +license = {text = "MIT"} +classifiers = [ + "Intended Audience :: Developers", + "Topic :: Software Development :: Libraries", + "Topic :: Software Development :: Embedded Systems", + "Topic :: System :: Hardware", + "License :: OSI Approved :: MIT License", + "Programming Language :: Python :: 3", +] +dynamic = ["dependencies", "optional-dependencies"] + +[tool.setuptools] +# TODO: IF LIBRARY FILES ARE A PACKAGE FOLDER, +# CHANGE `py_modules = ['...']` TO `packages = ['...']` +packages = ["displayio_effects"] + +[tool.setuptools.dynamic] +dependencies = {file = ["requirements.txt"]} +optional-dependencies = {optional = {file = ["optional_requirements.txt"]}} diff --git a/requirements.txt b/requirements.txt index dc267ca..7071aa9 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,3 +4,4 @@ # SPDX-License-Identifier: MIT Adafruit-Blinka +adafruit-circuitpython-itertools diff --git a/ruff.toml b/ruff.toml new file mode 100644 index 0000000..970c292 --- /dev/null +++ b/ruff.toml @@ -0,0 +1,100 @@ +# SPDX-FileCopyrightText: 2024 Tim Cocks for Adafruit Industries +# +# SPDX-License-Identifier: MIT + +target-version = "py38" +line-length = 100 + +[lint] +preview = true +select = ["I", "PL", "UP"] + +extend-select = [ + "D419", # empty-docstring + "E501", # line-too-long + "W291", # trailing-whitespace + "PLC0414", # useless-import-alias + "PLC2401", # non-ascii-name + "PLC2801", # unnecessary-dunder-call + "PLC3002", # unnecessary-direct-lambda-call + "E999", # syntax-error + "PLE0101", # return-in-init + "F706", # return-outside-function + "F704", # yield-outside-function + "PLE0116", # continue-in-finally + "PLE0117", # nonlocal-without-binding + "PLE0241", # duplicate-bases + "PLE0302", # unexpected-special-method-signature + "PLE0604", # invalid-all-object + "PLE0605", # invalid-all-format + "PLE0643", # potential-index-error + "PLE0704", # misplaced-bare-raise + "PLE1141", # dict-iter-missing-items + "PLE1142", # await-outside-async + "PLE1205", # logging-too-many-args + "PLE1206", # logging-too-few-args + "PLE1307", # bad-string-format-type + "PLE1310", # bad-str-strip-call + "PLE1507", # invalid-envvar-value + "PLE2502", # bidirectional-unicode + "PLE2510", # invalid-character-backspace + "PLE2512", # invalid-character-sub + "PLE2513", # invalid-character-esc + "PLE2514", # invalid-character-nul + "PLE2515", # invalid-character-zero-width-space + "PLR0124", # comparison-with-itself + "PLR0202", # no-classmethod-decorator + "PLR0203", # no-staticmethod-decorator + "UP004", # useless-object-inheritance + "PLR0206", # property-with-parameters + "PLR0904", # too-many-public-methods + "PLR0911", # too-many-return-statements + "PLR0912", # too-many-branches + "PLR0913", # too-many-arguments + "PLR0914", # too-many-locals + "PLR0915", # too-many-statements + "PLR0916", # too-many-boolean-expressions + "PLR1702", # too-many-nested-blocks + "PLR1704", # redefined-argument-from-local + "PLR1711", # useless-return + "C416", # unnecessary-comprehension + "PLR1733", # unnecessary-dict-index-lookup + "PLR1736", # unnecessary-list-index-lookup + + # ruff reports this rule is unstable + #"PLR6301", # no-self-use + + "PLW0108", # unnecessary-lambda + "PLW0120", # useless-else-on-loop + "PLW0127", # self-assigning-variable + "PLW0129", # assert-on-string-literal + "B033", # duplicate-value + "PLW0131", # named-expr-without-context + "PLW0245", # super-without-brackets + "PLW0406", # import-self + "PLW0602", # global-variable-not-assigned + "PLW0603", # global-statement + "PLW0604", # global-at-module-level + + # fails on the try: import typing used by libraries + #"F401", # unused-import + + "F841", # unused-variable + "E722", # bare-except + "PLW0711", # binary-op-exception + "PLW1501", # bad-open-mode + "PLW1508", # invalid-envvar-default + "PLW1509", # subprocess-popen-preexec-fn + "PLW2101", # useless-with-lock + "PLW3301", # nested-min-max +] + +ignore = [ + "PLR2004", # magic-value-comparison + "UP030", # format literals + "PLW1514", # unspecified-encoding + +] + +[format] +line-ending = "lf" diff --git a/setup.py b/setup.py deleted file mode 100644 index bf40135..0000000 --- a/setup.py +++ /dev/null @@ -1,63 +0,0 @@ -# SPDX-FileCopyrightText: 2017 Scott Shawcroft, written for Adafruit Industries -# SPDX-FileCopyrightText: Copyright (c) 2022 Alec Delaney for CircuitPython Organization -# -# SPDX-License-Identifier: MIT - -"""A setuptools based setup module. - -See: -https://packaging.python.org/en/latest/distributing.html -https://github.com/pypa/sampleproject -""" - -from setuptools import setup, find_packages - -# To use a consistent encoding -from codecs import open -from os import path - -here = path.abspath(path.dirname(__file__)) - -# Get the long description from the README file -with open(path.join(here, "README.rst"), encoding="utf-8") as f: - long_description = f.read() - -setup( - # CircuitPython Org Bundle Information - name="circuitpython-displayio-effects", - use_scm_version={ - # This is needed for the PyPI version munging in the Github Actions release.yml - "git_describe_command": "git describe --tags --long", - "local_scheme": "no-local-version", - }, - setup_requires=["setuptools_scm"], - description="Add some flair to your widgets with effects!", - long_description=long_description, - long_description_content_type="text/x-rst", - # The project's main homepage. - url="https://github.com/tekktrik/CircuitPython_Org_DisplayIO_Effects.git", - # Author details - author="Alec Delaney", - author_email="", # TODO: Add your email here - install_requires=[ - "Adafruit-Blinka", - ], - # Choose your license - license="MIT", - # See https://pypi.python.org/pypi?%3Aaction=list_classifiers - classifiers=[ - "Development Status :: 3 - Alpha", - "Intended Audience :: Developers", - "Topic :: Software Development :: Libraries", - "Topic :: System :: Hardware", - "License :: OSI Approved :: MIT License", - "Programming Language :: Python :: 3", - ], - # What does your project relate to? - keywords="adafruit blinka circuitpython micropython displayio_effects effects, displayio, widget", - # You can just specify the packages manually here if your project is - # simple. Or you can use find_packages(). - # TODO: IF LIBRARY FILES ARE A PACKAGE FOLDER, - # CHANGE `py_modules=['...']` TO `packages=['...']` - py_modules=["displayio_effects"], -)