Skip to content
Merged
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
16 changes: 16 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Agent guidance

## Updating Python and its patches

Before preparing a Python version bump or editing `recipe/patches/*.patch`, read
[the patch regeneration instructions](recipe/patches/README.md) and
[`make-mixed-crlf-patch.py`](recipe/patches/make-mixed-crlf-patch.py) on the target
version branch. If either is absent, consult the corresponding file on upstream
`main`. The repository's patch instructions are authoritative.

Follow the README's complete regeneration and validation workflow before
committing or publishing patch changes. Keep that workflow in the README rather
than duplicating it here.

Run the applicable recipe and pre-commit checks, and report any checks that could
not be completed.
12 changes: 11 additions & 1 deletion recipe/fix_staged_scripts.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ def fix_staged_scripts(scripts_dir):
Fixes scripts which have been installed unix-style to have a .bat
helper
"""
target_arch = os.environ["target_platform"].split("-")[-1]
if not isdir(scripts_dir):
return
for fn in os.listdir(scripts_dir):
Expand All @@ -31,7 +32,16 @@ def fix_staged_scripts(scripts_dir):
# now create the .exe file
# This is hardcoded that conda and conda-build are in the same environment
base_env = dirname(dirname(os.environ['CONDA_EXE']))
exe = join(base_env, 'lib', 'site-packages', 'conda_build', 'cli-64.exe')
# conda-build >= 26.9 sources launchers from conda-launchers
candidates = [
join(base_env, 'share', 'conda-launchers', f'cli-{target_arch}.exe'),
join(base_env, 'lib', 'site-packages', 'conda_build', f'cli-{target_arch}.exe'),
]
exe = next((path for path in candidates if isfile(path)), None)
if exe is None:
raise FileNotFoundError(
'cli-64.exe launcher not found in any of: %s' % ', '.join(candidates)
)
shutil.copyfile(exe, join(scripts_dir, fn + '.exe'))

# remove the original script
Expand Down
6 changes: 3 additions & 3 deletions recipe/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{% set version = "3.13.15" %}
{% set version = "3.13.16" %}
{% set dev = "" %}
{% set dev_ = "" %}
{% set ver2 = '.'.join(version.split('.')[0:2]) %}
{% set ver2nd = ''.join(version.split('.')[0:2]) %}
{% set ver3nd = ''.join(version.split('.')[0:3]) %}
{% set build_number = 3 %}
{% set build_number = 0 %}

# this makes the linter happy
{% set channel_targets = channel_targets or 'conda-forge main' %}
Expand Down Expand Up @@ -64,7 +64,7 @@ package:
source:
- url: https://www.python.org/ftp/python/{{ version }}/Python-{{ version }}{{ dev }}.tar.xz
# sha256 from: https://www.python.org/downloads/release/python-{{ ver3nd }}{{ dev }}/
sha256: 1e66a7945a48390ee4c2a4268a0e4185884059a13c4aab6d148aa208deea4a76
sha256: f4b1bfb3c79b5bb11b8d228a12504163b4c0dab4d679828d8f5f26b6cb6ab35d
patches:
- patches/0001-Win32-Change-FD_SETSIZE-from-512-to-2048.patch
- patches/0002-Win32-Do-not-download-externals.patch
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From 854f031c54bb9398616189546eb657d2a07f43d5 Mon Sep 17 00:00:00 2001
From 5d3bfd7007c2680f41c0b55b4633928fd33c308c Mon Sep 17 00:00:00 2001
From: Ray Donnelly <mingw.android@gmail.com>
Date: Wed, 16 Aug 2017 11:53:55 +0100
Subject: [PATCH 01/25] Win32: Change FD_SETSIZE from 512 to 2048
Expand All @@ -9,7 +9,7 @@ https://github.com/ContinuumIO/anaconda-issues/issues/1241
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Modules/selectmodule.c b/Modules/selectmodule.c
index f69df694d44..1761960c928 100644
index f69df694d4..1761960c92 100644
--- a/Modules/selectmodule.c
+++ b/Modules/selectmodule.c
@@ -45,7 +45,7 @@
Expand Down
4 changes: 2 additions & 2 deletions recipe/patches/0002-Win32-Do-not-download-externals.patch
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From 9e978533605573cbef3519a4efb6cdbfc191e112 Mon Sep 17 00:00:00 2001
From 166ab3486b5bfc03ad2672ed371488927af28898 Mon Sep 17 00:00:00 2001
From: Ray Donnelly <mingw.android@gmail.com>
Date: Thu, 7 Sep 2017 11:35:47 +0100
Subject: [PATCH 02/25] Win32: Do not download externals
Expand All @@ -8,7 +8,7 @@ Subject: [PATCH 02/25] Win32: Do not download externals
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/PCbuild/build.bat b/PCbuild/build.bat
index 6c76f09a071..3dc802b8cef 100644
index 6c76f09a07..3dc802b8ce 100644
--- a/PCbuild/build.bat
+++ b/PCbuild/build.bat
@@ -102,7 +102,7 @@ if "%~1"=="--no-ctypes" (set IncludeCTypes=false) & shift & goto CheckOpts
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From 09a7cd466b0b4939aff8516bf3f54bb10f0b268a Mon Sep 17 00:00:00 2001
From 1aecdf93909341d49a76fa002170f684707c9bfd Mon Sep 17 00:00:00 2001
From: Ray Donnelly <mingw.android@gmail.com>
Date: Tue, 5 Dec 2017 22:47:59 +0000
Subject: [PATCH 03/25] Fix find_library so that it looks in sys.prefix/lib
Expand All @@ -10,7 +10,7 @@ Subject: [PATCH 03/25] Fix find_library so that it looks in sys.prefix/lib
2 files changed, 28 insertions(+), 3 deletions(-)

diff --git a/Lib/ctypes/macholib/dyld.py b/Lib/ctypes/macholib/dyld.py
index 583c47daff3..ab9b01c87e2 100644
index 583c47daff..ab9b01c87e 100644
--- a/Lib/ctypes/macholib/dyld.py
+++ b/Lib/ctypes/macholib/dyld.py
@@ -93,6 +93,10 @@ def dyld_executable_path_search(name, executable_path=None):
Expand All @@ -25,7 +25,7 @@ index 583c47daff3..ab9b01c87e2 100644
yield os.path.join(executable_path, name[len('@executable_path/'):])

diff --git a/Lib/ctypes/util.py b/Lib/ctypes/util.py
index 43f10dedce8..5f3f1bae407 100644
index 43f10dedce..5f3f1bae40 100644
--- a/Lib/ctypes/util.py
+++ b/Lib/ctypes/util.py
@@ -70,7 +70,8 @@ def find_library(name):
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From 6bbbf39e5cbb3463c2a6fb3d2eb90672b9cc91bb Mon Sep 17 00:00:00 2001
From cc538cfd8d7b2c172c66ea092f347f5553ef9f6e Mon Sep 17 00:00:00 2001
From: Ray Donnelly <mingw.android@gmail.com>
Date: Sat, 27 Oct 2018 18:48:30 +0100
Subject: [PATCH 04/25] Disable registry lookup unless CONDA_PY_ALLOW_REG_PATHS
Expand All @@ -11,7 +11,7 @@ Co-authored-by: Isuru Fernando<isuruf@gmail.com>
2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/Modules/getpath.c b/Modules/getpath.c
index d0128b20fae..e7cfeba25ec 100644
index d0128b20fa..e7cfeba25e 100644
--- a/Modules/getpath.c
+++ b/Modules/getpath.c
@@ -945,6 +945,7 @@ _PyConfig_InitPathConfig(PyConfig *config, int compute_path_config)
Expand All @@ -23,7 +23,7 @@ index d0128b20fae..e7cfeba25ec 100644
!progname_to_dict(dict, "real_executable") ||
!library_to_dict(dict, "library") ||
diff --git a/Modules/getpath.py b/Modules/getpath.py
index 8a4bf6d735e..37cfee3d2e7 100644
index 8a4bf6d735..37cfee3d2e 100644
--- a/Modules/getpath.py
+++ b/Modules/getpath.py
@@ -52,6 +52,7 @@
Expand Down
16 changes: 8 additions & 8 deletions recipe/patches/0005-Unvendor-openssl.patch
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From ed852cb94fb4e6ca510606c33ab9f363486a123a Mon Sep 17 00:00:00 2001
From ab600d3270e8d8220416d3165045eb1314cd0db0 Mon Sep 17 00:00:00 2001
From: Nehal J Wani <nehaljw.kkd1@gmail.com>
Date: Sat, 24 Nov 2018 20:38:02 -0600
Subject: [PATCH 05/25] Unvendor openssl
Expand All @@ -13,7 +13,7 @@ Co-authored-by: Isuru Fernando <isuruf@gmail.com>
5 files changed, 9 insertions(+), 54 deletions(-)

diff --git a/PCbuild/openssl.props b/PCbuild/openssl.props
index 5fd708b211e..044cefd95ea 100644
index 5fd708b211..044cefd95e 100644
--- a/PCbuild/openssl.props
+++ b/PCbuild/openssl.props
@@ -2,10 +2,10 @@
Expand Down Expand Up @@ -45,7 +45,7 @@ index 5fd708b211e..044cefd95ea 100644
- </Target>
</Project>
diff --git a/PCbuild/openssl.vcxproj b/PCbuild/openssl.vcxproj
index 7ca750dda8f..17eee400ebb 100644
index 7ca750dda8..17eee400eb 100644
--- a/PCbuild/openssl.vcxproj
+++ b/PCbuild/openssl.vcxproj
@@ -60,40 +60,8 @@
Expand Down Expand Up @@ -90,7 +90,7 @@ index 7ca750dda8f..17eee400ebb 100644
<Target Name="CleanAll">
<Delete Files="$(TargetPath);$(BuildPath)$(tclDLLName)" />
diff --git a/PCbuild/python.props b/PCbuild/python.props
index 64e4cd08db7..d0d58ce57e4 100644
index 93af005c0f..d0d58ce57e 100644
--- a/PCbuild/python.props
+++ b/PCbuild/python.props
@@ -62,6 +62,7 @@
Expand All @@ -112,16 +112,16 @@ index 64e4cd08db7..d0d58ce57e4 100644
- <libffiOutDir Condition="$(libffiOutDir) == ''">$(libffiDir)$(ArchName)\</libffiOutDir>
- <libffiIncludeDir Condition="$(libffiIncludeDir) == ''">$(libffiOutDir)include</libffiIncludeDir>
<mpdecimalDir Condition="$(mpdecimalDir) == ''">$(ExternalsDir)\mpdecimal-4.0.0\</mpdecimalDir>
- <opensslDir Condition="$(opensslDir) == ''">$(ExternalsDir)openssl-3.0.21\</opensslDir>
- <opensslOutDir Condition="$(opensslOutDir) == ''">$(ExternalsDir)openssl-bin-3.0.21\$(ArchName)\</opensslOutDir>
- <opensslDir Condition="$(opensslDir) == ''">$(ExternalsDir)openssl-3.5.9\</opensslDir>
- <opensslOutDir Condition="$(opensslOutDir) == ''">$(ExternalsDir)openssl-bin-3.5.9\$(ArchName)\</opensslOutDir>
- <opensslIncludeDir Condition="$(opensslIncludeDir) == ''">$(opensslOutDir)include</opensslIncludeDir>
<nasmDir Condition="$(nasmDir) == ''">$(ExternalsDir)\nasm-2.11.06\</nasmDir>
- <zlibDir Condition="$(zlibDir) == ''">$(ExternalsDir)\zlib-1.3.1\</zlibDir>
</PropertyGroup>

<PropertyGroup>
diff --git a/PCbuild/python.vcxproj b/PCbuild/python.vcxproj
index 4a99ffc677c..b11fb617963 100644
index 4a99ffc677..b11fb61796 100644
--- a/PCbuild/python.vcxproj
+++ b/PCbuild/python.vcxproj
@@ -110,6 +110,9 @@
Expand All @@ -135,7 +135,7 @@ index 4a99ffc677c..b11fb617963 100644
<ItemGroup>
<ProjectReference Include="pythoncore.vcxproj">
diff --git a/PCbuild/pythonw.vcxproj b/PCbuild/pythonw.vcxproj
index d08c210ef8a..87f71ca59d1 100644
index d08c210ef8..87f71ca59d 100644
--- a/PCbuild/pythonw.vcxproj
+++ b/PCbuild/pythonw.vcxproj
@@ -102,6 +102,9 @@
Expand Down
8 changes: 4 additions & 4 deletions recipe/patches/0006-Unvendor-sqlite3.patch
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From ff202eeec0468f558baba96943c338c402c2be8f Mon Sep 17 00:00:00 2001
From 8698b7eae9cc9ce2cbb9866c57923b614546397d Mon Sep 17 00:00:00 2001
From: Nehal J Wani <nehaljw.kkd1@gmail.com>
Date: Tue, 5 Oct 2021 12:42:06 -0700
Subject: [PATCH 06/25] Unvendor sqlite3
Expand All @@ -10,7 +10,7 @@ Subject: [PATCH 06/25] Unvendor sqlite3
3 files changed, 11 insertions(+), 14 deletions(-)

diff --git a/PCbuild/_sqlite3.vcxproj b/PCbuild/_sqlite3.vcxproj
index 9ae0a0fc3a0..f482734ba1d 100644
index 9ae0a0fc3a..f482734ba1 100644
--- a/PCbuild/_sqlite3.vcxproj
+++ b/PCbuild/_sqlite3.vcxproj
@@ -93,9 +93,12 @@
Expand Down Expand Up @@ -43,7 +43,7 @@ index 9ae0a0fc3a0..f482734ba1d 100644
\ No newline at end of file
+</Project>
diff --git a/PCbuild/pcbuild.sln b/PCbuild/pcbuild.sln
index d10e1c46a91..7516820de82 100644
index d10e1c46a9..7516820de8 100644
--- a/PCbuild/pcbuild.sln
+++ b/PCbuild/pcbuild.sln
@@ -71,8 +71,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_elementtree", "_elementtre
Expand All @@ -56,7 +56,7 @@ index d10e1c46a91..7516820de82 100644
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_testcapi", "_testcapi.vcxproj", "{6901D91C-6E48-4BB7-9FEC-700C8131DF1D}"
diff --git a/PCbuild/sqlite3.vcxproj b/PCbuild/sqlite3.vcxproj
index 6bcc4e913c8..9fe4bb740ab 100644
index 6bcc4e913c..9fe4bb740a 100644
--- a/PCbuild/sqlite3.vcxproj
+++ b/PCbuild/sqlite3.vcxproj
@@ -88,12 +88,12 @@
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From 296ebc9b0d87625fdb3ab586a13f91fd11194e95 Mon Sep 17 00:00:00 2001
From 1b2fcde9c82fddad6a02392797b87d85791cfa53 Mon Sep 17 00:00:00 2001
From: Ray Donnelly <mingw.android@gmail.com>
Date: Tue, 24 Dec 2019 18:37:17 +0100
Subject: [PATCH 07/25] Add CondaEcosystemModifyDllSearchPath()
Expand Down Expand Up @@ -33,7 +33,7 @@ Co-authored-by: Isuru Fernando <isuruf@gmail.com>
1 file changed, 96 insertions(+)

diff --git a/Python/pylifecycle.c b/Python/pylifecycle.c
index fbbc38bc8e1..05e587d8ea5 100644
index fbbc38bc8e..05e587d8ea 100644
--- a/Python/pylifecycle.c
+++ b/Python/pylifecycle.c
@@ -74,6 +74,10 @@
Expand Down
Loading
Loading