Skip to content

Allow __version__ population, fix problem matchers #33

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ jobs:
pip install --force-reinstall 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
Expand All @@ -68,7 +70,8 @@ jobs:
if: contains(steps.need-pypi.outputs.pyproject-toml, 'pyproject.toml')
run: |
pip install --upgrade build twine
for file in $(find -not -path "./.*" -not -path "./docs*" \( -name "*.py" -o -name "*.toml" \) ); do
sed -i -e "s/0.0.0-auto.0/1.2.3/" $file;
done;
python -m build
twine check dist/*
- name: Setup problem matchers
uses: adafruit/circuitpython-action-library-ci-problem-matchers@v1
3 changes: 3 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,5 +81,8 @@ jobs:
TWINE_USERNAME: ${{ secrets.pypi_username }}
TWINE_PASSWORD: ${{ secrets.pypi_password }}
run: |
for file in $(find -not -path "./.*" -not -path "./docs*" \( -name "*.py" -o -name "*.toml" \) ); do
sed -i -e "s/0.0.0-auto.0/${{github.event.release.tag_name}}/" $file;
done;
python -m build
twine upload dist/*
5 changes: 2 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ requires = [
[project]
name = "adafruit-circuitpython-ina219"
description = "CircuitPython library for INA219 high side DC current sensor."
version = "0.0.0-auto.0"
readme = "README.rst"
authors = [
{name = "Adafruit Industries", email = "[email protected]"}
Expand Down Expand Up @@ -40,12 +41,10 @@ classifiers = [
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
]
dynamic = ["version", "dependencies"]
dynamic = ["dependencies"]

[tool.setuptools]
py-modules = ["adafruit_ina219"]

[tool.setuptools.dynamic]
dependencies = {file = ["requirements.txt"]}

[tool.setuptools_scm]