Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@ jobs:
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v6
uses: astral-sh/setup-uv@v7
with:
python-version: "3.9"
activate-environment: true

# We still need to install pywin32 because
# AutoDuck/py2d.py currently relies on runtime imports for introspection
# Downloading latest release is faster than re-building
- name: Install latest release
run: pip install --user --upgrade pywin32
run: uv pip install --upgrade pywin32

- name: Generate PyWin32.chm help file
run: python AutoDuck/make.py
Expand Down
34 changes: 12 additions & 22 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
architecture: ${{ matrix.architecture }}
cache: pip
cache-dependency-path: .github/workflows/main.yml
Comment on lines -41 to -42
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There already was nothing to cache here.

I also kept setup-python to keep testing in a global user install (this can still be done with uv if you pre-install Python, but at this point having actions/setup-python + astral-sh/setup-uv wouldn't bring any benefit for this step if there's no dependency to quickly install.

check-latest: true
allow-prereleases: true

Expand Down Expand Up @@ -102,23 +100,16 @@ jobs:
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
uses: astral-sh/setup-uv@v7
with:
python-version: ${{ matrix.python-version }}
architecture: x64
cache: pip
cache-dependency-path: .github/workflows/main.yml
check-latest: true
allow-prereleases: true

- name: Install build module
run: pip install --upgrade build
activate-environment: true

- name: Obtain ARM64 library files
run: python .github\workflows\download-arm64-libs.py .\arm64libs

- name: Build wheels
run: python -m build --wheel --config-setting=--build-option=build_ext --config-setting=--build-option=-L.\arm64libs --config-setting=--build-option=--plat-name=win-arm64 --config-setting=--build-option=build --config-setting=--build-option=--plat-name=win-arm64 --config-setting=--build-option=bdist_wheel --config-setting=--build-option=--plat-name=win-arm64
run: uv build --wheel --config-setting=--build-option=build_ext --config-setting=--build-option=-L.\arm64libs --config-setting=--build-option=--plat-name=win-arm64 --config-setting=--build-option=build --config-setting=--build-option=--plat-name=win-arm64 --config-setting=--build-option=bdist_wheel --config-setting=--build-option=--plat-name=win-arm64
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This command is further simplified in #2583


- uses: actions/upload-artifact@v4
with:
Expand Down Expand Up @@ -146,15 +137,16 @@ jobs:
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v6
- uses: astral-sh/setup-uv@v7
with:
# This job only needs to target the oldest supported version
python-version: "3.8"
cache: pip
cache-dependency-path: .github/workflows/main.yml
- run: pip install clang-format==18.1.* pycln
activate-environment: true
- run: uv pip install clang-format==18.1.* pycln

# !cancelled(): Show issues even if the previous steps failed. But still fail the job
- run: pycln . --config=pycln.toml --check

- name: Run Ruff linter
uses: astral-sh/ruff-action@v3
with:
Expand All @@ -163,6 +155,7 @@ jobs:
- name: Run Ruff formatter
run: ruff format --check
if: ${{ !cancelled() }}

# Too many files to fit in a single command, also exclude vendored Scintilla and MAPIStubLibrary
- run: |
clang-format --Werror --dry-run $(git ls-files '*.cpp' ':!:com/win32comext/mapi/src/MAPIStubLibrary/')
Expand All @@ -182,14 +175,11 @@ jobs:
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v6
- uses: astral-sh/setup-uv@v7
with:
python-version: ${{ matrix.python-version }}
cache: pip
cache-dependency-path: .github/workflows/main.yml
check-latest: true
allow-prereleases: true
- run: pip install types-setuptools PyOpenGL mypy==1.16.*
activate-environment: true
- run: uv pip install types-setuptools PyOpenGL mypy==1.16.*

- run: mypy . --python-version=${{ matrix.python-version }}

Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ ENV/
env.bak/
venv.bak/
.vagrant/
# Not currently using a lock file
uv.lock

# other IDEs, MacOS, etc
.idea/
Expand Down
1 change: 1 addition & 0 deletions pyrightconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
// Exclude from scanning when running pyright
"exclude": [
".git/", // Avoids scanning git branch names ending in ".py"
".venv",
"build/",
// Vendored
"Pythonwin/Scintilla/",
Expand Down