diff --git a/.github/workflows/dist.yml b/.github/workflows/dist.yml index 4b65054f..0840ed28 100644 --- a/.github/workflows/dist.yml +++ b/.github/workflows/dist.yml @@ -22,7 +22,7 @@ jobs: steps: - uses: actions/checkout@v2 with: - submodules: recursive + submodules: true - uses: actions/setup-python@v2 with: @@ -38,7 +38,12 @@ jobs: strategy: matrix: os: [windows-latest, macos-latest, ubuntu-18.04] - python_version: [3.6, 3.7, 3.8, 3.9] + python_version: + - '3.6' + - '3.7' + - '3.8' + - '3.9' + - '3.10' architecture: [x86, x64] exclude: - os: macos-latest @@ -49,29 +54,36 @@ jobs: steps: - uses: actions/checkout@v2 with: - submodules: recursive - + submodules: true + - uses: actions/setup-python@v2 with: python-version: ${{ matrix.python_version }} architecture: ${{ matrix.architecture }} - - name: Install build dependencies - run: pip --disable-pip-version-check install wheel + - name: Install build + run: python -m pip --disable-pip-version-check install build - name: Build wheel - run: python setup.py bdist_wheel - + run: python -m build --wheel + + - name: Install + shell: bash + working-directory: dist + run: python -m pip --disable-pip-version-check install *.whl + + - name: Install test dependencies + shell: bash + working-directory: tests + run: python -m pip --disable-pip-version-check install -r requirements.txt + - name: Test wheel shell: bash env: RPYBUILD_PARALLEL: 1 RPYBUILD_STRIP_LIBPYTHON: 1 + working-directory: tests run: | - cd dist - python -m pip --disable-pip-version-check install *.whl - cd ../tests - python -m pip --disable-pip-version-check install -r requirements.txt python run_tests.py cross-build: @@ -88,24 +100,27 @@ jobs: steps: - uses: actions/checkout@v2 with: - submodules: recursive - - - name: Install build dependencies - run: /build/venv/bin/cross-pip --disable-pip-version-check install wheel + submodules: true + + - name: Install build + run: /build/venv/bin/build-pip --disable-pip-version-check install build - name: Build wheel - run: /build/venv/bin/cross-python setup.py bdist_wheel - + run: /build/venv/bin/build-python -m build --wheel + + - name: Install + working-directory: dist + run: | + # install to both cross and build in case things get mixed up + /build/venv/bin/build-pip --disable-pip-version-check install *.whl + /build/venv/bin/cross-pip --disable-pip-version-check install *.whl + - name: Build cross wheel - shell: bash env: RPYBUILD_PARALLEL: 1 RPYBUILD_STRIP_LIBPYTHON: 1 - run: | - cd dist - /build/venv/bin/cross-pip --disable-pip-version-check install *.whl - cd ../tests/cpp - /build/venv/bin/cross-python run_install.py wheel + working-directory: tests/cpp + run: /build/venv/bin/cross-python run_install.py wheel publish: runs-on: ubuntu-latest @@ -115,15 +130,15 @@ jobs: steps: - uses: actions/checkout@v2 with: - submodules: recursive - + submodules: true + - uses: actions/setup-python@v2 - with: - python-version: 3.8 - - run: pip --disable-pip-version-check install wheel + + - run: pip --disable-pip-version-check install build - name: Build packages - run: python setup.py sdist bdist_wheel + run: python -m build + - name: Publish to PyPI uses: pypa/gh-action-pypi-publish@master with: diff --git a/pyproject.toml b/pyproject.toml index 2dc4f738..5a509d62 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,8 @@ [build-system] -requires = ['setuptools>=43', 'wheel', 'setuptools_scm~=5.0.1'] +requires = ["setuptools>=45", "wheel", "setuptools_scm>=6.2"] +build-backend = "setuptools.build_meta" + +[tool.setuptools_scm] [tool.black] target-version = ['py36'] diff --git a/robotpy_build/pybind11 b/robotpy_build/pybind11 index bc2e2b17..905dfda1 160000 --- a/robotpy_build/pybind11 +++ b/robotpy_build/pybind11 @@ -1 +1 @@ -Subproject commit bc2e2b17cc4a7670b2c1d14c6390f0f492369eed +Subproject commit 905dfda1ab4714665812a0b5fc93c8e7292f181d diff --git a/setup.cfg b/setup.cfg index 22e8391d..fc8b284a 100644 --- a/setup.cfg +++ b/setup.cfg @@ -23,8 +23,8 @@ zip_safe = False include_package_data = True packages = find: install_requires = - setuptools >= 43 - setuptools_scm == 5.0.* + setuptools >= 45 + setuptools_scm >= 6.2 header2whatever >= 0.4.2 robotpy-cppheaderparser >= 5.0.12 sphinxify >= 0.7.3 @@ -37,8 +37,6 @@ install_requires = dataclasses; python_version < '3.7' delocate; platform_system == 'Darwin' distro; platform_system == 'Linux' -setup_requires = - setuptools_scm python_requires = >=3.6 [options.entry_points] diff --git a/setup.py b/setup.py deleted file mode 100644 index 44b3ba8e..00000000 --- a/setup.py +++ /dev/null @@ -1,5 +0,0 @@ -#!/usr/bin/env python3 - -from setuptools import setup - -setup(use_scm_version=True) diff --git a/tests/cpp/run_install.py b/tests/cpp/run_install.py index 981e6e7b..815ea4ec 100755 --- a/tests/cpp/run_install.py +++ b/tests/cpp/run_install.py @@ -65,7 +65,7 @@ def http_server(): cwd = None if len(sys.argv) == 2 and sys.argv[1] == "wheel": - cmd_args = [sys.executable, "setup.py", "bdist_wheel"] + cmd_args = [sys.executable, "-m", "build", "--wheel", "--no-isolation"] cwd = root else: # run pip install diff --git a/tests/requirements.txt b/tests/requirements.txt index e079f8a6..06f9cd46 100644 --- a/tests/requirements.txt +++ b/tests/requirements.txt @@ -1 +1,2 @@ pytest +wheel \ No newline at end of file