Skip to content

Commit f1768b5

Browse files
committed
Exclude pygithub on arm64 Windows
1 parent e250805 commit f1768b5

File tree

4 files changed

+579
-3
lines changed

4 files changed

+579
-3
lines changed

build-windows.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
import os
77
import pathlib
8+
import platform
89
import subprocess
910
import sys
1011
import venv
@@ -15,7 +16,8 @@
1516
VENV = BUILD / "venv"
1617
PIP = VENV / "Scripts" / "pip.exe"
1718
PYTHON = VENV / "Scripts" / "python.exe"
18-
REQUIREMENTS = ROOT / "requirements.win.txt"
19+
ARCH = "-arm64" if platform.machine() == "ARM64" else ""
20+
REQUIREMENTS = ROOT / f"requirements.win{ARCH}.txt"
1921
WINDOWS_DIR = ROOT / "cpython-windows"
2022

2123

pythonbuild/utils.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
import urllib.request
2424
import zipfile
2525

26-
import github
2726
import yaml
2827
import zstandard
2928

@@ -654,6 +653,8 @@ def validate_python_json(info, extension_modules):
654653

655654

656655
def release_download_statistics(mode="by_asset"):
656+
import github
657+
657658
by_tag = collections.Counter()
658659
by_build = collections.Counter()
659660
by_build_install_only = collections.Counter()

requirements.in

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
docker
22
jinja2
33
jsonschema
4-
PyGithub
4+
# This does not built on the aarch64-windows runners yet, and is only needed for
5+
# development so we'll just skip it for now.
6+
PyGithub; sys_platform != "win32" or platform_machine != "aarch64"
57
PyYAML
68
# Undeclared dependency in docker 5.0 package.
79
six

0 commit comments

Comments
 (0)