Upgrade to Python 3.10.

Shapely doesn't have a Windows wheel on pypi yet, but we can get them
from https://www.lfd.uci.edu/~gohlke/pythonlibs/#shapely. This unblocks
(and because wheels are matched to python versions, *requires*)
upgrading to Python 3.10.
This commit is contained in:
Dan Albert 2021-11-21 11:25:29 -08:00
parent 7c4d1e2f60
commit 85e7b1762d
6 changed files with 107 additions and 107 deletions

View File

@ -10,10 +10,10 @@ jobs:
with: with:
submodules: true submodules: true
- name: Set up Python 3.9 - name: Set up Python
uses: actions/setup-python@v2 uses: actions/setup-python@v2
with: with:
python-version: 3.9 python-version: "3.10"
- name: Install environment - name: Install environment
run: | run: |

View File

@ -2,107 +2,104 @@ name: Release Pipeline
on: on:
push: push:
tags: [ '*' ] tags: ["*"]
jobs: jobs:
build: build:
runs-on: windows-latest runs-on: windows-latest
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
with: with:
submodules: true submodules: true
- name: Set up Python 3.9 - name: Set up Python
uses: actions/setup-python@v2 uses: actions/setup-python@v2
with: with:
python-version: 3.9 python-version: "3.10"
- name: Install environment - name: Install environment
run: | run: |
python -m venv ./venv python -m venv ./venv
- name: Install dependencies - name: Install dependencies
run: | run: |
./venv/scripts/activate ./venv/scripts/activate
python -m pip install -r requirements.txt python -m pip install -r requirements.txt
# For some reason the shiboken2.abi3.dll is not found properly, so I copy it instead # For some reason the shiboken2.abi3.dll is not found properly, so I copy it instead
Copy-Item .\venv\Lib\site-packages\shiboken2\shiboken2.abi3.dll .\venv\Lib\site-packages\PySide2\ -Force Copy-Item .\venv\Lib\site-packages\shiboken2\shiboken2.abi3.dll .\venv\Lib\site-packages\PySide2\ -Force
- name: Finalize version - name: Finalize version
run: | run: |
New-Item -ItemType file resources\final New-Item -ItemType file resources\final
- name: mypy game - name: mypy game
run: | run: |
./venv/scripts/activate ./venv/scripts/activate
mypy game mypy game
- name: mypy gen - name: mypy gen
run: | run: |
./venv/scripts/activate ./venv/scripts/activate
mypy gen mypy gen
- name: Build binaries - name: Build binaries
run: | run: |
./venv/scripts/activate ./venv/scripts/activate
$env:PYTHONPATH=".;./pydcs" $env:PYTHONPATH=".;./pydcs"
pyinstaller pyinstaller.spec pyinstaller pyinstaller.spec
- name: Create Installer - name: Create Installer
env: env:
TAG_NAME: ${{ github.ref }} TAG_NAME: ${{ github.ref }}
run: | run: |
Copy-Item .\changelog.md .\dist Copy-Item .\changelog.md .\dist
- uses: actions/upload-artifact@v2 - uses: actions/upload-artifact@v2
with: with:
name: dcs_liberation name: dcs_liberation
path: dist/ path: dist/
release: release:
needs: [ build ] needs: [build]
runs-on: windows-latest runs-on: windows-latest
steps: steps:
- uses: actions/download-artifact@v2 - uses: actions/download-artifact@v2
with: with:
name: dcs_liberation name: dcs_liberation
- name: "Get Version" - name: "Get Version"
id: version id: version
env: env:
TAG_NAME: ${{ github.ref }} TAG_NAME: ${{ github.ref }}
run: | run: |
Get-ChildItem -Recurse -Depth 1 Get-ChildItem -Recurse -Depth 1
$version = ($env:TAG_NAME -split "/") | Select-Object -Last 1 $version = ($env:TAG_NAME -split "/") | Select-Object -Last 1
$prerelease = ("2.1.1-alpha3" -match '[^\.\d]').ToString().ToLower() $prerelease = ("2.1.1-alpha3" -match '[^\.\d]').ToString().ToLower()
Write-Host $version Write-Host $version
Write-Host $prerelease Write-Host $prerelease
Write-Output "::set-output name=number::$version" Write-Output "::set-output name=number::$version"
Write-Output "::set-output name=prerelease::$prerelease" Write-Output "::set-output name=prerelease::$prerelease"
$changelog = Get-Content .\changelog.md $changelog = Get-Content .\changelog.md
$last_change = ($changelog | Select-String -Pattern "^#\s" | Select-Object -Skip 1 -First 1).LineNumber - 2 $last_change = ($changelog | Select-String -Pattern "^#\s" | Select-Object -Skip 1 -First 1).LineNumber - 2
($changelog | Select-Object -First $last_change) -join "`n" | Out-File .\releasenotes.md ($changelog | Select-Object -First $last_change) -join "`n" | Out-File .\releasenotes.md
Compress-Archive -Path .\dcs_liberation -DestinationPath "dcs_liberation.$version.zip" -Compression Optimal Compress-Archive -Path .\dcs_liberation -DestinationPath "dcs_liberation.$version.zip" -Compression Optimal
- uses: actions/create-release@v1
id: create_release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
body_path: releasenotes.md
draft: false
prerelease: ${{ steps.version.outputs.prerelease }}
- uses: actions/create-release@v1
id: create_release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
body_path: releasenotes.md
draft: false
prerelease: ${{ steps.version.outputs.prerelease }}
- uses: actions/upload-release-asset@v1 - uses: actions/upload-release-asset@v1
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with: with:
upload_url: ${{ steps.create_release.outputs.upload_url }} upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./dcs_liberation.${{ steps.version.outputs.number }}.zip asset_path: ./dcs_liberation.${{ steps.version.outputs.number }}.zip
asset_name: dcs_liberation.${{ steps.version.outputs.number }}.zip asset_name: dcs_liberation.${{ steps.version.outputs.number }}.zip
asset_content_type: application/zip asset_content_type: application/zip

View File

@ -3,31 +3,30 @@ name: Test
on: [push, pull_request] on: [push, pull_request]
jobs: jobs:
build: build:
runs-on: windows-latest runs-on: windows-latest
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
with: with:
submodules: true submodules: true
- name: Set up Python 3.9 - name: Set up Python
uses: actions/setup-python@v2 uses: actions/setup-python@v2
with: with:
python-version: 3.9 python-version: "3.10"
- name: Install environment - name: Install environment
run: | run: |
python -m venv ./venv python -m venv ./venv
- name: Install dependencies - name: Install dependencies
run: | run: |
./venv/scripts/activate ./venv/scripts/activate
python -m pip install -r requirements.txt python -m pip install -r requirements.txt
# For some reason the shiboken2.abi3.dll is not found properly, so I copy it instead # For some reason the shiboken2.abi3.dll is not found properly, so I copy it instead
Copy-Item .\venv\Lib\site-packages\shiboken2\shiboken2.abi3.dll .\venv\Lib\site-packages\PySide2\ -Force Copy-Item .\venv\Lib\site-packages\shiboken2\shiboken2.abi3.dll .\venv\Lib\site-packages\PySide2\ -Force
- name: run tests - name: run tests
run: | run: |
./venv/scripts/activate ./venv/scripts/activate
pytest tests pytest tests

View File

@ -35,7 +35,7 @@ pytest==7.0.1
python-dateutil==2.8.2 python-dateutil==2.8.2
pywin32-ctypes==0.2.0 pywin32-ctypes==0.2.0
PyYAML==6.0 PyYAML==6.0
Shapely==1.8.0 ./wheels/Shapely-1.8.0-cp310-cp310-win_amd64.whl
shiboken2==5.15.2.1 shiboken2==5.15.2.1
six==1.16.0 six==1.16.0
tabulate==0.8.9 tabulate==0.8.9

4
wheels/README.md Normal file
View File

@ -0,0 +1,4 @@
# Wheels
This directory contains Windows wheels for packages that do not yet have wheels
on PyPI. Wheels are downloaded from https://www.lfd.uci.edu/~gohlke/pythonlibs/.

Binary file not shown.