diff --git a/.cspell.config.yml b/.cspell.config.yml index 0157cf7..3a6946f 100644 --- a/.cspell.config.yml +++ b/.cspell.config.yml @@ -11,7 +11,7 @@ words: - automethod - calcsize - cbreak - - cibuildwheels + - cibuildwheel - CIBW - classmethod - crclength @@ -33,6 +33,9 @@ words: - hexlified - HLINE - KBPS + - libgl + - libglvnd + - libxkbcommon - manylinux - MBPS - millis diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 18c6719..19dc3fa 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -7,8 +7,15 @@ on: branches: [main] workflow_dispatch: +permissions: {} + jobs: - test: + build: + permissions: + # all cpp-linter to post suggestions in PR reviews + pull-requests: write + # allow cpp-linter to detect which files changed + contents: read runs-on: ubuntu-latest steps: - name: Set up Python @@ -21,6 +28,7 @@ jobs: with: submodules: true fetch-depth: 0 + persist-credentials: false - name: Install dependencies # cmake ships with the ubuntu-latest runner @@ -49,10 +57,7 @@ jobs: run: exit 1 - name: Build package for docs extraction and linting examples - run: | - python -m pip install build - python -m build - python -m pip install dist/pyrf24-*.whl + run: python -m pip install -v ./ - name: check python typing run: mypy src @@ -74,26 +79,21 @@ jobs: QT_QPA_PLATFORM: offscreen run: sphinx-build -E -W -b html . _build/html - - name: Save built docs as artifact - uses: actions/upload-artifact@v4 + - name: upload github pages artifact + uses: actions/upload-pages-artifact@v4 with: - name: "pyRF24_docs" - path: ${{ github.workspace }}/docs/_build/html + path: ./docs/_build/html - - name: upload to github pages - if: github.ref == 'refs/heads/main' - uses: peaceiris/actions-gh-pages@v4 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: ./docs/_build/html - - - name: Save distributable wheels as artifacts - uses: actions/upload-artifact@v4 - with: - name: "pyRF24_pkg_dist" - path: ${{ github.workspace }}/dist - - - name: Validate distribution - run: | - python3 -m pip install twine - python3 -m twine check dist/* + deploy-docs: + needs: [build] + if: github.ref == 'refs/heads/main' + runs-on: ubuntu-latest + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + permissions: + pages: write # to deploy to Pages + id-token: write # to verify the deployment originates from an appropriate source + steps: + - uses: actions/deploy-pages@v4 + id: deployment diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2094766..68ae75e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -18,6 +18,8 @@ run-name: >- Release ${{ startsWith(github.ref, 'refs/tags/') && github.ref_name || (github.ref_name != 'main' && '(dry-run)' || github.ref) }} +permissions: {} + jobs: # sdist for non-supported platforms will serve as a stub lib install sdist: @@ -29,6 +31,7 @@ jobs: submodules: true # non-shallow checkout needed for setuptools_scm fetch-depth: 0 + persist-credentials: false - name: Set up Python uses: actions/setup-python@v6 @@ -51,27 +54,15 @@ jobs: matrix: # the intention here is that each wheel is built in a separate job arch: [x86_64, aarch64, armv7l] - python: [cp37, cp38, cp39, cp310, cp311, cp312, cp313] + python: [cp39, cp310, cp311, cp312, cp313, cp314] tag: [manylinux, musllinux] include: - - arch: aarch64 - python: pp38 - tag: manylinux - - arch: aarch64 - python: pp39 - tag: manylinux - arch: aarch64 python: pp310 tag: manylinux - arch: aarch64 python: pp311 tag: manylinux - - arch: x86_64 - python: pp38 - tag: manylinux - - arch: x86_64 - python: pp39 - tag: manylinux - arch: x86_64 python: pp310 tag: manylinux @@ -85,9 +76,10 @@ jobs: submodules: true # non-shallow checkout needed for setuptools_scm fetch-depth: 0 + persist-credentials: false - - name: Build wheels with cibuildwheels - uses: pypa/cibuildwheel@v2.23.3 + - name: Build wheels + uses: pypa/cibuildwheel@v3.2.0 with: output-dir: dist # see options at https://cibuildwheel.pypa.io/en/stable/options/ diff --git a/pybind11 b/pybind11 index a2e59f0..f5fbe86 160000 --- a/pybind11 +++ b/pybind11 @@ -1 +1 @@ -Subproject commit a2e59f0e7065404b44dfe92a28aca47ba1378dc4 +Subproject commit f5fbe867d2d26e4a0a9177a51f6e568868ad3dc8 diff --git a/pyproject.toml b/pyproject.toml index a417b15..c677145 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,7 +2,7 @@ # building cmake from pypi releases requires openssl-dev installed, so # just require users install cmake from apt when getting python-dev (CPython headers) requires = [ - "setuptools>=61", + "setuptools>=77", "wheel", "setuptools_scm[toml]>=6.2" ] @@ -24,7 +24,7 @@ keywords = [ "RF24Network", "RF24Mesh", ] -license = {text = "GPLv2"} +license = "GPL-2.0-only" authors = [ { name = "Brendan Doherty", email = "2bndy5@gmail.com" }, ] @@ -32,21 +32,16 @@ classifiers = [ # https://pypi.org/pypi?%3Aaction=list_classifiers "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", - "License :: OSI Approved :: GNU General Public License v2 (GPLv2)", "Operating System :: POSIX :: Linux", "Programming Language :: C++", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", "Topic :: Software Development :: Libraries", "Topic :: System :: Hardware", "Topic :: System :: Hardware :: Hardware Drivers", "Topic :: System :: Networking", "Typing :: Typed", ] -requires-python = ">=3.7" +requires-python = ">=3.9" dependencies = ['typing-extensions; python_version < "3.13"'] dynamic = ["version"] @@ -69,5 +64,6 @@ pretty = true # In addition to the standard set of exclusions, omit all tests, plus a specific file. extend-exclude = ["pybind11", "RF24", "RF24Network", "RF24Mesh"] -[tool.cibuildwheels] -enable = ["pypy"] +[tool.cibuildwheel] +# Include all PyPy versions +enable = ["pypy", "pypy-eol"] diff --git a/requirements-build.txt b/requirements-build.txt index 3849506..0aff1e4 100644 --- a/requirements-build.txt +++ b/requirements-build.txt @@ -1,3 +1,3 @@ -setuptools>=61 +setuptools>=77 wheel setuptools_scm[toml]