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.12.14" %}
{% set version = "3.12.15" %}
{% 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 @@ -45,7 +45,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: 5c8462af5790baf43a321a1559dbe0db06d1be4300fb85fb53c40060668e548a
sha256: c2c4321961fab0fb999d66e0cecf521c2ab3994c7992873ea99e306c1094fd5a
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 cac3448407a8edcc3514731958e2a603fa40340c Mon Sep 17 00:00:00 2001
From 7ec1d82ac3eb636b2e91b1eea3a3191a71844102 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/23] 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 50788e5344c..43df5ecba84 100644
index 50788e5344..43df5ecba8 100644
--- a/Modules/selectmodule.c
+++ b/Modules/selectmodule.c
@@ -46,7 +46,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 68d58fb4616eceaccd14bb0a912df825d7b44226 Mon Sep 17 00:00:00 2001
From 8455a676201f1c50c521ba692e752d3aa4a19241 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/23] Win32: Do not download externals
Expand All @@ -8,7 +8,7 @@ Subject: [PATCH 02/23] Win32: Do not download externals
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/PCbuild/build.bat b/PCbuild/build.bat
index d333ceabd2e..11e3d16a4fd 100644
index d333ceabd2..11e3d16a4f 100644
--- a/PCbuild/build.bat
+++ b/PCbuild/build.bat
@@ -97,7 +97,7 @@ if "%IncludeCTypes%"=="" set IncludeCTypes=true
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From f5e4eb7db8e8714e5c6b825cd4414f87a54a0b11 Mon Sep 17 00:00:00 2001
From 733ecb306699fec483839f396cbfcf61aa8d5dc0 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/23] Fix find_library so that it looks in sys.prefix/lib
Expand All @@ -10,7 +10,7 @@ Subject: [PATCH 03/23] 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 c550883e7c7..78b0b014f09 100644
index c550883e7c..78b0b014f0 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 316a01dc73fe01c033bb1a2a47b3d2e28bff305f Mon Sep 17 00:00:00 2001
From 206cb9fcec3b9f55efc7626b2d2759cc92242e4b 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/23] 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 0a310000751..b0efef2f539 100644
index 0a31000075..b0efef2f53 100644
--- a/Modules/getpath.c
+++ b/Modules/getpath.c
@@ -899,6 +899,7 @@ _PyConfig_InitPathConfig(PyConfig *config, int compute_path_config)
Expand All @@ -23,7 +23,7 @@ index 0a310000751..b0efef2f539 100644
!progname_to_dict(dict, "real_executable") ||
!library_to_dict(dict, "library") ||
diff --git a/Modules/getpath.py b/Modules/getpath.py
index 29a6b300189..75441c36263 100644
index 29a6b30018..75441c3626 100644
--- a/Modules/getpath.py
+++ b/Modules/getpath.py
@@ -51,6 +51,7 @@
Expand Down
12 changes: 6 additions & 6 deletions recipe/patches/0005-Unvendor-openssl.patch
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From 5918e2a035d60cfaf986ee2c90173f8af73894bc Mon Sep 17 00:00:00 2001
From 7c5c2560b1825c3837fd80f638886c514b55578a 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/23] 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 3fba8e09acd..cf0913f3310 100644
index 3fba8e09ac..cf0913f331 100644
--- a/PCbuild/python.props
+++ b/PCbuild/python.props
@@ -61,6 +61,7 @@
Expand Down Expand Up @@ -120,7 +120,7 @@ index 3fba8e09acd..cf0913f3310 100644

<PropertyGroup>
diff --git a/PCbuild/python.vcxproj b/PCbuild/python.vcxproj
index 846c87fd1ac..8021002c165 100644
index 846c87fd1a..8021002c16 100644
--- a/PCbuild/python.vcxproj
+++ b/PCbuild/python.vcxproj
@@ -107,6 +107,9 @@
Expand All @@ -134,7 +134,7 @@ index 846c87fd1ac..8021002c165 100644
<ItemGroup>
<ProjectReference Include="pythoncore.vcxproj">
diff --git a/PCbuild/pythonw.vcxproj b/PCbuild/pythonw.vcxproj
index f485352f642..38a25470895 100644
index f485352f64..38a2547089 100644
--- a/PCbuild/pythonw.vcxproj
+++ b/PCbuild/pythonw.vcxproj
@@ -99,6 +99,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 edf294c860d1b0a424bc0b8ba12b38409278cb7d Mon Sep 17 00:00:00 2001
From 54773a6b1b174b3fe8ca08a8b1565bee1af818f9 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/23] Unvendor sqlite3
Expand All @@ -10,7 +10,7 @@ Subject: [PATCH 06/23] Unvendor sqlite3
3 files changed, 11 insertions(+), 14 deletions(-)

diff --git a/PCbuild/_sqlite3.vcxproj b/PCbuild/_sqlite3.vcxproj
index 57c7413671e..4735477f00c 100644
index 57c7413671..4735477f00 100644
--- a/PCbuild/_sqlite3.vcxproj
+++ b/PCbuild/_sqlite3.vcxproj
@@ -93,9 +93,12 @@
Expand Down Expand Up @@ -43,7 +43,7 @@ index 57c7413671e..4735477f00c 100644
\ No newline at end of file
+</Project>
diff --git a/PCbuild/pcbuild.sln b/PCbuild/pcbuild.sln
index bdddec60daa..ab43b610a97 100644
index bdddec60da..ab43b610a9 100644
--- a/PCbuild/pcbuild.sln
+++ b/PCbuild/pcbuild.sln
@@ -99,8 +99,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pyexpat", "pyexpat.vcxproj"
Expand All @@ -56,7 +56,7 @@ index bdddec60daa..ab43b610a97 100644
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "python3dll", "python3dll.vcxproj", "{885D4898-D08D-4091-9C40-C700CFE3FC5A}"
diff --git a/PCbuild/sqlite3.vcxproj b/PCbuild/sqlite3.vcxproj
index c502d51833b..c1ff0c9a084 100644
index c502d51833..c1ff0c9a08 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 b6cee93474e3b0d46cd55a0960a7e4a64c6c2250 Mon Sep 17 00:00:00 2001
From c6ee41edd5026b57c1fca2a0084130699b95a4f3 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/23] 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 f5bea14b16b..a7dc3795fce 100644
index f5bea14b16..a7dc3795fc 100644
--- a/Python/pylifecycle.c
+++ b/Python/pylifecycle.c
@@ -51,6 +51,10 @@
Expand Down
Loading
Loading