]> Repositories - Adafruit_Blinka-hackapet.git/commitdiff
Merge pull request #508 from lesamouraipourpre/versioning
authorMelissa LeBlanc-Williams <melissa@adafruit.com>
Tue, 21 Sep 2021 00:23:52 +0000 (17:23 -0700)
committerGitHub <noreply@github.com>
Tue, 21 Sep 2021 00:23:52 +0000 (17:23 -0700)
Add versioning to the top-level Python files

13 files changed:
.github/workflows/release.yml
setup.py
src/analogio.py
src/bitbangio.py
src/board.py
src/busio.py
src/digitalio.py
src/keypad.py
src/micropython.py
src/neopixel_write.py
src/pulseio.py
src/pwmio.py
src/rainbowio.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 0016505a21d54030f35e68ffa980dbbbd7446b51..6d5821a2a1052b4cd2dec2f704fab44ed9e032e2 100644 (file)
@@ -7,6 +7,11 @@ Not supported by all boards.
 * Author(s): Carter Nelson, Melissa LeBlanc-Williams
 """
 
+
+__version__ = "0.0.0-auto.0"
+__repo__ = "https://github.com/adafruit/Adafruit_Blinka.git"
+
+
 import sys
 
 from adafruit_blinka.agnostic import detector
index d13b743a4a5f44c573be0ec9e1ad7db6b810a84b..e63168fbbf0484e96b6d99acb1474bc2a6a2dab9 100755 (executable)
@@ -7,6 +7,11 @@ See `CircuitPython:bitbangio` in CircuitPython for more details.
 * Author(s): cefn
 """
 
+
+__version__ = "0.0.0-auto.0"
+__repo__ = "https://github.com/adafruit/Adafruit_Blinka.git"
+
+
 import adafruit_platformdetect.constants.boards as ap_board
 from adafruit_blinka import Lockable, agnostic
 
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
index 46d0f9ba90cdcf81f6da910ede1c5cafcefaa99e..ea415162248749d369bd11e426e0a655c2bb2e2b 100755 (executable)
@@ -7,6 +7,11 @@ See `CircuitPython:busio` in CircuitPython for more details.
 * Author(s): cefn
 """
 
+
+__version__ = "0.0.0-auto.0"
+__repo__ = "https://github.com/adafruit/Adafruit_Blinka.git"
+
+
 try:
     import threading
 except ImportError:
index ad05cb30dc9ac6b731d58f44fe1481f0ebde808d..2df60818794620f15a036cf44bead2bb5e72b35f 100755 (executable)
@@ -7,6 +7,11 @@ See `CircuitPython:digitalio` in CircuitPython for more details.
 * Author(s): cefn
 """
 
+
+__version__ = "0.0.0-auto.0"
+__repo__ = "https://github.com/adafruit/Adafruit_Blinka.git"
+
+
 from adafruit_blinka.agnostic import board_id, detector
 
 # pylint: disable=ungrouped-imports,wrong-import-position
index 97c58e782e9dc9f84ddca6f33e75f2cf485c73bc..0dd05e93b5b62131aff6eee80fb2dc88be75fd31 100644 (file)
@@ -6,6 +6,11 @@ See `CircuitPython:keypad` in CircuitPython for more details.
 * Author(s): Melissa LeBlanc-Williams
 """
 
+
+__version__ = "0.0.0-auto.0"
+__repo__ = "https://github.com/adafruit/Adafruit_Blinka.git"
+
+
 import time
 import threading
 from collections import deque
index 5f369e3f0df022d3594edd97633e5093ed303266..62698c8d06a5c0b34a0e277850ae1a68d88d12b8 100755 (executable)
@@ -6,6 +6,10 @@
 """
 
 
+__version__ = "0.0.0-auto.0"
+__repo__ = "https://github.com/adafruit/Adafruit_Blinka.git"
+
+
 def const(x):
     "Emulate making a constant"
     return x
index 2097c84915b5fad24edb02884e816a9286388bbc..953a36577f585c80708077e00e9683044bb9080f 100644 (file)
@@ -8,6 +8,11 @@ Currently supported on Raspberry Pi only.
 * Author(s): ladyada
 """
 
+
+__version__ = "0.0.0-auto.0"
+__repo__ = "https://github.com/adafruit/Adafruit_Blinka.git"
+
+
 import sys
 
 from adafruit_blinka.agnostic import detector
index dc20e3dc029ab97207794897584b41925fa1b4f6..c12d1890876502fb70416912184e3e9f2e029d1b 100644 (file)
@@ -7,6 +7,11 @@ Not supported by all boards.
 * Author(s): Melissa LeBlanc-Williams
 """
 
+
+__version__ = "0.0.0-auto.0"
+__repo__ = "https://github.com/adafruit/Adafruit_Blinka.git"
+
+
 import sys
 
 from adafruit_blinka.agnostic import detector
index f59805852b52d95d3f67033a36ac9764dba6c33c..4299f54678d85cbfd22180ad9645a7383e2b9fb6 100644 (file)
@@ -7,6 +7,11 @@ Not supported by all boards.
 * Author(s): Melissa LeBlanc-Williams
 """
 
+
+__version__ = "0.0.0-auto.0"
+__repo__ = "https://github.com/adafruit/Adafruit_Blinka.git"
+
+
 import sys
 
 from adafruit_blinka.agnostic import detector
index e852d83d9003cb61e04dde01443571083e0d8905..b7bc06a8110b558e29d4c534ed1322d1c9fbd693 100644 (file)
@@ -8,6 +8,10 @@ Not supported by all boards.
 """
 
 
+__version__ = "0.0.0-auto.0"
+__repo__ = "https://github.com/adafruit/Adafruit_Blinka.git"
+
+
 def colorwheel(color_value):
     """
     A colorwheel. ``0`` and ``255`` are red, ``85`` is green, and ``170`` is blue, with the values