Merge pull request #7957 from tekktrik/dev/stubs-building

Updated how stubs are built
This commit is contained in:
Scott Shawcroft 2023-05-10 11:20:24 -07:00 committed by GitHub
commit 08874af0e8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 4 additions and 3 deletions

View File

@ -209,7 +209,7 @@ jobs:
TWINE_USERNAME: ${{ secrets.pypi_username }}
TWINE_PASSWORD: ${{ secrets.pypi_password }}
run: |
# setup.py sdist was run by 'make stubs'
# python -m build was run by 'make stubs'
[ -z "$TWINE_USERNAME" ] || echo "Uploading dev release to PyPi"
[ -z "$TWINE_USERNAME" ] || twine upload circuitpython-stubs/dist/*

View File

@ -266,7 +266,7 @@ stubs:
@cp setup.py-stubs circuitpython-stubs/setup.py
@cp README.rst-stubs circuitpython-stubs/README.rst
@cp MANIFEST.in-stubs circuitpython-stubs/MANIFEST.in
@(cd circuitpython-stubs && $(PYTHON) setup.py -q sdist)
@$(PYTHON) -m build circuitpython-stubs
.PHONY: check-stubs
check-stubs: stubs

View File

@ -3,6 +3,7 @@ mypy
black
isort
twine
build
wheel
astroid
setuptools>=45

View File

@ -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
pip install mypy isort black adafruit-circuitpython-typing wheel build
rm -rf circuitpython-stubs .mypy_cache
make stubs
pip install --force-reinstall circuitpython-stubs/dist/circuitpython-stubs-*.tar.gz