Skip to content

Commit

Permalink
Merge pull request #139 from robotpy/2022-upgrades
Browse files Browse the repository at this point in the history
2022 upgrades
  • Loading branch information
virtuald authored Jan 7, 2022
2 parents f58ab1b + 9eab0cd commit e738ad3
Show file tree
Hide file tree
Showing 7 changed files with 54 additions and 42 deletions.
75 changes: 45 additions & 30 deletions .github/workflows/dist.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
submodules: true

- uses: actions/setup-python@v2
with:
Expand All @@ -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
Expand All @@ -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:
Expand All @@ -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
Expand All @@ -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:
Expand Down
5 changes: 4 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -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']
Expand Down
2 changes: 1 addition & 1 deletion robotpy_build/pybind11
Submodule pybind11 updated 185 files
6 changes: 2 additions & 4 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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]
Expand Down
5 changes: 0 additions & 5 deletions setup.py

This file was deleted.

2 changes: 1 addition & 1 deletion tests/cpp/run_install.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions tests/requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
pytest
wheel

0 comments on commit e738ad3

Please sign in to comment.