Skip to content

Fix version in circuitpython-stubs #9948

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 3 commits into from
Jan 11, 2025
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
2 changes: 1 addition & 1 deletion .github/actions/deps/submodules/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ inputs:
- restore

version:
description: 'Whether to generate CP version'
description: 'Whether to fetch tags to identify CP version'
required: false
default: false
type: boolean
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,8 @@ jobs:
python-version: 3.x
- name: Set up submodules
uses: ./.github/actions/deps/submodules
with:
version: true
- name: Install dependencies
run: |
sudo apt-get update
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ stubs:
@$(PYTHON) tools/extract_pyi.py ports/atmel-samd/bindings $(STUBDIR)
@$(PYTHON) tools/extract_pyi.py ports/espressif/bindings $(STUBDIR)
@$(PYTHON) tools/extract_pyi.py ports/raspberrypi/bindings $(STUBDIR)
@cp setup.py-stubs circuitpython-stubs/setup.py
@sed -e "s,__version__,`python -msetuptools_scm`," < setup.py-stubs > circuitpython-stubs/setup.py
@cp README.rst-stubs circuitpython-stubs/README.rst
@cp MANIFEST.in-stubs circuitpython-stubs/MANIFEST.in
@$(PYTHON) tools/board_stubs/build_board_specific_stubs/board_stub_builder.py
Expand Down
9 changes: 2 additions & 7 deletions setup.py-stubs
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,7 @@ setup(
packages=list(package_data.keys()),
package_data=package_data,
package_dir = package_dir,
setup_requires=["setuptools_scm", "setuptools>=38.6.0"],
use_scm_version = {
"root": "..",
"relative_to": __file__,
"local_scheme": local_scheme,
"git_describe_command": "tools/describe --long",
},
setup_requires=["setuptools>=38.6.0"],
version="__version__",
zip_safe=False,
)
2 changes: 1 addition & 1 deletion tools/test-stubs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
rm -rf test-stubs
python3 -m venv test-stubs
. test-stubs/bin/activate
pip install mypy isort black adafruit-circuitpython-typing wheel build
pip install mypy isort black adafruit-circuitpython-typing wheel build setuptools_scm
rm -rf circuitpython-stubs .mypy_cache
make stubs
# Allow either dash or underscore as separator. setuptools v69.3.0 changed from "-" to "_".
Expand Down