Skip to content

Commit 53f239d

Browse files
authored
Merge pull request #33 from tekktrik/dev/populate-version
Allow __version__ population, fix problem matchers
2 parents d4d2e99 + dcf12f9 commit 53f239d

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

.github/workflows/build.yml

+5-2
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ jobs:
4747
pip install --force-reinstall Sphinx sphinx-rtd-theme pre-commit
4848
- name: Library version
4949
run: git describe --dirty --always --tags
50+
- name: Setup problem matchers
51+
uses: adafruit/circuitpython-action-library-ci-problem-matchers@v1
5052
- name: Pre-commit hooks
5153
run: |
5254
pre-commit run --all-files
@@ -68,7 +70,8 @@ jobs:
6870
if: contains(steps.need-pypi.outputs.pyproject-toml, 'pyproject.toml')
6971
run: |
7072
pip install --upgrade build twine
73+
for file in $(find -not -path "./.*" -not -path "./docs*" \( -name "*.py" -o -name "*.toml" \) ); do
74+
sed -i -e "s/0.0.0-auto.0/1.2.3/" $file;
75+
done;
7176
python -m build
7277
twine check dist/*
73-
- name: Setup problem matchers
74-
uses: adafruit/circuitpython-action-library-ci-problem-matchers@v1

.github/workflows/release.yml

+3
Original file line numberDiff line numberDiff line change
@@ -81,5 +81,8 @@ jobs:
8181
TWINE_USERNAME: ${{ secrets.pypi_username }}
8282
TWINE_PASSWORD: ${{ secrets.pypi_password }}
8383
run: |
84+
for file in $(find -not -path "./.*" -not -path "./docs*" \( -name "*.py" -o -name "*.toml" \) ); do
85+
sed -i -e "s/0.0.0-auto.0/${{github.event.release.tag_name}}/" $file;
86+
done;
8487
python -m build
8588
twine upload dist/*

pyproject.toml

+2-3
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ requires = [
1212
[project]
1313
name = "adafruit-circuitpython-ina219"
1414
description = "CircuitPython library for INA219 high side DC current sensor."
15+
version = "0.0.0-auto.0"
1516
readme = "README.rst"
1617
authors = [
1718
{name = "Adafruit Industries", email = "[email protected]"}
@@ -40,12 +41,10 @@ classifiers = [
4041
"License :: OSI Approved :: MIT License",
4142
"Programming Language :: Python :: 3",
4243
]
43-
dynamic = ["version", "dependencies"]
44+
dynamic = ["dependencies"]
4445

4546
[tool.setuptools]
4647
py-modules = ["adafruit_ina219"]
4748

4849
[tool.setuptools.dynamic]
4950
dependencies = {file = ["requirements.txt"]}
50-
51-
[tool.setuptools_scm]

0 commit comments

Comments
 (0)