Skip to content

Commit

Permalink
py312: All platforms except web.
Browse files Browse the repository at this point in the history
  • Loading branch information
renpytom committed Dec 18, 2024
1 parent 40d3b6b commit 4bd536c
Show file tree
Hide file tree
Showing 6 changed files with 42 additions and 11 deletions.
1 change: 1 addition & 0 deletions patches/Python-3.12.7
24 changes: 24 additions & 0 deletions patches/Python-3.12.8/no-af-hyperv.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
Disable the HYPER_V socket family.

From: Tom Rothamel <[email protected]>


---
Modules/socketmodule.h | 4 ----
1 file changed, 4 deletions(-)

diff --git a/Modules/socketmodule.h b/Modules/socketmodule.h
index f5ca004..41d6234 100644
--- a/Modules/socketmodule.h
+++ b/Modules/socketmodule.h
@@ -249,10 +249,6 @@ typedef int SOCKET_T;
#define PyLong_AsSocket_t(fd) (SOCKET_T)PyLong_AsLongLong(fd)
#endif

-// AF_HYPERV is only supported on Windows
-#if defined(AF_HYPERV) && defined(MS_WINDOWS)
-# define HAVE_AF_HYPERV
-#endif

/* Socket address */
typedef union sock_addr {
1 change: 1 addition & 0 deletions source/Python-3.12.7-Setup.stdlib
6 changes: 3 additions & 3 deletions tasks/hostpython3.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ def build_host(c: Context):

c.run("""{{ make }} install""")

c.rmtree("{{ host }}/lib/python3.11/config-3.11-x86_64-linux-gnu/Tools/")
c.run("install -d {{ host }}/lib/python3.11/config-3.11-x86_64-linux-gnu/Tools/")
c.run("cp -a Tools/scripts {{ host }}/lib/python3.11/config-3.11-x86_64-linux-gnu/Tools/scripts")
c.rmtree("{{ host }}/lib/python3.12/config-3.12-x86_64-linux-gnu/Tools/")
c.run("install -d {{ host }}/lib/python3.12/config-3.12-x86_64-linux-gnu/Tools/")
c.run("cp -a Tools/scripts {{ host }}/lib/python3.12/config-3.12-x86_64-linux-gnu/Tools/scripts")



Expand Down
8 changes: 4 additions & 4 deletions tasks/python3.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from renpybuild.task import task, annotator

version = "3.12.8"
win_version = "3.12.6"
win_version = "3.12.7"
web_version = "3.12.8"

@annotator
Expand Down Expand Up @@ -56,9 +56,9 @@ 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 }}/allow-old-mingw.diff")
c.patch("Python-{{ version }}/single-dllmain.diff")
# c.patch("Python-{{ version }}/fix-overlapped-conflict.diff")
c.patch("Python-{{ version }}/no-af-hyperv.diff")

c.run(""" autoreconf -vfi """)

Expand Down Expand Up @@ -89,7 +89,7 @@ def common_post(c: Context):
c.generate("{{ source }}/Python-{{ version }}-Setup.stdlib", "Modules/Setup.stdlib")
c.generate("{{ source }}/Python-{{ version }}-Setup.stdlib", "Modules/Setup")

c.run("""{{ make }}""")
c.run("""make""")
c.run("""{{ make }} install""")

c.copy("{{ host }}/bin/python3", "{{ install }}/bin/hostpython3")
Expand Down
13 changes: 9 additions & 4 deletions tasks/toolchain.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,16 @@
import os
import requests

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


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

url = "https://github.com/mstorsjo/llvm-mingw/releases/download/20220906/llvm-mingw-20220906-ucrt-ubuntu-18.04-x86_64.tar.xz"
dest = c.path("{{ tmp }}/tars/llvm-mingw-20220906-ucrt-ubuntu-18.04-x86_64.tar.xz")
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"
dest = c.path("{{ tmp }}/tars/llvm-mingw-{{mingw_version}}.tar.xz")

if os.path.exists(dest):
return
Expand All @@ -29,12 +33,13 @@ def download(c: Context):

@task(kind="cross", platforms="windows")
def unpack(c: Context):
c.var("mingw_version", mingw_version)

c.clean("{{cross}}")
c.chdir("{{cross}}")

c.run("tar xaf {{ tmp }}/tars/llvm-mingw-20220906-ucrt-ubuntu-18.04-x86_64.tar.xz")
c.run("ln -s llvm-mingw-20220906-ucrt-ubuntu-18.04-x86_64 llvm-mingw")
c.run("tar xaf {{ tmp }}/tars/llvm-mingw-{{mingw_version}}.tar.xz")
c.run("ln -s llvm-mingw-{{mingw_version}} llvm-mingw")


@task(kind="cross", platforms="android", always=True)
Expand Down

0 comments on commit 4bd536c

Please sign in to comment.