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.14.7" %}
{% set version = "3.14.8" %}
{% 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 = 6 %}
{% 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: 3b48dac8fb59f62eaa67ac83c1eb12bda1b7a08406dd286e252c11a66be27f81
sha256: c2215904f02b175596dc49351585104f4bc20341e1c47378b26a2c274360ce73
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 204c40c00697419f29b214864bab80a8f01d804f Mon Sep 17 00:00:00 2001
From 275618e5cdec09c87dd24c8d06ac56ffda45ea7c 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/26] 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 42bf1157ccc..fb3c27a9ac5 100644
index 42bf1157cc..fb3c27a9ac 100644
--- a/Modules/selectmodule.c
+++ b/Modules/selectmodule.c
@@ -44,7 +44,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 aaa85ea3a1edeb2e93ae12b60c7958084814df37 Mon Sep 17 00:00:00 2001
From ee840291f4b658ab5614eef4960fb9cad036774a 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/26] Win32: Do not download externals
Expand All @@ -8,7 +8,7 @@ Subject: [PATCH 02/26] Win32: Do not download externals
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/PCbuild/build.bat b/PCbuild/build.bat
index 60235704886..717a35c9d7e 100644
index 6023570488..717a35c9d7 100644
--- a/PCbuild/build.bat
+++ b/PCbuild/build.bat
@@ -113,7 +113,7 @@ if "%IncludeSSL%"=="" set IncludeSSL=true
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From 43ac24ca1c1083b50966846f07969a9c6454e22f Mon Sep 17 00:00:00 2001
From 83f7bc0623f8d26b4de528532d00856d5ce45efb 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/26] Fix find_library so that it looks in sys.prefix/lib
Expand All @@ -10,7 +10,7 @@ Subject: [PATCH 03/26] 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 cd67fd87efc..9acb6e8c25f 100644
index cd67fd87ef..9acb6e8c25 100644
--- a/Lib/ctypes/util.py
+++ b/Lib/ctypes/util.py
@@ -135,7 +135,8 @@ def dllist():
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From 21533f279cfe2060e7aa355b860547e7982b5c89 Mon Sep 17 00:00:00 2001
From 6001f676b1297438ed8bcd346ee83511f06ffef5 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/26] 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 1e75993480a..ff96c8e1990 100644
index 1e75993480..ff96c8e199 100644
--- a/Modules/getpath.c
+++ b/Modules/getpath.c
@@ -937,6 +937,7 @@ _PyConfig_InitPathConfig(PyConfig *config, int compute_path_config)
Expand All @@ -23,7 +23,7 @@ index 1e75993480a..ff96c8e1990 100644
!progname_to_dict(dict, "real_executable") ||
!library_to_dict(dict, "library") ||
diff --git a/Modules/getpath.py b/Modules/getpath.py
index 0e4f1e87e73..df5d89d857a 100644
index 0e4f1e87e7..df5d89d857 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 91c3e5bdab6497eca2cfcb6838df9dc3d8317726 Mon Sep 17 00:00:00 2001
From aacc0fc576a7c68a1a5141ae2d5eb132ba9edf4e 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/26] Unvendor openssl
Expand All @@ -13,7 +13,7 @@ Co-authored-by: Isuru Fernando <isuruf@gmail.com>
5 files changed, 9 insertions(+), 56 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 ce4a7781fbd..253aa66f477 100644
index e255ac58c9..05c8c7cd83 100644
--- a/PCbuild/python.props
+++ b/PCbuild/python.props
@@ -68,6 +68,7 @@
Expand All @@ -112,8 +112,8 @@ index ce4a7781fbd..253aa66f477 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.5.7\</opensslDir>
- <opensslOutDir Condition="$(opensslOutDir) == ''">$(ExternalsDir)openssl-bin-3.5.7\$(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>
Expand All @@ -123,7 +123,7 @@ index ce4a7781fbd..253aa66f477 100644

<PropertyGroup>
diff --git a/PCbuild/python.vcxproj b/PCbuild/python.vcxproj
index 70dabaa3c8b..ac5f96ebafc 100644
index 70dabaa3c8..ac5f96ebaf 100644
--- a/PCbuild/python.vcxproj
+++ b/PCbuild/python.vcxproj
@@ -110,6 +110,9 @@
Expand All @@ -137,7 +137,7 @@ index 70dabaa3c8b..ac5f96ebafc 100644
<ItemGroup>
<ProjectReference Include="pythoncore.vcxproj">
diff --git a/PCbuild/pythonw.vcxproj b/PCbuild/pythonw.vcxproj
index c6a5b8ce90a..74bd19144f9 100644
index c6a5b8ce90..74bd19144f 100644
--- a/PCbuild/pythonw.vcxproj
+++ b/PCbuild/pythonw.vcxproj
@@ -105,6 +105,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 6fa5924da6eddfc530015bef11bc498913c630b1 Mon Sep 17 00:00:00 2001
From 8f0a9f199ee952017e0a7dd58c35288cb17a745f 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/26] Unvendor sqlite3
Expand All @@ -10,7 +10,7 @@ Subject: [PATCH 06/26] 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 7296ea75301..9dd5e07ad8a 100644
index 7296ea7530..9dd5e07ad8 100644
--- a/PCbuild/pcbuild.sln
+++ b/PCbuild/pcbuild.sln
@@ -72,8 +72,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_elementtree", "_elementtre
Expand All @@ -56,7 +56,7 @@ index 7296ea75301..9dd5e07ad8a 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 f12ec348b37..f9e5e449a49 100644
index f12ec348b3..f9e5e449a4 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 e2a8b753a8c2420a2f0b793a40725264a116bbda Mon Sep 17 00:00:00 2001
From 8bd6853dd8154238dafcfd095ed2a5fb09b3fa24 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/26] Add CondaEcosystemModifyDllSearchPath()
Expand Down Expand Up @@ -33,7 +33,7 @@ Co-authored-by: Isuru Fernando <isuruf@gmail.com>
1 file changed, 95 insertions(+)

diff --git a/Python/pylifecycle.c b/Python/pylifecycle.c
index fe55ec7caff..cabd42067d7 100644
index fe55ec7caf..cabd42067d 100644
--- a/Python/pylifecycle.c
+++ b/Python/pylifecycle.c
@@ -80,6 +80,10 @@
Expand Down
Loading
Loading