diff --git a/recipe/build_base.bat b/recipe/build_base.bat index 59471bca..d524ef99 100644 --- a/recipe/build_base.bat +++ b/recipe/build_base.bat @@ -85,40 +85,39 @@ for %%x in (python%THREAD%%_D%.pdb python%VERNODOTS%%THREAD%%_D%.pdb pythonw%THR @echo on -copy %SRC_DIR%\LICENSE %PREFIX%\LICENSE_PYTHON.txt +mkdir %PREFIX%\lib\python +copy %SRC_DIR%\LICENSE %PREFIX%\lib\python\LICENSE_PYTHON.txt if errorlevel 1 exit 1 :: Populate the DLLs directory -mkdir %PREFIX%\DLLs -xcopy /s /y %SRC_DIR%\PCBuild\%BUILD_PATH%\*.pyd %PREFIX%\DLLs\ +mkdir %PREFIX%\lib\python\lib-dynload +xcopy /s /y %SRC_DIR%\PCBuild\%BUILD_PATH%\*.pyd %PREFIX%\lib\python\lib-dynload if errorlevel 1 exit 1 -copy /Y %SRC_DIR%\PC\icons\py.ico %PREFIX%\DLLs\ +copy /Y %SRC_DIR%\PC\icons\py.ico %PREFIX%\lib\python\lib-dynload if errorlevel 1 exit 1 -copy /Y %SRC_DIR%\PC\icons\pyc.ico %PREFIX%\DLLs\ +copy /Y %SRC_DIR%\PC\icons\pyc.ico %PREFIX%\lib\python\lib-dynload if errorlevel 1 exit 1 -:: Populate the Tools directory -mkdir %PREFIX%\Tools -xcopy /s /y /i %SRC_DIR%\Tools\i18n %PREFIX%\Tools\i18n -if errorlevel 1 exit 1 -xcopy /s /y /i %SRC_DIR%\Tools\scripts %PREFIX%\Tools\scripts +mkdir %PREFIX%\lib\python\Tools +xcopy /s /y /i %SRC_DIR%\Tools\scripts %PREFIX%\lib\python\Tools\scripts if errorlevel 1 exit 1 -del %PREFIX%\Tools\scripts\README +del %PREFIX%\lib\python\Tools\scripts\README if errorlevel 1 exit 1 -del %PREFIX%\Tools\scripts\idle3 +del %PREFIX%\lib\python\Tools\scripts\idle3 if errorlevel 1 exit 1 -move /y %PREFIX%\Tools\scripts\pydoc3 %PREFIX%\Tools\scripts\pydoc3.py +move /y %PREFIX%\lib\python\Tools\scripts\pydoc3 %PREFIX%\lib\python\Tools\scripts\pydoc3.py if errorlevel 1 exit 1 :: Populate the include directory -xcopy /s /y %SRC_DIR%\Include %PREFIX%\include\ +mkdir %PREFIX%\include\python +xcopy /s /y %SRC_DIR%\Include %PREFIX%\include\python\ if errorlevel 1 exit 1 :: Copy generated pyconfig.h -copy /Y %SRC_DIR%\PC\pyconfig.h %PREFIX%\include\ +copy /Y %SRC_DIR%\PC\pyconfig.h %PREFIX%\include\python\ if errorlevel 1 exit 1 :: Populate the Scripts directory @@ -131,50 +130,50 @@ for %%x in (idle pydoc) do ( ) :: Populate the libs directory -if not exist %PREFIX%\libs mkdir %PREFIX%\libs +if not exist %PREFIX%\lib mkdir %PREFIX%\lib dir %SRC_DIR%\PCbuild\%BUILD_PATH%\ -if exist %SRC_DIR%\PCbuild\%BUILD_PATH%\python%VERNODOTS%%THREAD%%_D%.lib copy /Y %SRC_DIR%\PCbuild\%BUILD_PATH%\python%VERNODOTS%%THREAD%%_D%.lib %PREFIX%\libs\ +if exist %SRC_DIR%\PCbuild\%BUILD_PATH%\python%VERNODOTS%%THREAD%%_D%.lib copy /Y %SRC_DIR%\PCbuild\%BUILD_PATH%\python%VERNODOTS%%THREAD%%_D%.lib %PREFIX%\lib\ if errorlevel 1 exit 1 -if exist %SRC_DIR%\PCbuild\%BUILD_PATH%\python3%THREAD%%_D%.lib copy /Y %SRC_DIR%\PCbuild\%BUILD_PATH%\python3%THREAD%%_D%.lib %PREFIX%\libs\ +if exist %SRC_DIR%\PCbuild\%BUILD_PATH%\python3%THREAD%%_D%.lib copy /Y %SRC_DIR%\PCbuild\%BUILD_PATH%\python3%THREAD%%_D%.lib %PREFIX%\lib\ if errorlevel 1 exit 1 -if exist %SRC_DIR%\PCbuild\%BUILD_PATH%\_tkinter%THREAD%%_D%.lib copy /Y %SRC_DIR%\PCbuild\%BUILD_PATH%\_tkinter%THREAD%%_D%.lib %PREFIX%\libs\ +if exist %SRC_DIR%\PCbuild\%BUILD_PATH%\_tkinter%THREAD%%_D%.lib copy /Y %SRC_DIR%\PCbuild\%BUILD_PATH%\_tkinter%THREAD%%_D%.lib %PREFIX%\lib\ if errorlevel 1 exit 1 -:: Populate the Lib directory -del %PREFIX%\libs\libpython*.a -xcopy /s /y %SRC_DIR%\Lib %PREFIX%\Lib\ +:: Populate the lib directory +del %PREFIX%\lib\libpython*.a +xcopy /s /y %SRC_DIR%\lib %PREFIX%\lib\python\ if errorlevel 1 exit 1 :: Copy venv[w]launcher scripts to venv\srcipts\nt -:: See https://github.com/python/cpython/blob/b4a316087c32d83e375087fd35fc511bc430ee8b/Lib/venv/__init__.py#L334-L376 +:: See https://github.com/python/cpython/blob/b4a316087c32d83e375087fd35fc511bc430ee8b/lib/python/venv/__init__.py#L334-L376 if exist %SRC_DIR%\PCbuild\%BUILD_PATH%\venvlauncher%THREAD%%_D%.exe ( @rem We did copy pythonw.exe until 3.12 but starting with 3.13 we seem to need the latter. Should we omit the first? - copy /Y %SRC_DIR%\PCbuild\%BUILD_PATH%\venvlauncher%THREAD%%_D%.exe %PREFIX%\Lib\venv\scripts\nt\python.exe - copy /Y %SRC_DIR%\PCbuild\%BUILD_PATH%\venvlauncher%THREAD%%_D%.exe %PREFIX%\Lib\venv\scripts\nt\venvlauncher%THREAD%%_D%.exe + copy /Y %SRC_DIR%\PCbuild\%BUILD_PATH%\venvlauncher%THREAD%%_D%.exe %PREFIX%\lib\python\venv\scripts\nt\python.exe + copy /Y %SRC_DIR%\PCbuild\%BUILD_PATH%\venvlauncher%THREAD%%_D%.exe %PREFIX%\lib\python\venv\scripts\nt\venvlauncher%THREAD%%_D%.exe ) else ( echo "WARNING :: %SRC_DIR%\PCbuild\%BUILD_PATH%\venvlauncher%THREAD%%_D%.exe does not exist" ) if exist %SRC_DIR%\PCbuild\%BUILD_PATH%\venvwlauncher%THREAD%%_D%.exe ( @rem We did copy pythonw.exe until 3.12 but starting with 3.13 we seem to need the latter. Should we omit the first? - copy /Y %SRC_DIR%\PCbuild\%BUILD_PATH%\venvwlauncher%THREAD%%_D%.exe %PREFIX%\Lib\venv\scripts\nt\pythonw.exe - copy /Y %SRC_DIR%\PCbuild\%BUILD_PATH%\venvwlauncher%THREAD%%_D%.exe %PREFIX%\Lib\venv\scripts\nt\venvwlauncher%THREAD%%_D%.exe + copy /Y %SRC_DIR%\PCbuild\%BUILD_PATH%\venvwlauncher%THREAD%%_D%.exe %PREFIX%\lib\python\venv\scripts\nt\pythonw.exe + copy /Y %SRC_DIR%\PCbuild\%BUILD_PATH%\venvwlauncher%THREAD%%_D%.exe %PREFIX%\lib\python\venv\scripts\nt\venvwlauncher%THREAD%%_D%.exe ) else ( echo "WARNING :: %SRC_DIR%\PCbuild\%BUILD_PATH%\venvwlauncher%THREAD%%_D%.exe does not exist" ) :: Remove test data to save space. :: Though keep `support` as some things use that. -mkdir %PREFIX%\Lib\test_keep +mkdir %PREFIX%\lib\python\test_keep if errorlevel 1 exit 1 -move %PREFIX%\Lib\test\__init__.py %PREFIX%\Lib\test_keep\ +move %PREFIX%\lib\python\test\__init__.py %PREFIX%\lib\python\test_keep\ if errorlevel 1 exit 1 -move %PREFIX%\Lib\test\support %PREFIX%\Lib\test_keep\ +move %PREFIX%\lib\python\test\support %PREFIX%\lib\python\test_keep\ if errorlevel 1 exit 1 -rd /s /q %PREFIX%\Lib\test +rd /s /q %PREFIX%\lib\python\test if errorlevel 1 exit 1 -move %PREFIX%\Lib\test_keep %PREFIX%\Lib\test +move %PREFIX%\lib\python\test_keep %PREFIX%\lib\python\test if errorlevel 1 exit 1 :: We need our Python to be found! @@ -182,7 +181,7 @@ if "%_D%" neq "" copy %PREFIX%\python%_D%.exe %PREFIX%\python.exe if "%EXE_T%" neq "" copy %PREFIX%\python%EXE_T%.exe %PREFIX%\python.exe :: bytecode compile the standard library -%PREFIX%\python.exe -Wi %PREFIX%\Lib\compileall.py -f -q -x "bad_coding|badsyntax|py2_" %PREFIX%\Lib +%PREFIX%\python.exe -Wi %PREFIX%\lib\python\compileall.py -f -q -x "bad_coding|badsyntax|py2_" %PREFIX%\lib\python if errorlevel 1 exit 1 :: Ensure that scripts are generated diff --git a/recipe/meta.yaml b/recipe/meta.yaml index a3a4579b..eb8d61c8 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -32,7 +32,7 @@ {% endif %} {% if win %} - {% set site_packages_path = "Lib/site-packages" %} + {% set site_packages_path = "lib/python/site-packages" %} {% elif freethreading == "yes" %} {% set site_packages_path = "lib/python" + ver2 + "t/site-packages" %} {% else %} @@ -80,6 +80,7 @@ source: {% if freethreading == "yes" %} - patches/0026-Set-Py_GIL_DISABLED-in-windows-to-match-unix.patch {% endif %} + - patches/0027-More-unixy-layout-for-windows.patch build: number: {{ build_number }} @@ -252,11 +253,11 @@ outputs: - test ! -f ${PREFIX}/lib/libpython${PKG_VERSION%.*}.dylib # [osx] - test ! -f ${PREFIX}/lib/libpython${PKG_VERSION%.*}.nolto.a # [unix] {% if freethreading == "yes" %} - - if not exist %PREFIX%\\libs\\python3t.lib exit 1 # [win] - - if not exist %PREFIX%\\libs\\python{{ ver2nd }}t.lib exit 1 # [win] + - if not exist %PREFIX%\\lib\\python3t.lib exit 1 # [win] + - if not exist %PREFIX%\\lib\\python{{ ver2nd }}t.lib exit 1 # [win] {% else %} - - if not exist %PREFIX%\\libs\\python3.lib exit 1 # [win] - - if not exist %PREFIX%\\libs\\python{{ ver2nd }}.lib exit 1 # [win] + - if not exist %PREFIX%\\lib\\python3.lib exit 1 # [win] + - if not exist %PREFIX%\\lib\\python{{ ver2nd }}.lib exit 1 # [win] {% endif %} # https://github.com/conda-forge/python-feedstock/issues/384 - if exist %PREFIX%\\Scripts\\pydoc exit 1 # [win] @@ -265,7 +266,7 @@ outputs: - if not exist %PREFIX%\\Scripts\\idle-script.py exit 1 # [win] - if not exist %PREFIX%\\Scripts\\idle.exe exit 1 # [win] - if not exist %PREFIX%\\Scripts\\pydoc.exe exit 1 # [win] - - if not exist %PREFIX%\\include\\pyconfig.h exit 1 # [win] + - if not exist %PREFIX%\\include\\python\\pyconfig.h exit 1 # [win] - pushd tests - pushd cmake - cmake -GNinja -DPY_VER={{ version }} -DEXTRA_COMPONENTS="Development.Module" --debug-find --trace --debug-output --debug-trycompile . diff --git a/recipe/patches/0001-Win32-Change-FD_SETSIZE-from-512-to-2048.patch b/recipe/patches/0001-Win32-Change-FD_SETSIZE-from-512-to-2048.patch index 18c2ccaf..607e1b97 100644 --- a/recipe/patches/0001-Win32-Change-FD_SETSIZE-from-512-to-2048.patch +++ b/recipe/patches/0001-Win32-Change-FD_SETSIZE-from-512-to-2048.patch @@ -1,7 +1,7 @@ -From ffb1951d87e6554c3e0ae00b6ab8a042e085779a Mon Sep 17 00:00:00 2001 +From b52e23434aaa7b36fdf4ea835fc4d84dff2a61fc Mon Sep 17 00:00:00 2001 From: Ray Donnelly Date: Wed, 16 Aug 2017 11:53:55 +0100 -Subject: [PATCH 01/26] Win32: Change FD_SETSIZE from 512 to 2048 +Subject: [PATCH 01/27] Win32: Change FD_SETSIZE from 512 to 2048 https://github.com/ContinuumIO/anaconda-issues/issues/1241 --- @@ -9,10 +9,10 @@ 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 137bf2ca55b..70e2d178c54 100644 +index eb3148ef246..1d88b182364 100644 --- a/Modules/selectmodule.c +++ b/Modules/selectmodule.c -@@ -44,7 +44,7 @@ +@@ -45,7 +45,7 @@ FD_SETSIZE higher before this; e.g., via compiler /D switch. */ #if defined(MS_WINDOWS) && !defined(FD_SETSIZE) diff --git a/recipe/patches/0002-Win32-Do-not-download-externals.patch b/recipe/patches/0002-Win32-Do-not-download-externals.patch index ef7b2585..7f2d168b 100644 --- a/recipe/patches/0002-Win32-Do-not-download-externals.patch +++ b/recipe/patches/0002-Win32-Do-not-download-externals.patch @@ -1,7 +1,7 @@ -From 25b73c426a756ffea6425130b7e22b5ee544c8ff Mon Sep 17 00:00:00 2001 +From 6d2d2075042e9ac0307271fc700ae7d7bb1d21e6 Mon Sep 17 00:00:00 2001 From: Ray Donnelly Date: Thu, 7 Sep 2017 11:35:47 +0100 -Subject: [PATCH 02/26] Win32: Do not download externals +Subject: [PATCH 02/27] Win32: Do not download externals --- PCbuild/build.bat | 2 +- diff --git a/recipe/patches/0003-Fix-find_library-so-that-it-looks-in-sys.prefix-lib-.patch b/recipe/patches/0003-Fix-find_library-so-that-it-looks-in-sys.prefix-lib-.patch index a3f9e58d..ec84d55e 100644 --- a/recipe/patches/0003-Fix-find_library-so-that-it-looks-in-sys.prefix-lib-.patch +++ b/recipe/patches/0003-Fix-find_library-so-that-it-looks-in-sys.prefix-lib-.patch @@ -1,7 +1,7 @@ -From bd6431cd6b69c8111e1b3c72a89d5ace434c6265 Mon Sep 17 00:00:00 2001 +From a4e219363bfe395745df9c2cf5e01b6c0004021a Mon Sep 17 00:00:00 2001 From: Ray Donnelly Date: Tue, 5 Dec 2017 22:47:59 +0000 -Subject: [PATCH 03/26] Fix find_library so that it looks in sys.prefix/lib +Subject: [PATCH 03/27] Fix find_library so that it looks in sys.prefix/lib first --- @@ -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 3b21658433b..ecd2c6cbd9c 100644 +index 3b21658433b..2c900c1e2cf 100644 --- a/Lib/ctypes/util.py +++ b/Lib/ctypes/util.py @@ -135,7 +135,8 @@ def dllist(): diff --git a/recipe/patches/0004-Disable-registry-lookup-unless-CONDA_PY_ALLOW_REG_PA.patch b/recipe/patches/0004-Disable-registry-lookup-unless-CONDA_PY_ALLOW_REG_PA.patch index 7d3b5f68..78f03800 100644 --- a/recipe/patches/0004-Disable-registry-lookup-unless-CONDA_PY_ALLOW_REG_PA.patch +++ b/recipe/patches/0004-Disable-registry-lookup-unless-CONDA_PY_ALLOW_REG_PA.patch @@ -1,7 +1,7 @@ -From e380a8cfc9757d26d85cfe1d0c965b7415fb73ac Mon Sep 17 00:00:00 2001 +From d24fd301838f726090fb66e1d4a548cf828062a0 Mon Sep 17 00:00:00 2001 From: Ray Donnelly Date: Sat, 27 Oct 2018 18:48:30 +0100 -Subject: [PATCH 04/26] Disable registry lookup unless CONDA_PY_ALLOW_REG_PATHS +Subject: [PATCH 04/27] Disable registry lookup unless CONDA_PY_ALLOW_REG_PATHS is not 0 Co-authored-by: Isuru Fernando diff --git a/recipe/patches/0005-Unvendor-openssl.patch b/recipe/patches/0005-Unvendor-openssl.patch index 9660771c..0d97e763 100644 --- a/recipe/patches/0005-Unvendor-openssl.patch +++ b/recipe/patches/0005-Unvendor-openssl.patch @@ -1,7 +1,7 @@ -From d441985a62cf37f233a6093a187e06497740069d Mon Sep 17 00:00:00 2001 +From fa96beea750f3bb06218146fa543c75b5e33120c Mon Sep 17 00:00:00 2001 From: Nehal J Wani Date: Sat, 24 Nov 2018 20:38:02 -0600 -Subject: [PATCH 05/26] Unvendor openssl +Subject: [PATCH 05/27] Unvendor openssl Co-authored-by: Isuru Fernando --- diff --git a/recipe/patches/0006-Unvendor-sqlite3.patch b/recipe/patches/0006-Unvendor-sqlite3.patch index 089cba66..895c21bb 100644 --- a/recipe/patches/0006-Unvendor-sqlite3.patch +++ b/recipe/patches/0006-Unvendor-sqlite3.patch @@ -1,7 +1,7 @@ -From b9106812add3d50b2f441cf7d463725f60b9978c Mon Sep 17 00:00:00 2001 +From 24c242dbf9cf16f624d2049188fd87b7476ff424 Mon Sep 17 00:00:00 2001 From: Nehal J Wani Date: Tue, 5 Oct 2021 12:42:06 -0700 -Subject: [PATCH 06/26] Unvendor sqlite3 +Subject: [PATCH 06/27] Unvendor sqlite3 --- PCbuild/_sqlite3.vcxproj | 11 +++++------ diff --git a/recipe/patches/0007-Add-CondaEcosystemModifyDllSearchPath.patch b/recipe/patches/0007-Add-CondaEcosystemModifyDllSearchPath.patch index 2adf2356..88467b77 100644 --- a/recipe/patches/0007-Add-CondaEcosystemModifyDllSearchPath.patch +++ b/recipe/patches/0007-Add-CondaEcosystemModifyDllSearchPath.patch @@ -1,7 +1,7 @@ -From 32d83eacf1dc0cb8db86f22cd310e376d5493350 Mon Sep 17 00:00:00 2001 +From 4465a70a1aa51ee58fb92a3bc317784cc37f5d57 Mon Sep 17 00:00:00 2001 From: Ray Donnelly Date: Tue, 24 Dec 2019 18:37:17 +0100 -Subject: [PATCH 07/26] Add CondaEcosystemModifyDllSearchPath() +Subject: [PATCH 07/27] Add CondaEcosystemModifyDllSearchPath() The python interpreter is modifed so that it works as if the python interpreter was called with the following conda directories. @@ -33,10 +33,10 @@ Co-authored-by: Isuru Fernando 1 file changed, 95 insertions(+) diff --git a/Python/pylifecycle.c b/Python/pylifecycle.c -index 711e7bc89b7..89ad70f2105 100644 +index 5da0f3e5be3..d62ba38f3fb 100644 --- a/Python/pylifecycle.c +++ b/Python/pylifecycle.c -@@ -85,6 +85,10 @@ +@@ -90,6 +90,10 @@ #ifdef MS_WINDOWS # undef BYTE @@ -47,7 +47,7 @@ index 711e7bc89b7..89ad70f2105 100644 #endif #define PUTS(fd, str) (void)_Py_write_noraise(fd, str, (int)strlen(str)) -@@ -119,6 +123,93 @@ GENERATE_DEBUG_SECTION(PyRuntime, _PyRuntimeState _PyRuntime) +@@ -124,6 +128,93 @@ GENERATE_DEBUG_SECTION(PyRuntime, _PyRuntimeState _PyRuntime) = _PyRuntimeState_INIT(_PyRuntime, _Py_Debug_Cookie); _Py_COMP_DIAG_POP @@ -141,7 +141,7 @@ index 711e7bc89b7..89ad70f2105 100644 static int runtime_initialized = 0; -@@ -136,6 +227,10 @@ _PyRuntime_Initialize(void) +@@ -141,6 +232,10 @@ _PyRuntime_Initialize(void) } runtime_initialized = 1; diff --git a/recipe/patches/0008-Doing-d1trimfile.patch b/recipe/patches/0008-Doing-d1trimfile.patch index 23878624..ae344b78 100644 --- a/recipe/patches/0008-Doing-d1trimfile.patch +++ b/recipe/patches/0008-Doing-d1trimfile.patch @@ -1,7 +1,7 @@ -From 9a38ec4f30d8ec426af73ff082b696dd31d3dcbb Mon Sep 17 00:00:00 2001 +From b985873fd8df7c9160e604760fb3f56a727858e1 Mon Sep 17 00:00:00 2001 From: Ray Donnelly Date: Tue, 31 Dec 2019 21:47:47 +0100 -Subject: [PATCH 08/26] Doing d1trimfile +Subject: [PATCH 08/27] Doing d1trimfile --- PCbuild/_asyncio.vcxproj | 20 ++++++++++++++++++++ diff --git a/recipe/patches/0009-cross-compile-darwin.patch b/recipe/patches/0009-cross-compile-darwin.patch index 998ecdec..c388e2f3 100644 --- a/recipe/patches/0009-cross-compile-darwin.patch +++ b/recipe/patches/0009-cross-compile-darwin.patch @@ -1,7 +1,7 @@ -From 323229d393ca44056d519d8b926ac57d900f6fa9 Mon Sep 17 00:00:00 2001 +From e8271f4d9ee63e19ddc13f0eeda6e8f85d04e281 Mon Sep 17 00:00:00 2001 From: Ray Donnelly Date: Fri, 2 Oct 2020 00:03:12 +0200 -Subject: [PATCH 09/26] cross compile darwin +Subject: [PATCH 09/27] cross compile darwin By Isuru Fernando. --- @@ -29,10 +29,10 @@ index 9d7aa5c66a9..2401eff96df 100644 try: import plistlib diff --git a/configure b/configure -index eca5f03cdcf..0595b8dc8c2 100755 +index 4726b4fe310..3dd96b59b86 100755 --- a/configure +++ b/configure -@@ -4140,6 +4140,9 @@ then +@@ -4142,6 +4142,9 @@ then *-*-linux*) ac_sys_system=Linux ;; @@ -42,18 +42,18 @@ index eca5f03cdcf..0595b8dc8c2 100755 *-*-cygwin*) ac_sys_system=Cygwin ;; -@@ -4619,6 +4622,9 @@ if test "$cross_compiling" = yes; then - _host_ident=$host_cpu +@@ -4625,6 +4628,9 @@ if test "$cross_compiling" = yes; then esac ;; -+ *-*-darwin*) + *-gnu) + _host_ident=$host_cpu -+ ;; - *-*-cygwin*) - _host_ident= ++ ;; ++ *-*-darwin*) + _host_ident=$host_cpu ;; + *-*-cygwin*) diff --git a/configure.ac b/configure.ac -index c21024a1e77..9a63e9bbaef 100644 +index dd860292cc2..3d9f990e3d9 100644 --- a/configure.ac +++ b/configure.ac @@ -333,6 +333,9 @@ then @@ -66,9 +66,9 @@ index c21024a1e77..9a63e9bbaef 100644 *-*-cygwin*) ac_sys_system=Cygwin ;; -@@ -780,6 +783,9 @@ if test "$cross_compiling" = yes; then - _host_ident=$host_cpu - esac +@@ -786,6 +789,9 @@ if test "$cross_compiling" = yes; then + *-gnu) + _host_ident=$host_cpu ;; + *-*-darwin*) + _host_ident=$host_cpu diff --git a/recipe/patches/0010-Fix-TZPATH-on-windows.patch b/recipe/patches/0010-Fix-TZPATH-on-windows.patch index aeb319c9..e16ca574 100644 --- a/recipe/patches/0010-Fix-TZPATH-on-windows.patch +++ b/recipe/patches/0010-Fix-TZPATH-on-windows.patch @@ -1,14 +1,14 @@ -From 1848c4134c71cda587ff04bea02e59cb2347669d Mon Sep 17 00:00:00 2001 +From c78be3cb671eaa661890d197931c868e227e6bbd Mon Sep 17 00:00:00 2001 From: Isuru Fernando Date: Wed, 7 Oct 2020 10:08:30 -0500 -Subject: [PATCH 10/26] Fix TZPATH on windows +Subject: [PATCH 10/27] Fix TZPATH on windows --- Lib/sysconfig/__init__.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Lib/sysconfig/__init__.py b/Lib/sysconfig/__init__.py -index 8ff9c99435b..2caf1862ba0 100644 +index 47415adce04..654a1ef225f 100644 --- a/Lib/sysconfig/__init__.py +++ b/Lib/sysconfig/__init__.py @@ -175,6 +175,7 @@ def joinuser(*args): diff --git a/recipe/patches/0011-Make-dyld-search-work-with-SYSTEM_VERSION_COMPAT-1.patch b/recipe/patches/0011-Make-dyld-search-work-with-SYSTEM_VERSION_COMPAT-1.patch index 0aaf0cf2..d8d8f3a8 100644 --- a/recipe/patches/0011-Make-dyld-search-work-with-SYSTEM_VERSION_COMPAT-1.patch +++ b/recipe/patches/0011-Make-dyld-search-work-with-SYSTEM_VERSION_COMPAT-1.patch @@ -1,7 +1,7 @@ -From 387b71e1e8de72e8b88166e0a7cbdb79416acd53 Mon Sep 17 00:00:00 2001 +From 09071420bcbf7f82e8415cdb9b5ed8d964f715ef Mon Sep 17 00:00:00 2001 From: Isuru Fernando Date: Mon, 25 Jan 2021 03:28:08 -0600 -Subject: [PATCH 11/26] Make dyld search work with SYSTEM_VERSION_COMPAT=1 +Subject: [PATCH 11/27] Make dyld search work with SYSTEM_VERSION_COMPAT=1 In macOS Big Sur, if the executable was compiled with `MACOSX_DEPLOYMENT_TARGET=10.15` or below, then SYSTEM_VERSION_COMPAT=1 is the default which means that Big Sur diff --git a/recipe/patches/0012-Unvendor-bzip2.patch b/recipe/patches/0012-Unvendor-bzip2.patch index bc19267a..acff1942 100644 --- a/recipe/patches/0012-Unvendor-bzip2.patch +++ b/recipe/patches/0012-Unvendor-bzip2.patch @@ -1,7 +1,7 @@ -From 108f13f1274c37edc200c431e74f6d5de1f0472e Mon Sep 17 00:00:00 2001 +From c7f8d6035f1e08cced22c78064ea2f70d6daaf2c Mon Sep 17 00:00:00 2001 From: Isuru Fernando Date: Mon, 16 Aug 2021 02:56:27 -0700 -Subject: [PATCH 12/26] Unvendor bzip2 +Subject: [PATCH 12/27] Unvendor bzip2 --- PCbuild/_bz2.vcxproj | 15 +++++---------- diff --git a/recipe/patches/0013-Unvendor-libffi.patch b/recipe/patches/0013-Unvendor-libffi.patch index 1e9516e6..5469ba64 100644 --- a/recipe/patches/0013-Unvendor-libffi.patch +++ b/recipe/patches/0013-Unvendor-libffi.patch @@ -1,7 +1,7 @@ -From e12404f2f87ab519d56519e894798a020a31a50b Mon Sep 17 00:00:00 2001 +From f080d8e1665b6f3d36e8f650616d80284da0ded7 Mon Sep 17 00:00:00 2001 From: Isuru Fernando Date: Mon, 16 Aug 2021 03:07:40 -0700 -Subject: [PATCH 13/26] Unvendor libffi +Subject: [PATCH 13/27] Unvendor libffi --- PCbuild/libffi.props | 17 ++++------------- diff --git a/recipe/patches/0014-Unvendor-tcltk.patch b/recipe/patches/0014-Unvendor-tcltk.patch index 8f882b62..c65d660a 100644 --- a/recipe/patches/0014-Unvendor-tcltk.patch +++ b/recipe/patches/0014-Unvendor-tcltk.patch @@ -1,7 +1,7 @@ -From 224891042e975b4c534582fcb201f7b1510bb7ad Mon Sep 17 00:00:00 2001 +From b14aa0590145f63510ff33c81712d462685fe23c Mon Sep 17 00:00:00 2001 From: Isuru Fernando Date: Fri, 20 Aug 2021 10:23:51 -0700 -Subject: [PATCH 14/26] Unvendor tcltk +Subject: [PATCH 14/27] Unvendor tcltk --- PCbuild/_tkinter.vcxproj | 6 ------ diff --git a/recipe/patches/0015-unvendor-xz.patch b/recipe/patches/0015-unvendor-xz.patch index 6bfa4858..9387cdd7 100644 --- a/recipe/patches/0015-unvendor-xz.patch +++ b/recipe/patches/0015-unvendor-xz.patch @@ -1,7 +1,7 @@ -From a49377ccaae2185b5ed4658d361725c32a3b5b67 Mon Sep 17 00:00:00 2001 +From f7a78fc4cd5330f7b0f144bf63fdc47163006288 Mon Sep 17 00:00:00 2001 From: Isuru Fernando Date: Sat, 25 Sep 2021 10:07:05 -0700 -Subject: [PATCH 15/26] unvendor xz +Subject: [PATCH 15/27] unvendor xz --- PCbuild/_lzma.vcxproj | 10 +++------- diff --git a/recipe/patches/0016-unvendor-zlib.patch b/recipe/patches/0016-unvendor-zlib.patch index 46015dc8..964d3301 100644 --- a/recipe/patches/0016-unvendor-zlib.patch +++ b/recipe/patches/0016-unvendor-zlib.patch @@ -1,7 +1,7 @@ -From a20ff3cb121cccad86df60f0e6594b01cb16c97a Mon Sep 17 00:00:00 2001 +From 3c798a27a13178e21ebef9af0958994e8982b69c Mon Sep 17 00:00:00 2001 From: Isuru Fernando Date: Wed, 29 Sep 2021 15:21:55 -0700 -Subject: [PATCH 16/26] unvendor zlib +Subject: [PATCH 16/27] unvendor zlib --- PCbuild/pythoncore.vcxproj | 14 ++----- diff --git a/recipe/patches/0017-Do-not-pass-g-to-GCC-when-not-Py_DEBUG.patch b/recipe/patches/0017-Do-not-pass-g-to-GCC-when-not-Py_DEBUG.patch index 32edaddb..96810213 100644 --- a/recipe/patches/0017-Do-not-pass-g-to-GCC-when-not-Py_DEBUG.patch +++ b/recipe/patches/0017-Do-not-pass-g-to-GCC-when-not-Py_DEBUG.patch @@ -1,7 +1,7 @@ -From f424f1bd6619a7134bb4543b52d36ed8af4b7aa6 Mon Sep 17 00:00:00 2001 +From 8412a62f4b136ebf3d2f9a49d2f6a273ea354dd5 Mon Sep 17 00:00:00 2001 From: Ray Donnelly Date: Wed, 16 Aug 2017 11:45:28 +0100 -Subject: [PATCH 17/26] Do not pass -g to GCC when not Py_DEBUG +Subject: [PATCH 17/27] Do not pass -g to GCC when not Py_DEBUG This bloats our exe and our modules a lot. --- @@ -10,10 +10,10 @@ This bloats our exe and our modules a lot. 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/configure b/configure -index 0595b8dc8c2..4f2966857ba 100755 +index 3dd96b59b86..369b032c7a5 100755 --- a/configure +++ b/configure -@@ -5824,9 +5824,9 @@ if test $ac_test_CFLAGS; then +@@ -5832,9 +5832,9 @@ if test $ac_test_CFLAGS; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then @@ -25,7 +25,7 @@ index 0595b8dc8c2..4f2966857ba 100755 fi else if test "$GCC" = yes; then -@@ -9619,7 +9619,7 @@ then +@@ -9667,7 +9667,7 @@ then if test "$Py_DEBUG" = 'true' ; then OPT="-g $PYDEBUG_CFLAGS -Wall" else @@ -35,10 +35,10 @@ index 0595b8dc8c2..4f2966857ba 100755 ;; *) diff --git a/configure.ac b/configure.ac -index 9a63e9bbaef..854e66bedcb 100644 +index 3d9f990e3d9..d6bb9724a7d 100644 --- a/configure.ac +++ b/configure.ac -@@ -2327,7 +2327,7 @@ then +@@ -2336,7 +2336,7 @@ then if test "$Py_DEBUG" = 'true' ; then OPT="-g $PYDEBUG_CFLAGS -Wall" else diff --git a/recipe/patches/0018-Unvendor-expat.patch b/recipe/patches/0018-Unvendor-expat.patch index 1eaac615..4364c1e9 100644 --- a/recipe/patches/0018-Unvendor-expat.patch +++ b/recipe/patches/0018-Unvendor-expat.patch @@ -1,7 +1,7 @@ -From a1019278bfabcbacd69bbbf62cba9b5e8edd5763 Mon Sep 17 00:00:00 2001 +From bd65aba356c307b50aa0585d865279168e0ed9e2 Mon Sep 17 00:00:00 2001 From: Isuru Fernando Date: Wed, 29 Mar 2023 23:07:10 -0500 -Subject: [PATCH 18/26] Unvendor expat +Subject: [PATCH 18/27] Unvendor expat --- PCbuild/_elementtree.vcxproj | 24 ++---------- diff --git a/recipe/patches/0019-Remove-unused-readelf.patch b/recipe/patches/0019-Remove-unused-readelf.patch index ca162a4d..d35744ab 100644 --- a/recipe/patches/0019-Remove-unused-readelf.patch +++ b/recipe/patches/0019-Remove-unused-readelf.patch @@ -1,7 +1,7 @@ -From dac34619b5be2dea6cff95887e8350716e1e4ca5 Mon Sep 17 00:00:00 2001 +From 163ac65b3ebb8350b14428ce2a867ab9157de04a Mon Sep 17 00:00:00 2001 From: Charles Bousseau Date: Thu, 25 May 2023 17:56:53 -0400 -Subject: [PATCH 19/26] Remove unused readelf +Subject: [PATCH 19/27] Remove unused readelf readelf has been dropped. .. date: 2022-11-02-10-56-40 @@ -15,7 +15,7 @@ Drop unused build dependency on ``readelf``. 1 file changed, 1 deletion(-) diff --git a/Makefile.pre.in b/Makefile.pre.in -index 120a6add385..e39dfef95ae 100644 +index 354580aa482..1461a30cd79 100644 --- a/Makefile.pre.in +++ b/Makefile.pre.in @@ -38,7 +38,6 @@ CC= @CC@ diff --git a/recipe/patches/0020-Don-t-checksharedmods-if-cross-compiling.patch b/recipe/patches/0020-Don-t-checksharedmods-if-cross-compiling.patch index dd578b03..8857b83e 100644 --- a/recipe/patches/0020-Don-t-checksharedmods-if-cross-compiling.patch +++ b/recipe/patches/0020-Don-t-checksharedmods-if-cross-compiling.patch @@ -1,7 +1,7 @@ -From b5e14a23a5c91e6f7e14f923efed0ac803ef79f6 Mon Sep 17 00:00:00 2001 +From c3948b896e5d07f7ae548c9a3dc1ac8b7cb1ab80 Mon Sep 17 00:00:00 2001 From: "Uwe L. Korn" Date: Fri, 1 Sep 2023 23:32:14 +0200 -Subject: [PATCH 20/26] Don't checksharedmods if cross-compiling +Subject: [PATCH 20/27] Don't checksharedmods if cross-compiling --- Makefile.pre.in | 2 +- @@ -10,7 +10,7 @@ Subject: [PATCH 20/26] Don't checksharedmods if cross-compiling create mode 100755 if_runnable.sh diff --git a/Makefile.pre.in b/Makefile.pre.in -index e39dfef95ae..109939cbc36 100644 +index 1461a30cd79..5acf12b7fd3 100644 --- a/Makefile.pre.in +++ b/Makefile.pre.in @@ -1615,7 +1615,7 @@ checksharedmods: sharedmods $(PYTHON_FOR_BUILD_DEPS) $(BUILDPYTHON) diff --git a/recipe/patches/0021-Override-configure-LIBFFI.patch b/recipe/patches/0021-Override-configure-LIBFFI.patch index 502cd71e..cd747f06 100644 --- a/recipe/patches/0021-Override-configure-LIBFFI.patch +++ b/recipe/patches/0021-Override-configure-LIBFFI.patch @@ -1,17 +1,17 @@ -From ff05e640d84cddc9fb18ae57b476fdbcc0a99c05 Mon Sep 17 00:00:00 2001 +From c1c7a327ddf5c562d42ae540c189737117cdb2c4 Mon Sep 17 00:00:00 2001 From: "Uwe L. Korn" Date: Tue, 5 Sep 2023 21:51:31 +0200 -Subject: [PATCH 21/26] Override configure LIBFFI +Subject: [PATCH 21/27] Override configure LIBFFI --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure b/configure -index 4f2966857ba..9f700232d40 100755 +index 369b032c7a5..1248a8ccf34 100755 --- a/configure +++ b/configure -@@ -15317,7 +15317,7 @@ if test "x$ac_cv_lib_ffi_ffi_call" = xyes +@@ -15458,7 +15458,7 @@ if test "x$ac_cv_lib_ffi_ffi_call" = xyes then : have_libffi=yes diff --git a/recipe/patches/0022-Unvendor-libmpdec.patch b/recipe/patches/0022-Unvendor-libmpdec.patch index 0a24c897..c4f7f537 100644 --- a/recipe/patches/0022-Unvendor-libmpdec.patch +++ b/recipe/patches/0022-Unvendor-libmpdec.patch @@ -1,7 +1,7 @@ -From b713152ab14c7df7ed3ea0e2b963c263e2a46eef Mon Sep 17 00:00:00 2001 +From 984b3d2f2c8f23324ea4d70ca5554e2320eabc2e Mon Sep 17 00:00:00 2001 From: Isuru Fernando Date: Fri, 16 Aug 2024 21:34:43 -0500 -Subject: [PATCH 22/26] Unvendor libmpdec +Subject: [PATCH 22/27] Unvendor libmpdec --- PCbuild/_decimal.vcxproj | 51 ++++++---------------------------------- diff --git a/recipe/patches/0023-Brand-conda-forge.patch b/recipe/patches/0023-Brand-conda-forge.patch index bf3e5347..e36eb168 100644 --- a/recipe/patches/0023-Brand-conda-forge.patch +++ b/recipe/patches/0023-Brand-conda-forge.patch @@ -1,7 +1,7 @@ -From a5f26fdd98167ffbcfd64502e85c6cbac3a4638c Mon Sep 17 00:00:00 2001 +From 0cd204331a095425b848df1b71a8eba3dc55604b Mon Sep 17 00:00:00 2001 From: Isuru Fernando Date: Wed, 28 Aug 2024 11:12:22 -0500 -Subject: [PATCH 23/26] Brand conda-forge +Subject: [PATCH 23/27] Brand conda-forge --- Lib/platform.py | 1 + diff --git a/recipe/patches/0024-Do-not-define-pid_t-as-it-might-conflict-with-the-ac.patch b/recipe/patches/0024-Do-not-define-pid_t-as-it-might-conflict-with-the-ac.patch index 39d08ce3..85dd6eac 100644 --- a/recipe/patches/0024-Do-not-define-pid_t-as-it-might-conflict-with-the-ac.patch +++ b/recipe/patches/0024-Do-not-define-pid_t-as-it-might-conflict-with-the-ac.patch @@ -1,7 +1,7 @@ -From 3076bdfe11bc89567638c0ff669a8ad817dd759b Mon Sep 17 00:00:00 2001 +From efeee2e5065c4ad3a5a4957448baa84eb3ef3b45 Mon Sep 17 00:00:00 2001 From: Isuru Fernando Date: Sun, 12 Jan 2025 10:37:29 +0530 -Subject: [PATCH 24/26] Do not define pid_t as it might conflict with the +Subject: [PATCH 24/27] Do not define pid_t as it might conflict with the actual definition --- @@ -15,7 +15,7 @@ Subject: [PATCH 24/26] Do not define pid_t as it might conflict with the 7 files changed, 20 insertions(+), 2 deletions(-) diff --git a/Modules/_testcapi/long.c b/Modules/_testcapi/long.c -index 6313abf5485..bc8169e2f68 100644 +index 008a7d37726..7829e9cc714 100644 --- a/Modules/_testcapi/long.c +++ b/Modules/_testcapi/long.c @@ -6,6 +6,10 @@ @@ -30,7 +30,7 @@ index 6313abf5485..bc8169e2f68 100644 module _testcapi [clinic start generated code]*/ diff --git a/Modules/_testcapimodule.c b/Modules/_testcapimodule.c -index c0ab35cda19..af073445222 100644 +index aa12db20908..15489be2e95 100644 --- a/Modules/_testcapimodule.c +++ b/Modules/_testcapimodule.c @@ -23,6 +23,10 @@ @@ -75,10 +75,10 @@ index ad4c5dd1c9b..0053e527fe7 100644 "stat($module, /, path, *, dir_fd=None, follow_symlinks=True)\n" "--\n" diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c -index aa3d682a19b..102ba435d86 100644 +index e5ce487723b..e90463fa21e 100644 --- a/Modules/posixmodule.c +++ b/Modules/posixmodule.c -@@ -220,6 +220,7 @@ +@@ -221,6 +221,7 @@ # if defined(MS_WINDOWS_DESKTOP) || defined(MS_WINDOWS_SYSTEM) # define HAVE_SYMLINK # endif /* MS_WINDOWS_DESKTOP | MS_WINDOWS_SYSTEM */ diff --git a/recipe/patches/0025-Unvendor-zstd.patch b/recipe/patches/0025-Unvendor-zstd.patch index d258ba06..44b03d1b 100644 --- a/recipe/patches/0025-Unvendor-zstd.patch +++ b/recipe/patches/0025-Unvendor-zstd.patch @@ -1,7 +1,7 @@ -From afc1b0812b94fbb4ada518031f0c518c526f932e Mon Sep 17 00:00:00 2001 +From f03fda6332e6d34a9826ed494aab78b1315ea414 Mon Sep 17 00:00:00 2001 From: "Uwe L. Korn" Date: Tue, 22 Jul 2025 18:07:54 +0200 -Subject: [PATCH 25/26] Unvendor zstd +Subject: [PATCH 25/27] Unvendor zstd --- PCbuild/_zstd.vcxproj | 58 +------------ diff --git a/recipe/patches/0026-Set-Py_GIL_DISABLED-in-windows-to-match-unix.patch b/recipe/patches/0026-Set-Py_GIL_DISABLED-in-windows-to-match-unix.patch index 523b2d3c..31a9c6a7 100644 --- a/recipe/patches/0026-Set-Py_GIL_DISABLED-in-windows-to-match-unix.patch +++ b/recipe/patches/0026-Set-Py_GIL_DISABLED-in-windows-to-match-unix.patch @@ -1,7 +1,7 @@ -From 6a769cac72e65980185dbc12c76655656fea19ad Mon Sep 17 00:00:00 2001 +From e332b0f997ce1bd79d68b920151507776207fb62 Mon Sep 17 00:00:00 2001 From: Isuru Fernando Date: Tue, 2 Dec 2025 09:46:56 -0800 -Subject: [PATCH 26/26] Set Py_GIL_DISABLED in windows to match unix +Subject: [PATCH 26/27] Set Py_GIL_DISABLED in windows to match unix This is not set upstream because the windows distribution supports free-threaded and default builds at the same time. We have the diff --git a/recipe/patches/0027-More-unixy-layout-for-windows.patch b/recipe/patches/0027-More-unixy-layout-for-windows.patch new file mode 100644 index 00000000..69285bd5 --- /dev/null +++ b/recipe/patches/0027-More-unixy-layout-for-windows.patch @@ -0,0 +1,70 @@ +From 11a7d458b4d276f5d06353bc141166c1c6a90df1 Mon Sep 17 00:00:00 2001 +From: Isuru Fernando +Date: Fri, 22 May 2026 14:21:19 -0700 +Subject: [PATCH 27/27] More unixy layout for windows + +--- + Lib/sysconfig/__init__.py | 12 +++++++++++- + Modules/getpath.py | 4 ++-- + PCbuild/pythoncore.vcxproj | 2 +- + 3 files changed, 14 insertions(+), 4 deletions(-) + +diff --git a/Lib/sysconfig/__init__.py b/Lib/sysconfig/__init__.py +index 654a1ef225f..a7b6563004c 100644 +--- a/Lib/sysconfig/__init__.py ++++ b/Lib/sysconfig/__init__.py +@@ -58,6 +58,16 @@ + 'scripts': '{base}/Scripts', + 'data': '{base}', + }, ++ 'nt_conda': { ++ 'stdlib': '{installed_base}/{platlibdir}/{implementation_lower}', ++ 'platstdlib': '{base}/{platlibdir}/{implementation_lower}', ++ 'purelib': '{base}/lib/{implementation_lower}/site-packages', ++ 'platlib': '{base}/{platlibdir}/{implementation_lower}/site-packages', ++ 'include': '{installed_base}/include/{implementation_lower}', ++ 'platinclude': '{installed_platbase}/include/{implementation_lower}', ++ 'scripts': '{base}/Scripts', ++ 'data': '{base}', ++ }, + + # Downstream distributors can overwrite the default install scheme. + # This is done to support downstream modifications where distributors change +@@ -279,7 +289,7 @@ def _expand_vars(scheme, vars): + def _get_preferred_schemes(): + if os.name == 'nt': + return { +- 'prefix': 'nt', ++ 'prefix': 'nt_conda', + 'home': 'posix_home', + 'user': 'nt_user', + } +diff --git a/Modules/getpath.py b/Modules/getpath.py +index 43a47ca77af..0197811f7eb 100644 +--- a/Modules/getpath.py ++++ b/Modules/getpath.py +@@ -193,9 +193,9 @@ + BUILDDIR_TXT = 'pybuilddir.txt' + BUILD_LANDMARK = f'{VPATH}\\Modules\\Setup.local' + DEFAULT_PROGRAM_NAME = f'python' +- STDLIB_SUBDIR = 'Lib' ++ STDLIB_SUBDIR = f'{platlibdir}\\python' + STDLIB_LANDMARKS = [f'{STDLIB_SUBDIR}\\os.py', f'{STDLIB_SUBDIR}\\os.pyc'] +- PLATSTDLIB_LANDMARK = f'{platlibdir}' ++ PLATSTDLIB_LANDMARK = f'{platlibdir}\\python\\lib-dynload' + BUILDSTDLIB_LANDMARKS = ['Lib\\os.py'] + VENV_LANDMARK = 'pyvenv.cfg' + ZIP_LANDMARK = f'python{VERSION_MAJOR}{VERSION_MINOR}{PYDEBUGEXT or ""}.zip' +diff --git a/PCbuild/pythoncore.vcxproj b/PCbuild/pythoncore.vcxproj +index 62b762f8bdc..e5d52458346 100644 +--- a/PCbuild/pythoncore.vcxproj ++++ b/PCbuild/pythoncore.vcxproj +@@ -126,7 +126,7 @@ + VERSION=NULL; + VPATH="$(PyVPath)"; + PYDEBUGEXT="$(PyDebugExt)"; +- PLATLIBDIR="DLLs"; ++ PLATLIBDIR="lib"; + %(PreprocessorDefinitions) + + diff --git a/recipe/patches/make-mixed-crlf-patch.py b/recipe/patches/make-mixed-crlf-patch.py index ccf46fa2..445e01db 100644 --- a/recipe/patches/make-mixed-crlf-patch.py +++ b/recipe/patches/make-mixed-crlf-patch.py @@ -8,6 +8,8 @@ # header lines are given LF line endings and the rest CRLF line endings. # Does not currently deal with the prelude (up to the -- in git patches). +extensions = [".bat", ".vcxproj", ".props", ".sln"] + def main(argv): filename = argv[1] lines = [] @@ -26,17 +28,21 @@ def main(argv): text = "\n".join(lines) - if ".bat" not in text and ".vcxproj" not in text and ".props" not in text: + if all(ext not in text for ext in extensions): + return return with open(filename, 'wb') as fo: for i, line in enumerate(lines): if not in_real_patch: fo.write((line + '\n').encode('utf-8')) - if line.startswith('diff --git'): + if line.startswith('diff --git') and any(ext in line for ext in extensions): in_real_patch = True else: - if line.startswith('diff ') or \ + if line.startswith('diff --git') and not any(ext in line for ext in extensions): + in_real_patch = False + fo.write((line + '\r\n').encode('utf-8')) + elif line.startswith('diff ') or \ line.startswith('diff --git') or \ line.startswith('--- ') or \ line.startswith('+++ ') or \