Skip to content
Open
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
6 changes: 6 additions & 0 deletions .azure-pipelines/azure-pipelines-win.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

43 changes: 43 additions & 0 deletions .ci_support/win_arm64_freethreadingno.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
build_type:
- release
bzip2:
- '1'
c_compiler:
- vs2022
c_stdlib:
- vs
channel_sources:
- conda-forge/label/python_rc,conda-forge
channel_targets:
- conda-forge main
cxx_compiler:
- vs2022
expat:
- '2'
freethreading:
- 'no'
libffi:
- '3.5'
liblzma_devel:
- '5'
libsqlite:
- '3'
openssl:
- '3.5'
pin_run_as_build:
python:
min_pin: x.x
max_pin: x.x
python:
- '3.14'
target_platform:
- win-arm64
tk:
- '8.6'
zip_keys:
- - build_type
- channel_targets
zlib:
- '1'
zstd:
- '1.5'
43 changes: 43 additions & 0 deletions .ci_support/win_arm64_freethreadingyes.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
build_type:
- release
bzip2:
- '1'
c_compiler:
- vs2022
c_stdlib:
- vs
channel_sources:
- conda-forge/label/python_rc,conda-forge
channel_targets:
- conda-forge main
cxx_compiler:
- vs2022
expat:
- '2'
freethreading:
- 'yes'
libffi:
- '3.5'
liblzma_devel:
- '5'
libsqlite:
- '3'
openssl:
- '3.5'
pin_run_as_build:
python:
min_pin: x.x
max_pin: x.x
python:
- '3.14'
target_platform:
- win-arm64
tk:
- '8.6'
zip_keys:
- - build_type
- channel_targets
zlib:
- '1'
zstd:
- '1.5'
19 changes: 19 additions & 0 deletions .scripts/run_osx_build.sh

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 14 additions & 0 deletions README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions conda-forge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ build_platform:
linux_aarch64: linux_64
linux_ppc64le: linux_64
osx_arm64: osx_64
win_arm64: win_64
conda_build:
pkg_format: '2'
conda_forge_output_validation: true
Expand Down
74 changes: 45 additions & 29 deletions recipe/build_base.bat
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,30 @@ setlocal EnableDelayedExpansion
echo on

:: Compile python, extensions and external libraries
if "%ARCH%"=="64" (
set PLATFORM=x64
set VC_PATH=x64
set BUILD_PATH=amd64
) else (
set PLATFORM=Win32
set VC_PATH=x86
set BUILD_PATH=win32
if "%target_platform%"=="win-64" (
set HOST_PLATFORM=x64
set HOST_DIR=amd64
)
if "%target_platform%"=="win-32" (
set HOST_PLATFORM=Win32
set HOST_DIR=win32
)
if "%target_platform%"=="win-arm64" (
set HOST_PLATFORM=ARM64
set HOST_DIR=arm64
)

if "%build_platform%"=="win-64" (
set BUILD_PLATFORM=x64
set BUILD_DIR=amd64
)
if "%build_platform%"=="win-32" (
set BUILD_PLATFORM=Win32
set BUILD_DIR=win32
)
if "%build_platform%"=="win-arm64" (
set BUILD_PLATFORM=ARM64
set BUILD_DIR=arm64
)

for /F "tokens=1,2 delims=." %%i in ("%PKG_VERSION%") do (
Expand Down Expand Up @@ -61,25 +77,25 @@ cd PCbuild

:: Twice because:
:: error : importlib_zipimport.h updated. You will need to rebuild pythoncore to see the changes.
call build.bat %PGO% %CONFIG% %FREETHREADING% -m -e -v -p %PLATFORM%
call build.bat %PGO% %CONFIG% %FREETHREADING% -m -e -v -p %PLATFORM%
call build.bat %PGO% %CONFIG% %FREETHREADING% -m -e -v -p %HOST_PLATFORM%
call build.bat %PGO% %CONFIG% %FREETHREADING% -m -e -v -p %HOST_PLATFORM%
if errorlevel 1 exit 1
cd ..

:: Populate the root package directory
for %%x in (python%VERNODOTS%%THREAD%%_D%.dll python3%THREAD%%_D%.dll python%EXE_T%%_D%.exe pythonw%EXE_T%%_D%.exe) do (
if exist %SRC_DIR%\PCbuild\%BUILD_PATH%\%%x (
copy /Y %SRC_DIR%\PCbuild\%BUILD_PATH%\%%x %PREFIX%
if exist %SRC_DIR%\PCbuild\%HOST_DIR%\%%x (
copy /Y %SRC_DIR%\PCbuild\%HOST_DIR%\%%x %PREFIX%
) else (
echo "WARNING :: %SRC_DIR%\PCbuild\%BUILD_PATH%\%%x does not exist"
echo "WARNING :: %SRC_DIR%\PCbuild\%HOST_DIR%\%%x does not exist"
)
)

for %%x in (python%THREAD%%_D%.pdb python%VERNODOTS%%THREAD%%_D%.pdb pythonw%THREAD%%_D%.pdb) do (
if exist %SRC_DIR%\PCbuild\%BUILD_PATH%\%%x (
copy /Y %SRC_DIR%\PCbuild\%BUILD_PATH%\%%x %PREFIX%
if exist %SRC_DIR%\PCbuild\%HOST_DIR%\%%x (
copy /Y %SRC_DIR%\PCbuild\%HOST_DIR%\%%x %PREFIX%
) else (
echo "WARNING :: %SRC_DIR%\PCbuild\%BUILD_PATH%\%%x does not exist"
echo "WARNING :: %SRC_DIR%\PCbuild\%HOST_DIR%\%%x does not exist"
)
)

Expand All @@ -90,7 +106,7 @@ if errorlevel 1 exit 1

:: Populate the DLLs directory
mkdir %PREFIX%\DLLs
xcopy /s /y %SRC_DIR%\PCBuild\%BUILD_PATH%\*.pyd %PREFIX%\DLLs\
xcopy /s /y %SRC_DIR%\PCBuild\%HOST_DIR%\*.pyd %PREFIX%\DLLs\
if errorlevel 1 exit 1

copy /Y %SRC_DIR%\PC\icons\py.ico %PREFIX%\DLLs\
Expand Down Expand Up @@ -132,12 +148,12 @@ for %%x in (idle pydoc) do (

:: Populate the libs directory
if not exist %PREFIX%\libs mkdir %PREFIX%\libs
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\
dir %SRC_DIR%\PCbuild\%HOST_DIR%\
if exist %SRC_DIR%\PCbuild\%HOST_DIR%\python%VERNODOTS%%THREAD%%_D%.lib copy /Y %SRC_DIR%\PCbuild\%HOST_DIR%\python%VERNODOTS%%THREAD%%_D%.lib %PREFIX%\libs\
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\%HOST_DIR%\python3%THREAD%%_D%.lib copy /Y %SRC_DIR%\PCbuild\%HOST_DIR%\python3%THREAD%%_D%.lib %PREFIX%\libs\
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\%HOST_DIR%\_tkinter%THREAD%%_D%.lib copy /Y %SRC_DIR%\PCbuild\%HOST_DIR%\_tkinter%THREAD%%_D%.lib %PREFIX%\libs\
if errorlevel 1 exit 1


Expand All @@ -148,20 +164,20 @@ 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
if exist %SRC_DIR%\PCbuild\%BUILD_PATH%\venvlauncher%THREAD%%_D%.exe (
if exist %SRC_DIR%\PCbuild\%HOST_DIR%\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\%HOST_DIR%\venvlauncher%THREAD%%_D%.exe %PREFIX%\Lib\venv\scripts\nt\python.exe
copy /Y %SRC_DIR%\PCbuild\%HOST_DIR%\venvlauncher%THREAD%%_D%.exe %PREFIX%\Lib\venv\scripts\nt\venvlauncher%THREAD%%_D%.exe
) else (
echo "WARNING :: %SRC_DIR%\PCbuild\%BUILD_PATH%\venvlauncher%THREAD%%_D%.exe does not exist"
echo "WARNING :: %SRC_DIR%\PCbuild\%HOST_DIR%\venvlauncher%THREAD%%_D%.exe does not exist"
)

if exist %SRC_DIR%\PCbuild\%BUILD_PATH%\venvwlauncher%THREAD%%_D%.exe (
if exist %SRC_DIR%\PCbuild\%HOST_DIR%\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\%HOST_DIR%\venvwlauncher%THREAD%%_D%.exe %PREFIX%\Lib\venv\scripts\nt\pythonw.exe
copy /Y %SRC_DIR%\PCbuild\%HOST_DIR%\venvwlauncher%THREAD%%_D%.exe %PREFIX%\Lib\venv\scripts\nt\venvwlauncher%THREAD%%_D%.exe
) else (
echo "WARNING :: %SRC_DIR%\PCbuild\%BUILD_PATH%\venvwlauncher%THREAD%%_D%.exe does not exist"
echo "WARNING :: %SRC_DIR%\PCbuild\%HOST_DIR%\venvwlauncher%THREAD%%_D%.exe does not exist"
)

:: Remove test data to save space.
Expand Down
Loading