Skip to content

Commit 7c811d7

Browse files
committed
rebase patches
1 parent f91dbb7 commit 7c811d7

24 files changed

Lines changed: 52 additions & 126 deletions

recipe/patches/0001-Win32-Change-FD_SETSIZE-from-512-to-2048.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
From bd6a844b045e3da9fac3fdda6d262c44df935c93 Mon Sep 17 00:00:00 2001
1+
From b2dc38f831aa57016c7197a902310119c72a1b73 Mon Sep 17 00:00:00 2001
22
From: Ray Donnelly <mingw.android@gmail.com>
33
Date: Wed, 16 Aug 2017 11:53:55 +0100
44
Subject: [PATCH 01/24] Win32: Change FD_SETSIZE from 512 to 2048

recipe/patches/0002-Win32-Do-not-download-externals.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
From b454c45bc3a10ee4dcacbcbaedac3d435571c75c Mon Sep 17 00:00:00 2001
1+
From 6b2be09a90969918df41b16e3f04c6d65c8d618b Mon Sep 17 00:00:00 2001
22
From: Ray Donnelly <mingw.android@gmail.com>
33
Date: Thu, 7 Sep 2017 11:35:47 +0100
44
Subject: [PATCH 02/24] Win32: Do not download externals

recipe/patches/0003-Fix-find_library-so-that-it-looks-in-sys.prefix-lib-.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
From 48a20f6fc2bafa3fef743b2d75d46ea29a6c76b9 Mon Sep 17 00:00:00 2001
1+
From d949c804acdacbc1e47de8e5aedc6c2ab3cbed5e Mon Sep 17 00:00:00 2001
22
From: Ray Donnelly <mingw.android@gmail.com>
33
Date: Tue, 5 Dec 2017 22:47:59 +0000
44
Subject: [PATCH 03/24] Fix find_library so that it looks in sys.prefix/lib

recipe/patches/0004-Disable-registry-lookup-unless-CONDA_PY_ALLOW_REG_PA.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
From d5ef808db5a8d89e36babc8bba27d9833f48879c Mon Sep 17 00:00:00 2001
1+
From f4e637fd1598a98625f5c969a92edc3aab0a0704 Mon Sep 17 00:00:00 2001
22
From: Ray Donnelly <mingw.android@gmail.com>
33
Date: Sat, 27 Oct 2018 18:48:30 +0100
44
Subject: [PATCH 04/24] Disable registry lookup unless CONDA_PY_ALLOW_REG_PATHS
Lines changed: 15 additions & 89 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,17 @@
1-
From 6f69b0440cf3eccda2bed832bd985287248ff6b3 Mon Sep 17 00:00:00 2001
1+
From 0fe38386a63c0294fa0a25766554d3430ea909b4 Mon Sep 17 00:00:00 2001
22
From: Nehal J Wani <nehaljw.kkd1@gmail.com>
33
Date: Sat, 24 Nov 2018 20:38:02 -0600
44
Subject: [PATCH 05/24] Unvendor openssl
55

66
Co-authored-by: Isuru Fernando <isuruf@gmail.com>
77
---
8-
PCbuild/_ssl.vcxproj | 3 --
9-
PCbuild/_ssl.vcxproj.filters | 5 +---
10-
PCbuild/openssl.props | 14 ++-------
11-
PCbuild/openssl.vcxproj | 58 +-----------------------------------
12-
PCbuild/python.props | 11 +------
13-
PCbuild/python.vcxproj | 3 ++
14-
PCbuild/pythonw.vcxproj | 5 +++-
15-
7 files changed, 12 insertions(+), 87 deletions(-)
8+
PCbuild/openssl.props | 14 ++------------
9+
PCbuild/openssl.vcxproj | 32 --------------------------------
10+
PCbuild/python.props | 11 +----------
11+
PCbuild/python.vcxproj | 3 +++
12+
PCbuild/pythonw.vcxproj | 3 +++
13+
5 files changed, 9 insertions(+), 54 deletions(-)
1614

17-
diff --git a/PCbuild/_ssl.vcxproj b/PCbuild/_ssl.vcxproj
18-
index d4e1affab03..ce21f992ff8 100644
19-
--- a/PCbuild/_ssl.vcxproj
20-
+++ b/PCbuild/_ssl.vcxproj
21-
@@ -99,9 +99,6 @@
22-
</ItemDefinitionGroup>
23-
<ItemGroup>
24-
<ClCompile Include="..\Modules\_ssl.c" />
25-
- <ClCompile Include="$(opensslIncludeDir)\applink.c">
26-
- <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;$(PreprocessorDefinitions)</PreprocessorDefinitions>
27-
- </ClCompile>
28-
</ItemGroup>
29-
<ItemGroup>
30-
<ResourceCompile Include="..\PC\python_nt.rc" />
31-
diff --git a/PCbuild/_ssl.vcxproj.filters b/PCbuild/_ssl.vcxproj.filters
32-
index 716a69a41af..7e8e5800a0d 100644
33-
--- a/PCbuild/_ssl.vcxproj.filters
34-
+++ b/PCbuild/_ssl.vcxproj.filters
35-
@@ -12,13 +12,10 @@
36-
<ClCompile Include="..\Modules\_ssl.c">
37-
<Filter>Source Files</Filter>
38-
</ClCompile>
39-
- <ClCompile Include="$(opensslIncludeDir)\applink.c">
40-
- <Filter>Source Files</Filter>
41-
- </ClCompile>
42-
</ItemGroup>
43-
<ItemGroup>
44-
<ResourceCompile Include="..\PC\python_nt.rc">
45-
<Filter>Resource Files</Filter>
46-
</ResourceCompile>
47-
</ItemGroup>
48-
-</Project>
49-
\ No newline at end of file
50-
+</Project>
5115
diff --git a/PCbuild/openssl.props b/PCbuild/openssl.props
5216
index 5fd708b211e..044cefd95ea 100644
5317
--- a/PCbuild/openssl.props
@@ -81,10 +45,10 @@ index 5fd708b211e..044cefd95ea 100644
8145
- </Target>
8246
</Project>
8347
diff --git a/PCbuild/openssl.vcxproj b/PCbuild/openssl.vcxproj
84-
index 0da6f674958..b79f35b2c7d 100644
48+
index 7ca750dda8f..17eee400ebb 100644
8549
--- a/PCbuild/openssl.vcxproj
8650
+++ b/PCbuild/openssl.vcxproj
87-
@@ -60,64 +60,8 @@
51+
@@ -60,40 +60,8 @@
8852
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
8953
<Import Project="pyproject.props" />
9054

@@ -95,47 +59,23 @@ index 0da6f674958..b79f35b2c7d 100644
9559
-set VCINSTALLDIR=$(VCInstallDir)
9660
-if not exist "$(IntDir.TrimEnd('\'))" mkdir "$(IntDir.TrimEnd('\'))"
9761
-cd /D "$(IntDir.TrimEnd('\'))"
98-
-$(Perl) "$(opensslDir)\configure" $(OpenSSLPlatform) no-asm
62+
-$(Perl) "$(opensslDir)\configure" $(OpenSSLPlatform) no-asm no-uplink
9963
-nmake
10064
-</NMakeBuildCommandLine>
10165
- </PropertyGroup>
10266
-
10367
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
10468

105-
- <Target Name="_PatchUplink" BeforeTargets="Build">
106-
- <PropertyGroup>
107-
- <Uplink>$(opensslDir)\ms\uplink.c</Uplink>
108-
- <BeforePatch>((h = GetModuleHandle(NULL)) == NULL)</BeforePatch>
109-
- <AfterPatch>((h = GetModuleHandleA("_ssl.pyd")) == NULL) if ((h = GetModuleHandleA("_ssl_d.pyd")) == NULL) if ((h = GetModuleHandle(NULL)) == NULL /*patched*/)</AfterPatch>
110-
- </PropertyGroup>
111-
- <Error Text="Cannot find $(Uplink)" Condition="!Exists($(Uplink))" />
112-
- <PropertyGroup>
113-
- <_Original>$([System.IO.File]::ReadAllText($(Uplink)))</_Original>
114-
- <_Patched>$(_Original.Replace($(BeforePatch), $(AfterPatch)))</_Patched>
115-
- <IsPatched>false</IsPatched>
116-
- <IsPatched Condition="$(_Patched) == $(_Original)">true</IsPatched>
117-
- </PropertyGroup>
118-
- <Message Text="$(Uplink) is already patched" Importance="normal" Condition="$(IsPatched)" />
119-
- <Message Text="Patching $(Uplink)" Importance="high" Condition="!$(IsPatched)" />
120-
- <WriteLinesToFile File="$(Uplink)"
121-
- Lines="$(_Patched)"
122-
- Overwrite="true"
123-
- Encoding="ASCII"
124-
- Condition="!$(IsPatched)" />
125-
- </Target>
126-
-
12769
- <Target Name="_CopyToOutput" AfterTargets="Build">
12870
- <ItemGroup>
12971
- <_Built Include="$(opensslDir)\LICENSE" />
13072
- <_Built Include="$(IntDir)\libcrypto.lib;$(IntDir)\libcrypto-*.dll;$(IntDir)\libcrypto-*.pdb" />
13173
- <_Built Include="$(IntDir)\libssl.lib;$(IntDir)\libssl-*.dll;$(IntDir)\libssl-*.pdb" />
132-
- <_AppLink Include="$(opensslDir)\ms\applink.c" />
13374
- <_Include Include="$(opensslDir)\Include\openssl\*.h" />
13475
- <_Include Include="$(IntDir)\include\openssl\*.h" />
13576
- </ItemGroup>
13677
- <MakeDir Directories="$(opensslOutDir)\include\openssl" />
13778
- <Copy SourceFiles="@(_Built)" DestinationFolder="$(opensslOutDir)" />
138-
- <Copy SourceFiles="@(_AppLink)" DestinationFolder="$(opensslOutDir)\include" />
13979
- <Copy SourceFiles="@(_Include)" DestinationFolder="$(opensslOutDir)\include\openssl" />
14080
- </Target>
14181
-
@@ -149,15 +89,8 @@ index 0da6f674958..b79f35b2c7d 100644
14989
<Target Name="Clean" />
15090
<Target Name="CleanAll">
15191
<Delete Files="$(TargetPath);$(BuildPath)$(tclDLLName)" />
152-
@@ -136,4 +80,4 @@ nmake
153-
</Target>
154-
155-
<Target Name="ResolveAssemblyReferences" />
156-
-</Project>
157-
\ No newline at end of file
158-
+</Project>
15992
diff --git a/PCbuild/python.props b/PCbuild/python.props
160-
index c8ecdb4515a..0ec0914facd 100644
93+
index 42f11754218..0ec0914facd 100644
16194
--- a/PCbuild/python.props
16295
+++ b/PCbuild/python.props
16396
@@ -61,6 +61,7 @@
@@ -172,15 +105,15 @@ index c8ecdb4515a..0ec0914facd 100644
172105
<Import Project="$(ExternalProps)" Condition="$(ExternalProps) != '' and Exists('$(ExternalProps)')" />
173106

174107
<PropertyGroup>
175-
- <sqlite3Dir Condition="$(sqlite3Dir) == ''">$(ExternalsDir)sqlite-3.45.3.0\</sqlite3Dir>
108+
- <sqlite3Dir Condition="$(sqlite3Dir) == ''">$(ExternalsDir)sqlite-3.49.1.0\</sqlite3Dir>
176109
- <bz2Dir Condition="$(bz2Dir) == ''">$(ExternalsDir)bzip2-1.0.8\</bz2Dir>
177110
- <lzmaDir Condition="$(lzmaDir) == ''">$(ExternalsDir)xz-5.2.5\</lzmaDir>
178111
- <libffiDir Condition="$(libffiDir) == ''">$(ExternalsDir)libffi-3.4.4\</libffiDir>
179112
- <libffiOutDir Condition="$(libffiOutDir) == ''">$(libffiDir)$(ArchName)\</libffiOutDir>
180113
- <libffiIncludeDir Condition="$(libffiIncludeDir) == ''">$(libffiOutDir)include</libffiIncludeDir>
181114
<mpdecimalDir Condition="$(mpdecimalDir) == ''">$(ExternalsDir)\mpdecimal-4.0.0\</mpdecimalDir>
182-
- <opensslDir Condition="$(opensslDir) == ''">$(ExternalsDir)openssl-3.0.15\</opensslDir>
183-
- <opensslOutDir Condition="$(opensslOutDir) == ''">$(ExternalsDir)openssl-bin-3.0.15\$(ArchName)\</opensslOutDir>
115+
- <opensslDir Condition="$(opensslDir) == ''">$(ExternalsDir)openssl-3.0.16\</opensslDir>
116+
- <opensslOutDir Condition="$(opensslOutDir) == ''">$(ExternalsDir)openssl-bin-3.0.16.2\$(ArchName)\</opensslOutDir>
184117
- <opensslIncludeDir Condition="$(opensslIncludeDir) == ''">$(opensslOutDir)include</opensslIncludeDir>
185118
<nasmDir Condition="$(nasmDir) == ''">$(ExternalsDir)\nasm-2.11.06\</nasmDir>
186119
- <zlibDir Condition="$(zlibDir) == ''">$(ExternalsDir)\zlib-1.3.1\</zlibDir>
@@ -202,7 +135,7 @@ index 4a99ffc677c..b11fb617963 100644
202135
<ItemGroup>
203136
<ProjectReference Include="pythoncore.vcxproj">
204137
diff --git a/PCbuild/pythonw.vcxproj b/PCbuild/pythonw.vcxproj
205-
index d08c210ef8a..58a9e852bed 100644
138+
index d08c210ef8a..87f71ca59d1 100644
206139
--- a/PCbuild/pythonw.vcxproj
207140
+++ b/PCbuild/pythonw.vcxproj
208141
@@ -102,6 +102,9 @@
@@ -215,10 +148,3 @@ index d08c210ef8a..58a9e852bed 100644
215148
</ItemGroup>
216149
<ItemGroup>
217150
<ProjectReference Include="pythoncore.vcxproj">
218-
@@ -112,4 +115,4 @@
219-
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
220-
<ImportGroup Label="ExtensionTargets">
221-
</ImportGroup>
222-
-</Project>
223-
\ No newline at end of file
224-
+</Project>

recipe/patches/0006-Unvendor-sqlite3.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
From e2e509bbbad24186a2810a64840fb31c4caafbff Mon Sep 17 00:00:00 2001
1+
From 0f989c30617df3a745f5ae53077e48a3ce7af2bd Mon Sep 17 00:00:00 2001
22
From: Nehal J Wani <nehaljw.kkd1@gmail.com>
33
Date: Tue, 5 Oct 2021 12:42:06 -0700
44
Subject: [PATCH 06/24] Unvendor sqlite3

recipe/patches/0007-Add-CondaEcosystemModifyDllSearchPath.patch

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
From 2d93b3366d9e42cd62b70cbfdf89e64a1ea4e65e Mon Sep 17 00:00:00 2001
1+
From 9d2c319335f1a4e0dfb25b4a2e99657afbbd6a67 Mon Sep 17 00:00:00 2001
22
From: Ray Donnelly <mingw.android@gmail.com>
33
Date: Tue, 24 Dec 2019 18:37:17 +0100
44
Subject: [PATCH 07/24] Add CondaEcosystemModifyDllSearchPath()
@@ -33,10 +33,10 @@ Co-authored-by: Isuru Fernando <isuruf@gmail.com>
3333
1 file changed, 96 insertions(+)
3434

3535
diff --git a/Python/pylifecycle.c b/Python/pylifecycle.c
36-
index ba835ef4c84..9e35e0ff000 100644
36+
index a8852a88f94..f1a919bad51 100644
3737
--- a/Python/pylifecycle.c
3838
+++ b/Python/pylifecycle.c
39-
@@ -79,6 +79,10 @@
39+
@@ -74,6 +74,10 @@
4040

4141
#ifdef MS_WINDOWS
4242
# undef BYTE
@@ -47,7 +47,7 @@ index ba835ef4c84..9e35e0ff000 100644
4747
#endif
4848

4949
#define PUTS(fd, str) (void)_Py_write_noraise(fd, str, (int)strlen(str))
50-
@@ -128,6 +132,94 @@ __attribute__ ((section (".PyRuntime")))
50+
@@ -123,6 +127,94 @@ __attribute__ ((section (".PyRuntime")))
5151
= _PyRuntimeState_INIT(_PyRuntime, _Py_Debug_Cookie);
5252
_Py_COMP_DIAG_POP
5353

@@ -142,7 +142,7 @@ index ba835ef4c84..9e35e0ff000 100644
142142
static int runtime_initialized = 0;
143143

144144
PyStatus
145-
@@ -144,6 +236,10 @@ _PyRuntime_Initialize(void)
145+
@@ -139,6 +231,10 @@ _PyRuntime_Initialize(void)
146146
}
147147
runtime_initialized = 1;
148148

recipe/patches/0008-Doing-d1trimfile.patch

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
From 01dd68be0e26dfbf1ec8532d94c97b6ca1b2c7f1 Mon Sep 17 00:00:00 2001
1+
From 383c3568b976dcb6a2994b1ea8d127645cf00ade Mon Sep 17 00:00:00 2001
22
From: Ray Donnelly <mingw.android@gmail.com>
33
Date: Tue, 31 Dec 2019 21:47:47 +0100
44
Subject: [PATCH 08/24] Doing d1trimfile
@@ -747,7 +747,7 @@ index 70212903c83..b85cca2cd51 100644
747747
<AdditionalIncludeDirectories Condition="$(IncludeExternals)">$(zlibDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
748748
<PreprocessorDefinitions>_USRDLL;Py_BUILD_CORE;Py_BUILD_CORE_BUILTIN;Py_ENABLE_SHARED;MS_DLL_ID="$(SysWinVer)";%(PreprocessorDefinitions)</PreprocessorDefinitions>
749749
diff --git a/PCbuild/pythonw.vcxproj b/PCbuild/pythonw.vcxproj
750-
index 58a9e852bed..ce6e35477bf 100644
750+
index 87f71ca59d1..32873d3db15 100644
751751
--- a/PCbuild/pythonw.vcxproj
752752
+++ b/PCbuild/pythonw.vcxproj
753753
@@ -96,6 +96,18 @@

recipe/patches/0009-cross-compile-darwin.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
From 2efd1bb74bafb1d530913d6cc63d11ef48a38344 Mon Sep 17 00:00:00 2001
1+
From 2b1e4a9b02d9644d294325d2236f57121db8b98f Mon Sep 17 00:00:00 2001
22
From: Ray Donnelly <mingw.android@gmail.com>
33
Date: Fri, 2 Oct 2020 00:03:12 +0200
44
Subject: [PATCH 09/24] cross compile darwin

recipe/patches/0010-Fix-TZPATH-on-windows.patch

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
From 80fa2b3750ebe23002706dfb2c0364068536b2ca Mon Sep 17 00:00:00 2001
1+
From 80c75a40f139e463c1405af3e7ecf8a1185b09eb Mon Sep 17 00:00:00 2001
22
From: Isuru Fernando <isuruf@gmail.com>
33
Date: Wed, 7 Oct 2020 10:08:30 -0500
44
Subject: [PATCH 10/24] Fix TZPATH on windows
@@ -8,10 +8,10 @@ Subject: [PATCH 10/24] Fix TZPATH on windows
88
1 file changed, 1 insertion(+)
99

1010
diff --git a/Lib/sysconfig/__init__.py b/Lib/sysconfig/__init__.py
11-
index 7bcb737ff2c..09f3a18f751 100644
11+
index 510c7b9568a..c45f79fbc29 100644
1212
--- a/Lib/sysconfig/__init__.py
1313
+++ b/Lib/sysconfig/__init__.py
14-
@@ -492,6 +492,7 @@ def _init_config_vars():
14+
@@ -499,6 +499,7 @@ def _init_config_vars():
1515
if os.name == 'nt':
1616
_init_non_posix(_CONFIG_VARS)
1717
_CONFIG_VARS['VPATH'] = sys._vpath

0 commit comments

Comments
 (0)