Skip to content

Commit

Permalink
Upgrade windows toolchain.
Browse files Browse the repository at this point in the history
  • Loading branch information
renpytom committed Dec 20, 2024
1 parent 3490313 commit 44baf2b
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 17 deletions.
28 changes: 13 additions & 15 deletions tasks/python3.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ def patch_posix(c: Context):
c.var("version", version)

c.chdir("Python-{{ version }}")
# c.patch("Python-{{ version }}/no-multiarch.diff")
c.patch("Python-{{ version }}/cross-darwin.diff")

# Needs to be here because we use the Linux version of ssl.py on windows,
Expand All @@ -51,12 +50,24 @@ def patch_posix(c: Context):
c.run(""" autoreconf -vfi """)


@task(kind="python", pythons="3", platforms="ios")
def patch_ios(c: Context):
c.var("version", version)

c.chdir("Python-{{ version }}")
c.patch("Python-{{ version }}/ios-posixmodule.diff")

c.run("cp {{patches}}/_scproxy.pyx Modules")
c.chdir("Modules")
c.run("rm -f _scproxy.c")
c.run("cython _scproxy.pyx")


@task(kind="python", pythons="3", platforms="windows")
def patch_windows(c: Context):
c.var("version", win_version)

c.chdir("cpython-mingw")
# c.patch("Python-{{ version }}/allow-old-mingw.diff")
c.patch("Python-{{ version }}/single-dllmain.diff")
c.patch("Python-{{ version }}/no-af-hyperv.diff")

Expand Down Expand Up @@ -118,19 +129,6 @@ def build_posix(c: Context):
common_post(c)


@task(kind="python", pythons="3", platforms="ios")
def patch_ios(c: Context):
c.var("version", version)

c.chdir("Python-{{ version }}")
c.patch("Python-{{ version }}/ios-posixmodule.diff")

c.run("cp {{patches}}/_scproxy.pyx Modules")
c.chdir("Modules")
c.run("rm -f _scproxy.c")
c.run("cython _scproxy.pyx")


@task(kind="python", pythons="3", platforms="ios")
def build_ios(c: Context):
common(c)
Expand Down
4 changes: 2 additions & 2 deletions tasks/toolchain.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
import os
import requests

mingw_version = "20241203-ucrt-ubuntu-20.04-x86_64"
mingw_version = "20241217-ucrt-ubuntu-20.04-x86_64"


@task(kind="cross", platforms="windows")
def download(c: Context):

c.var("mingw_version", mingw_version)

url = "https://github.com/mstorsjo/llvm-mingw/releases/download/20241203/llvm-mingw-20241203-ucrt-ubuntu-20.04-x86_64.tar.xz"
url = "https://github.com/mstorsjo/llvm-mingw/releases/download/20241217/llvm-mingw-20241217-ucrt-ubuntu-20.04-x86_64.tar.xz"
dest = c.path("{{ tmp }}/tars/llvm-mingw-{{mingw_version}}.tar.xz")

if os.path.exists(dest):
Expand Down

0 comments on commit 44baf2b

Please sign in to comment.