8000 Merge pull request #9948 from jepler/circuitpython-stubs-version · adafruit/circuitpython@338c1aa · GitHub
[go: up one dir, main page]

Skip to content

Commit 338c1aa

Browse files
authored
Merge pull request #9948 from jepler/circuitpython-stubs-version
Fix version in circuitpython-stubs
2 parents 96a3300 + f914995 commit 338c1aa

File tree

5 files changed

+7
-10
lines changed

5 files changed

+7
-10
lines changed

.github/actions/deps/submodules/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ inputs:
2222
- restore
2323

2424
version:
25-
description: 'Whether to generate CP version'
25+
description: 'Whether to fetch tags to identify CP version'
2626
required: false
2727
default: false
2828
type: boolean

.github/workflows/build.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,8 @@ jobs:
183183
python-version: 3.x
184184
- name: Set up submodules
185185
uses: ./.github/actions/deps/submodules
186+
with:
187+
version: true
186188
- name: Install dependencies
187189
run: |
188190
sudo apt-get update

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ stubs:
268268
@$(PYTHON) tools/extract_pyi.py ports/atmel-samd/bindings $(STUBDIR)
269269
@$(PYTHON) tools/extract_pyi.py ports/espressif/bindings $(STUBDIR)
270270
@$(PYTHON) tools/extract_pyi.py ports/raspberrypi/bindings $(STUBDIR)
271-
@cp setup.py-stubs circuitpython-stubs/setup.py
271+
@sed -e "s,__version__,`python -msetuptools_scm`," < setup.py-stubs > circuitpython-stubs/setup.py
272272
@cp README.rst-stubs circuitpython-stubs/README.rst
273273
@cp MANIFEST.in-stubs circuitpython-stubs/MANIFEST.in
274274
@$(PYTHON) tools/board_stubs/build_board_specific_stubs/board_stub_builder.py

setup.py-stubs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,7 @@ setup(
4545
packages=list(package_data.keys()),
4646
package_data=package_data,
4747
package_dir = package_dir,
48-
setup_requires=["setuptools_scm", "setuptools>=38.6.0"],
49-
use_scm_version = {
50-
"root": "..",
51-
"relative_to": __file__,
52-
"local_scheme": local_scheme,
53-
"git_describe_command": "tools/describe --long",
54-
},
48+
setup_requires=["setuptools>=38.6.0"],
49+
version="__version__",
5550
zip_safe=False,
5651
)

tools/test-stubs.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
rm -rf test-stubs
33
python3 -m venv test-stubs
44
. test-stubs/bin/activate
5-
pip install mypy isort black adafruit-circuitpython-typing wheel build
5+
pip install mypy isort black adafruit-circuitpython-typing wheel build setuptools_scm
66
rm -rf circuitpython-stubs .mypy_cache
77
make stubs
88
# Allow either dash or underscore as separator. setuptools v69.3.0 changed from "-" to "_".

0 commit comments

Comments
 (0)
0