]> Repositories - Adafruit_Blinka-hackapet.git/commitdiff
Added versioning to board
authorJames Carr <lesamouraipourpre@gmail.com>
Tue, 21 Sep 2021 18:26:33 +0000 (19:26 +0100)
committerJames Carr <lesamouraipourpre@gmail.com>
Tue, 21 Sep 2021 18:26:33 +0000 (19:26 +0100)
.github/workflows/release.yml
setup.py
src/board.py

index 220e398e34de24d56a97bf359af1acb40c0c53dd..ce2635bceb9081de638d04215f237444feba87c4 100644 (file)
@@ -29,5 +29,8 @@ jobs:
         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/*
index 576afbdca29645bfa187c37de958fbae7b3b6e70..a18904c1d46871640d8b45be7acc970724866e0f 100755 (executable)
--- a/setup.py
+++ b/setup.py
@@ -34,7 +34,11 @@ if os.path.exists("/proc/device-tree/compatible"):
 
 setup(
     name="Adafruit-Blinka",
-    use_scm_version=True,
+    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="CircuitPython APIs for non-CircuitPython versions of Python such as CPython on Linux and MicroPython.",
     long_description=long_description,
@@ -53,10 +57,11 @@ setup(
         "board",
         "busio",
         "digitalio",
+        "keypad",
         "micropython",
+        "neopixel_write",
         "pulseio",
         "pwmio",
-        "neopixel_write",
         "rainbowio",
     ],
     package_data={
index af73c13de17e72d0ce2c96073b3735f11aa7e198..0de6c109f5a8147ec75c4af5aa4bd4b4454abd3b 100755 (executable)
@@ -27,6 +27,13 @@ See `CircuitPython:board` in CircuitPython for more details.
 
 * Author(s): cefn
 """
+
+
+__version__ = "0.0.0-auto.0"
+__repo__ = "https://github.com/adafruit/Adafruit_Blinka.git"
+__blinka__ = True
+
+
 import sys
 
 import adafruit_platformdetect.constants.boards as ap_board