├── .azure-pipelines ├── azure-pipelines-linux.yml ├── azure-pipelines-osx.yml └── azure-pipelines-win.yml ├── .ci_support ├── README ├── linux_64_build_typedebugchannel_targetsconda-forge_python_debugfreethreadingno.yaml ├── linux_64_build_typedebugchannel_targetsconda-forge_python_debugfreethreadingyes.yaml ├── linux_64_build_typereleasechannel_targetsconda-forge_mainfreethreadingno.yaml ├── linux_64_build_typereleasechannel_targetsconda-forge_mainfreethreadingyes.yaml ├── linux_aarch64_build_typedebugchannel_targetsconda-forge_python_debugfreethreadingno.yaml ├── linux_aarch64_build_typedebugchannel_targetsconda-forge_python_debugfreethreadingyes.yaml ├── linux_aarch64_build_typereleasechannel_targetsconda-forge_mainfreethreadingno.yaml ├── linux_aarch64_build_typereleasechannel_targetsconda-forge_mainfreethreadingyes.yaml ├── linux_ppc64le_build_typedebugchannel_targetsconda-forge_python_debugfreethreadingno.yaml ├── linux_ppc64le_build_typedebugchannel_targetsconda-forge_python_debugfreethreadingyes.yaml ├── linux_ppc64le_build_typereleasechannel_targetsconda-forge_mainfreethreadingno.yaml ├── linux_ppc64le_build_typereleasechannel_targetsconda-forge_mainfreethreadingyes.yaml ├── osx_64_build_typedebugchannel_targetsconda-forge_python_debugfreethreadingno.yaml ├── osx_64_build_typedebugchannel_targetsconda-forge_python_debugfreethreadingyes.yaml ├── osx_64_build_typereleasechannel_targetsconda-forge_mainfreethreadingno.yaml ├── osx_64_build_typereleasechannel_targetsconda-forge_mainfreethreadingyes.yaml ├── osx_arm64_build_typedebugchannel_targetsconda-forge_python_debugfreethreadingno.yaml ├── osx_arm64_build_typedebugchannel_targetsconda-forge_python_debugfreethreadingyes.yaml ├── osx_arm64_build_typereleasechannel_targetsconda-forge_mainfreethreadingno.yaml ├── osx_arm64_build_typereleasechannel_targetsconda-forge_mainfreethreadingyes.yaml ├── win_64_freethreadingno.yaml └── win_64_freethreadingyes.yaml ├── .circleci └── config.yml ├── .gitattributes ├── .github └── CODEOWNERS ├── .gitignore ├── .scripts ├── build_steps.sh ├── create_conda_build_artifacts.bat ├── create_conda_build_artifacts.sh ├── logging_utils.sh ├── run_docker_build.sh ├── run_osx_build.sh └── run_win_build.bat ├── LICENSE.txt ├── README.md ├── azure-pipelines.yml ├── build-locally.py ├── conda-forge.yml └── recipe ├── LICENSE.txt ├── build_base.bat ├── build_base.sh ├── build_static.bat ├── build_static.sh ├── conda_build_config.yaml ├── fix_staged_scripts.py ├── install_jit_activation.bat ├── install_jit_activation.sh ├── meta.yaml ├── patches ├── 0001-Win32-Change-FD_SETSIZE-from-512-to-2048.patch ├── 0002-Win32-Do-not-download-externals.patch ├── 0003-Fix-find_library-so-that-it-looks-in-sys.prefix-lib-.patch ├── 0004-Disable-registry-lookup-unless-CONDA_PY_ALLOW_REG_PA.patch ├── 0005-Unvendor-openssl.patch ├── 0006-Unvendor-sqlite3.patch ├── 0007-Add-CondaEcosystemModifyDllSearchPath.patch ├── 0008-Doing-d1trimfile.patch ├── 0009-cross-compile-darwin.patch ├── 0010-Fix-TZPATH-on-windows.patch ├── 0011-Make-dyld-search-work-with-SYSTEM_VERSION_COMPAT-1.patch ├── 0012-Unvendor-bzip2.patch ├── 0013-Unvendor-libffi.patch ├── 0014-Unvendor-tcltk.patch ├── 0015-unvendor-xz.patch ├── 0016-unvendor-zlib.patch ├── 0017-Do-not-pass-g-to-GCC-when-not-Py_DEBUG.patch ├── 0018-Unvendor-expat.patch ├── 0019-Remove-unused-readelf.patch ├── 0020-Don-t-checksharedmods-if-cross-compiling.patch ├── 0021-Override-configure-LIBFFI.patch ├── 0022-Unvendor-libmpdec.patch ├── 0023-Brand-conda-forge.patch ├── 0024-Do-not-define-pid_t-as-it-might-conflict-with-the-ac.patch ├── README.md └── make-mixed-crlf-patch.py ├── recipe-license.txt ├── replace-word-pairs.py ├── run_test.py ├── scripts ├── activate.bat ├── activate.sh ├── deactivate.bat └── deactivate.sh ├── sitecustomize.py ├── tests ├── cmake │ └── CMakeLists.txt ├── distutils.cext │ ├── foo.c │ ├── foo.py │ └── setup.py.do_not_run_me_on_0_releases └── prefix-replacement │ ├── a.c │ └── build-and-test.sh └── yum_requirements.txt /.azure-pipelines/azure-pipelines-linux.yml: -------------------------------------------------------------------------------- 1 | # This file was generated automatically from conda-smithy. To update this configuration, 2 | # update the conda-forge.yml and/or the recipe/meta.yaml. 3 | # -*- mode: yaml -*- 4 | 5 | jobs: 6 | - job: linux 7 | pool: 8 | vmImage: ubuntu-latest 9 | strategy: 10 | matrix: 11 | linux_64_build_typedebugchannel_targetsconda-forge_python_debugfreethreadingno: 12 | CONFIG: linux_64_build_typedebugchannel_targetsconda-forge_python_debugfreethreadingno 13 | UPLOAD_PACKAGES: 'True' 14 | DOCKER_IMAGE: quay.io/condaforge/linux-anvil-x86_64:alma9 15 | SHORT_CONFIG: linux_64_build_typedebugchannel_tar_h10d856d4b5 16 | linux_64_build_typedebugchannel_targetsconda-forge_python_debugfreethreadingyes: 17 | CONFIG: linux_64_build_typedebugchannel_targetsconda-forge_python_debugfreethreadingyes 18 | UPLOAD_PACKAGES: 'True' 19 | DOCKER_IMAGE: quay.io/condaforge/linux-anvil-x86_64:alma9 20 | SHORT_CONFIG: linux_64_build_typedebugchannel_tar_hf83d9e2d40 21 | linux_64_build_typereleasechannel_targetsconda-forge_mainfreethreadingno: 22 | CONFIG: linux_64_build_typereleasechannel_targetsconda-forge_mainfreethreadingno 23 | UPLOAD_PACKAGES: 'True' 24 | DOCKER_IMAGE: quay.io/condaforge/linux-anvil-x86_64:alma9 25 | SHORT_CONFIG: linux_64_build_typereleasechannel_t_h01f3c15664 26 | linux_64_build_typereleasechannel_targetsconda-forge_mainfreethreadingyes: 27 | CONFIG: linux_64_build_typereleasechannel_targetsconda-forge_mainfreethreadingyes 28 | UPLOAD_PACKAGES: 'True' 29 | DOCKER_IMAGE: quay.io/condaforge/linux-anvil-x86_64:alma9 30 | SHORT_CONFIG: linux_64_build_typereleasechannel_t_hf5ff4d161a 31 | linux_aarch64_build_typedebugchannel_targetsconda-forge_python_debugfreethreadingno: 32 | CONFIG: linux_aarch64_build_typedebugchannel_targetsconda-forge_python_debugfreethreadingno 33 | UPLOAD_PACKAGES: 'True' 34 | DOCKER_IMAGE: quay.io/condaforge/linux-anvil-x86_64:alma9 35 | SHORT_CONFIG: linux_aarch64_build_typedebugchanne_hd2db0a21ac 36 | linux_aarch64_build_typedebugchannel_targetsconda-forge_python_debugfreethreadingyes: 37 | CONFIG: linux_aarch64_build_typedebugchannel_targetsconda-forge_python_debugfreethreadingyes 38 | UPLOAD_PACKAGES: 'True' 39 | DOCKER_IMAGE: quay.io/condaforge/linux-anvil-x86_64:alma9 40 | SHORT_CONFIG: linux_aarch64_build_typedebugchanne_h51de969340 41 | linux_aarch64_build_typereleasechannel_targetsconda-forge_mainfreethreadingno: 42 | CONFIG: linux_aarch64_build_typereleasechannel_targetsconda-forge_mainfreethreadingno 43 | UPLOAD_PACKAGES: 'True' 44 | DOCKER_IMAGE: quay.io/condaforge/linux-anvil-x86_64:alma9 45 | SHORT_CONFIG: linux_aarch64_build_typereleasechan_hccc48f4a35 46 | linux_aarch64_build_typereleasechannel_targetsconda-forge_mainfreethreadingyes: 47 | CONFIG: linux_aarch64_build_typereleasechannel_targetsconda-forge_mainfreethreadingyes 48 | UPLOAD_PACKAGES: 'True' 49 | DOCKER_IMAGE: quay.io/condaforge/linux-anvil-x86_64:alma9 50 | SHORT_CONFIG: linux_aarch64_build_typereleasechan_h78d2c7f561 51 | linux_ppc64le_build_typedebugchannel_targetsconda-forge_python_debugfreethreadingno: 52 | CONFIG: linux_ppc64le_build_typedebugchannel_targetsconda-forge_python_debugfreethreadingno 53 | UPLOAD_PACKAGES: 'True' 54 | DOCKER_IMAGE: quay.io/condaforge/linux-anvil-x86_64:alma9 55 | SHORT_CONFIG: linux_ppc64le_build_typedebugchanne_hac8bb296cb 56 | linux_ppc64le_build_typedebugchannel_targetsconda-forge_python_debugfreethreadingyes: 57 | CONFIG: linux_ppc64le_build_typedebugchannel_targetsconda-forge_python_debugfreethreadingyes 58 | UPLOAD_PACKAGES: 'True' 59 | DOCKER_IMAGE: quay.io/condaforge/linux-anvil-x86_64:alma9 60 | SHORT_CONFIG: linux_ppc64le_build_typedebugchanne_hb74ed675c1 61 | linux_ppc64le_build_typereleasechannel_targetsconda-forge_mainfreethreadingno: 62 | CONFIG: linux_ppc64le_build_typereleasechannel_targetsconda-forge_mainfreethreadingno 63 | UPLOAD_PACKAGES: 'True' 64 | DOCKER_IMAGE: quay.io/condaforge/linux-anvil-x86_64:alma9 65 | SHORT_CONFIG: linux_ppc64le_build_typereleasechan_h5454d1d581 66 | linux_ppc64le_build_typereleasechannel_targetsconda-forge_mainfreethreadingyes: 67 | CONFIG: linux_ppc64le_build_typereleasechannel_targetsconda-forge_mainfreethreadingyes 68 | UPLOAD_PACKAGES: 'True' 69 | DOCKER_IMAGE: quay.io/condaforge/linux-anvil-x86_64:alma9 70 | SHORT_CONFIG: linux_ppc64le_build_typereleasechan_hed84b2c374 71 | timeoutInMinutes: 360 72 | variables: {} 73 | 74 | steps: 75 | # configure qemu binfmt-misc running. This allows us to run docker containers 76 | # embedded qemu-static 77 | - script: | 78 | docker run --rm --privileged multiarch/qemu-user-static:register --reset --credential yes 79 | ls /proc/sys/fs/binfmt_misc/ 80 | condition: not(startsWith(variables['CONFIG'], 'linux_64')) 81 | displayName: Configure binfmt_misc 82 | 83 | - script: | 84 | export CI=azure 85 | export flow_run_id=azure_$(Build.BuildNumber).$(System.JobAttempt) 86 | export remote_url=$(Build.Repository.Uri) 87 | export sha=$(Build.SourceVersion) 88 | export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME 89 | export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) 90 | if [[ "${BUILD_REASON:-}" == "PullRequest" ]]; then 91 | export IS_PR_BUILD="True" 92 | else 93 | export IS_PR_BUILD="False" 94 | fi 95 | .scripts/run_docker_build.sh 96 | displayName: Run docker build 97 | env: 98 | BINSTAR_TOKEN: $(BINSTAR_TOKEN) 99 | FEEDSTOCK_TOKEN: $(FEEDSTOCK_TOKEN) 100 | STAGING_BINSTAR_TOKEN: $(STAGING_BINSTAR_TOKEN) 101 | - script: | 102 | export CI=azure 103 | export CI_RUN_ID=$(build.BuildNumber).$(system.JobAttempt) 104 | export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) 105 | export CONDA_BLD_DIR=build_artifacts 106 | export ARTIFACT_STAGING_DIR="$(Build.ArtifactStagingDirectory)" 107 | # Archive everything in CONDA_BLD_DIR except environments 108 | export BLD_ARTIFACT_PREFIX=conda_artifacts 109 | if [[ "$AGENT_JOBSTATUS" == "Failed" ]]; then 110 | # Archive the CONDA_BLD_DIR environments only when the job fails 111 | export ENV_ARTIFACT_PREFIX=conda_envs 112 | fi 113 | ./.scripts/create_conda_build_artifacts.sh 114 | displayName: Prepare conda build artifacts 115 | condition: succeededOrFailed() 116 | 117 | - task: PublishPipelineArtifact@1 118 | displayName: Store conda build artifacts 119 | condition: not(eq(variables.BLD_ARTIFACT_PATH, '')) 120 | inputs: 121 | targetPath: $(BLD_ARTIFACT_PATH) 122 | artifactName: $(BLD_ARTIFACT_NAME) 123 | 124 | - task: PublishPipelineArtifact@1 125 | displayName: Store conda build environment artifacts 126 | condition: not(eq(variables.ENV_ARTIFACT_PATH, '')) 127 | inputs: 128 | targetPath: $(ENV_ARTIFACT_PATH) 129 | artifactName: $(ENV_ARTIFACT_NAME) -------------------------------------------------------------------------------- /.azure-pipelines/azure-pipelines-osx.yml: -------------------------------------------------------------------------------- 1 | # This file was generated automatically from conda-smithy. To update this configuration, 2 | # update the conda-forge.yml and/or the recipe/meta.yaml. 3 | # -*- mode: yaml -*- 4 | 5 | jobs: 6 | - job: osx 7 | pool: 8 | vmImage: macOS-13 9 | strategy: 10 | matrix: 11 | osx_64_build_typedebugchannel_targetsconda-forge_python_debugfreethreadingno: 12 | CONFIG: osx_64_build_typedebugchannel_targetsconda-forge_python_debugfreethreadingno 13 | UPLOAD_PACKAGES: 'True' 14 | SHORT_CONFIG: osx_64_build_typedebugchannel_targe_h5e47894640 15 | osx_64_build_typedebugchannel_targetsconda-forge_python_debugfreethreadingyes: 16 | CONFIG: osx_64_build_typedebugchannel_targetsconda-forge_python_debugfreethreadingyes 17 | UPLOAD_PACKAGES: 'True' 18 | SHORT_CONFIG: osx_64_build_typedebugchannel_targe_h116d33564c 19 | osx_64_build_typereleasechannel_targetsconda-forge_mainfreethreadingno: 20 | CONFIG: osx_64_build_typereleasechannel_targetsconda-forge_mainfreethreadingno 21 | UPLOAD_PACKAGES: 'True' 22 | SHORT_CONFIG: osx_64_build_typereleasechannel_tar_h425d4db04a 23 | osx_64_build_typereleasechannel_targetsconda-forge_mainfreethreadingyes: 24 | CONFIG: osx_64_build_typereleasechannel_targetsconda-forge_mainfreethreadingyes 25 | UPLOAD_PACKAGES: 'True' 26 | SHORT_CONFIG: osx_64_build_typereleasechannel_tar_haa8f77b834 27 | osx_arm64_build_typedebugchannel_targetsconda-forge_python_debugfreethreadingno: 28 | CONFIG: osx_arm64_build_typedebugchannel_targetsconda-forge_python_debugfreethreadingno 29 | UPLOAD_PACKAGES: 'True' 30 | SHORT_CONFIG: osx_arm64_build_typedebugchannel_ta_h4a1f0d054b 31 | osx_arm64_build_typedebugchannel_targetsconda-forge_python_debugfreethreadingyes: 32 | CONFIG: osx_arm64_build_typedebugchannel_targetsconda-forge_python_debugfreethreadingyes 33 | UPLOAD_PACKAGES: 'True' 34 | SHORT_CONFIG: osx_arm64_build_typedebugchannel_ta_h49dbe0c1f7 35 | osx_arm64_build_typereleasechannel_targetsconda-forge_mainfreethreadingno: 36 | CONFIG: osx_arm64_build_typereleasechannel_targetsconda-forge_mainfreethreadingno 37 | UPLOAD_PACKAGES: 'True' 38 | SHORT_CONFIG: osx_arm64_build_typereleasechannel__h0d9a29af97 39 | osx_arm64_build_typereleasechannel_targetsconda-forge_mainfreethreadingyes: 40 | CONFIG: osx_arm64_build_typereleasechannel_targetsconda-forge_mainfreethreadingyes 41 | UPLOAD_PACKAGES: 'True' 42 | SHORT_CONFIG: osx_arm64_build_typereleasechannel__h92a1d5a633 43 | timeoutInMinutes: 360 44 | variables: {} 45 | 46 | steps: 47 | # TODO: Fast finish on azure pipelines? 48 | - script: | 49 | export CI=azure 50 | export flow_run_id=azure_$(Build.BuildNumber).$(System.JobAttempt) 51 | export remote_url=$(Build.Repository.Uri) 52 | export sha=$(Build.SourceVersion) 53 | export OSX_FORCE_SDK_DOWNLOAD="1" 54 | export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME 55 | export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) 56 | if [[ "${BUILD_REASON:-}" == "PullRequest" ]]; then 57 | export IS_PR_BUILD="True" 58 | else 59 | export IS_PR_BUILD="False" 60 | fi 61 | ./.scripts/run_osx_build.sh 62 | displayName: Run OSX build 63 | env: 64 | BINSTAR_TOKEN: $(BINSTAR_TOKEN) 65 | FEEDSTOCK_TOKEN: $(FEEDSTOCK_TOKEN) 66 | STAGING_BINSTAR_TOKEN: $(STAGING_BINSTAR_TOKEN) 67 | - script: | 68 | export CI=azure 69 | export CI_RUN_ID=$(build.BuildNumber).$(system.JobAttempt) 70 | export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) 71 | export CONDA_BLD_DIR=/Users/runner/miniforge3/conda-bld 72 | export ARTIFACT_STAGING_DIR="$(Build.ArtifactStagingDirectory)" 73 | # Archive everything in CONDA_BLD_DIR except environments 74 | export BLD_ARTIFACT_PREFIX=conda_artifacts 75 | if [[ "$AGENT_JOBSTATUS" == "Failed" ]]; then 76 | # Archive the CONDA_BLD_DIR environments only when the job fails 77 | export ENV_ARTIFACT_PREFIX=conda_envs 78 | fi 79 | ./.scripts/create_conda_build_artifacts.sh 80 | displayName: Prepare conda build artifacts 81 | condition: succeededOrFailed() 82 | 83 | - task: PublishPipelineArtifact@1 84 | displayName: Store conda build artifacts 85 | condition: not(eq(variables.BLD_ARTIFACT_PATH, '')) 86 | inputs: 87 | targetPath: $(BLD_ARTIFACT_PATH) 88 | artifactName: $(BLD_ARTIFACT_NAME) 89 | 90 | - task: PublishPipelineArtifact@1 91 | displayName: Store conda build environment artifacts 92 | condition: not(eq(variables.ENV_ARTIFACT_PATH, '')) 93 | inputs: 94 | targetPath: $(ENV_ARTIFACT_PATH) 95 | artifactName: $(ENV_ARTIFACT_NAME) -------------------------------------------------------------------------------- /.azure-pipelines/azure-pipelines-win.yml: -------------------------------------------------------------------------------- 1 | # This file was generated automatically from conda-smithy. To update this configuration, 2 | # update the conda-forge.yml and/or the recipe/meta.yaml. 3 | # -*- mode: yaml -*- 4 | 5 | jobs: 6 | - job: win 7 | pool: 8 | vmImage: windows-2022 9 | strategy: 10 | matrix: 11 | win_64_freethreadingno: 12 | CONFIG: win_64_freethreadingno 13 | UPLOAD_PACKAGES: 'True' 14 | SHORT_CONFIG: win_64_freethreadingno 15 | win_64_freethreadingyes: 16 | CONFIG: win_64_freethreadingyes 17 | UPLOAD_PACKAGES: 'True' 18 | SHORT_CONFIG: win_64_freethreadingyes 19 | timeoutInMinutes: 360 20 | variables: 21 | CONDA_BLD_PATH: D:\\bld\\ 22 | MINIFORGE_HOME: D:\Miniforge 23 | UPLOAD_TEMP: D:\\tmp 24 | 25 | steps: 26 | 27 | - script: | 28 | call ".scripts\run_win_build.bat" 29 | displayName: Run Windows build 30 | env: 31 | MINIFORGE_HOME: $(MINIFORGE_HOME) 32 | CONDA_BLD_PATH: $(CONDA_BLD_PATH) 33 | PYTHONUNBUFFERED: 1 34 | CONFIG: $(CONFIG) 35 | CI: azure 36 | flow_run_id: azure_$(Build.BuildNumber).$(System.JobAttempt) 37 | remote_url: $(Build.Repository.Uri) 38 | sha: $(Build.SourceVersion) 39 | UPLOAD_PACKAGES: $(UPLOAD_PACKAGES) 40 | UPLOAD_TEMP: $(UPLOAD_TEMP) 41 | BINSTAR_TOKEN: $(BINSTAR_TOKEN) 42 | FEEDSTOCK_TOKEN: $(FEEDSTOCK_TOKEN) 43 | STAGING_BINSTAR_TOKEN: $(STAGING_BINSTAR_TOKEN) 44 | - script: | 45 | set MINIFORGE_HOME=$(MINIFORGE_HOME) 46 | set CI=azure 47 | set CI_RUN_ID=$(build.BuildNumber).$(system.JobAttempt) 48 | set FEEDSTOCK_NAME=$(build.Repository.Name) 49 | set ARTIFACT_STAGING_DIR=$(Build.ArtifactStagingDirectory) 50 | set CONDA_BLD_DIR=$(CONDA_BLD_PATH) 51 | set BLD_ARTIFACT_PREFIX=conda_artifacts 52 | if "%AGENT_JOBSTATUS%" == "Failed" ( 53 | set ENV_ARTIFACT_PREFIX=conda_envs 54 | ) 55 | call ".scripts\create_conda_build_artifacts.bat" 56 | displayName: Prepare conda build artifacts 57 | condition: succeededOrFailed() 58 | 59 | - task: PublishPipelineArtifact@1 60 | displayName: Store conda build artifacts 61 | condition: not(eq(variables.BLD_ARTIFACT_PATH, '')) 62 | inputs: 63 | targetPath: $(BLD_ARTIFACT_PATH) 64 | artifactName: $(BLD_ARTIFACT_NAME) 65 | 66 | - task: PublishPipelineArtifact@1 67 | displayName: Store conda build environment artifacts 68 | condition: not(eq(variables.ENV_ARTIFACT_PATH, '')) 69 | inputs: 70 | targetPath: $(ENV_ARTIFACT_PATH) 71 | artifactName: $(ENV_ARTIFACT_NAME) -------------------------------------------------------------------------------- /.ci_support/README: -------------------------------------------------------------------------------- 1 | This file is automatically generated by conda-smithy. If any 2 | particular build configuration is expected, but it is not found, 3 | please make sure all dependencies are satisfiable. To add/modify any 4 | matrix elements, you should create/change conda-smithy's input 5 | recipe/conda_build_config.yaml and re-render the recipe, rather than 6 | editing these files directly. 7 | -------------------------------------------------------------------------------- /.ci_support/linux_64_build_typedebugchannel_targetsconda-forge_python_debugfreethreadingno.yaml: -------------------------------------------------------------------------------- 1 | build_type: 2 | - debug 3 | bzip2: 4 | - '1' 5 | c_compiler: 6 | - gcc 7 | c_compiler_version: 8 | - '13' 9 | c_stdlib: 10 | - sysroot 11 | c_stdlib_version: 12 | - '2.17' 13 | cdt_name: 14 | - conda 15 | channel_sources: 16 | - conda-forge/label/python_rc,conda-forge 17 | channel_targets: 18 | - conda-forge python_debug 19 | cxx_compiler: 20 | - gxx 21 | cxx_compiler_version: 22 | - '13' 23 | docker_image: 24 | - quay.io/condaforge/linux-anvil-x86_64:alma9 25 | expat: 26 | - '2' 27 | freethreading: 28 | - 'no' 29 | libffi: 30 | - '3.4' 31 | liblzma_devel: 32 | - '5' 33 | libuuid: 34 | - '2' 35 | ncurses: 36 | - '6' 37 | openssl: 38 | - '3' 39 | pin_run_as_build: 40 | python: 41 | min_pin: x.x 42 | max_pin: x.x 43 | python: 44 | - '3.13' 45 | readline: 46 | - '8' 47 | sqlite: 48 | - '3' 49 | target_platform: 50 | - linux-64 51 | tk: 52 | - '8.6' 53 | zip_keys: 54 | - - build_type 55 | - channel_targets 56 | - - c_compiler_version 57 | - cxx_compiler_version 58 | zlib: 59 | - '1' 60 | -------------------------------------------------------------------------------- /.ci_support/linux_64_build_typedebugchannel_targetsconda-forge_python_debugfreethreadingyes.yaml: -------------------------------------------------------------------------------- 1 | build_type: 2 | - debug 3 | bzip2: 4 | - '1' 5 | c_compiler: 6 | - gcc 7 | c_compiler_version: 8 | - '13' 9 | c_stdlib: 10 | - sysroot 11 | c_stdlib_version: 12 | - '2.17' 13 | cdt_name: 14 | - conda 15 | channel_sources: 16 | - conda-forge/label/python_rc,conda-forge 17 | channel_targets: 18 | - conda-forge python_debug 19 | cxx_compiler: 20 | - gxx 21 | cxx_compiler_version: 22 | - '13' 23 | docker_image: 24 | - quay.io/condaforge/linux-anvil-x86_64:alma9 25 | expat: 26 | - '2' 27 | freethreading: 28 | - 'yes' 29 | libffi: 30 | - '3.4' 31 | liblzma_devel: 32 | - '5' 33 | libuuid: 34 | - '2' 35 | ncurses: 36 | - '6' 37 | openssl: 38 | - '3' 39 | pin_run_as_build: 40 | python: 41 | min_pin: x.x 42 | max_pin: x.x 43 | python: 44 | - '3.13' 45 | readline: 46 | - '8' 47 | sqlite: 48 | - '3' 49 | target_platform: 50 | - linux-64 51 | tk: 52 | - '8.6' 53 | zip_keys: 54 | - - build_type 55 | - channel_targets 56 | - - c_compiler_version 57 | - cxx_compiler_version 58 | zlib: 59 | - '1' 60 | -------------------------------------------------------------------------------- /.ci_support/linux_64_build_typereleasechannel_targetsconda-forge_mainfreethreadingno.yaml: -------------------------------------------------------------------------------- 1 | build_type: 2 | - release 3 | bzip2: 4 | - '1' 5 | c_compiler: 6 | - gcc 7 | c_compiler_version: 8 | - '13' 9 | c_stdlib: 10 | - sysroot 11 | c_stdlib_version: 12 | - '2.17' 13 | cdt_name: 14 | - conda 15 | channel_sources: 16 | - conda-forge/label/python_rc,conda-forge 17 | channel_targets: 18 | - conda-forge main 19 | cxx_compiler: 20 | - gxx 21 | cxx_compiler_version: 22 | - '13' 23 | docker_image: 24 | - quay.io/condaforge/linux-anvil-x86_64:alma9 25 | expat: 26 | - '2' 27 | freethreading: 28 | - 'no' 29 | libffi: 30 | - '3.4' 31 | liblzma_devel: 32 | - '5' 33 | libuuid: 34 | - '2' 35 | ncurses: 36 | - '6' 37 | openssl: 38 | - '3' 39 | pin_run_as_build: 40 | python: 41 | min_pin: x.x 42 | max_pin: x.x 43 | python: 44 | - '3.13' 45 | readline: 46 | - '8' 47 | sqlite: 48 | - '3' 49 | target_platform: 50 | - linux-64 51 | tk: 52 | - '8.6' 53 | zip_keys: 54 | - - build_type 55 | - channel_targets 56 | - - c_compiler_version 57 | - cxx_compiler_version 58 | zlib: 59 | - '1' 60 | -------------------------------------------------------------------------------- /.ci_support/linux_64_build_typereleasechannel_targetsconda-forge_mainfreethreadingyes.yaml: -------------------------------------------------------------------------------- 1 | build_type: 2 | - release 3 | bzip2: 4 | - '1' 5 | c_compiler: 6 | - gcc 7 | c_compiler_version: 8 | - '13' 9 | c_stdlib: 10 | - sysroot 11 | c_stdlib_version: 12 | - '2.17' 13 | cdt_name: 14 | - conda 15 | channel_sources: 16 | - conda-forge/label/python_rc,conda-forge 17 | channel_targets: 18 | - conda-forge main 19 | cxx_compiler: 20 | - gxx 21 | cxx_compiler_version: 22 | - '13' 23 | docker_image: 24 | - quay.io/condaforge/linux-anvil-x86_64:alma9 25 | expat: 26 | - '2' 27 | freethreading: 28 | - 'yes' 29 | libffi: 30 | - '3.4' 31 | liblzma_devel: 32 | - '5' 33 | libuuid: 34 | - '2' 35 | ncurses: 36 | - '6' 37 | openssl: 38 | - '3' 39 | pin_run_as_build: 40 | python: 41 | min_pin: x.x 42 | max_pin: x.x 43 | python: 44 | - '3.13' 45 | readline: 46 | - '8' 47 | sqlite: 48 | - '3' 49 | target_platform: 50 | - linux-64 51 | tk: 52 | - '8.6' 53 | zip_keys: 54 | - - build_type 55 | - channel_targets 56 | - - c_compiler_version 57 | - cxx_compiler_version 58 | zlib: 59 | - '1' 60 | -------------------------------------------------------------------------------- /.ci_support/linux_aarch64_build_typedebugchannel_targetsconda-forge_python_debugfreethreadingno.yaml: -------------------------------------------------------------------------------- 1 | build_type: 2 | - debug 3 | bzip2: 4 | - '1' 5 | c_compiler: 6 | - gcc 7 | c_compiler_version: 8 | - '13' 9 | c_stdlib: 10 | - sysroot 11 | c_stdlib_version: 12 | - '2.17' 13 | cdt_name: 14 | - conda 15 | channel_sources: 16 | - conda-forge/label/python_rc,conda-forge 17 | channel_targets: 18 | - conda-forge python_debug 19 | cxx_compiler: 20 | - gxx 21 | cxx_compiler_version: 22 | - '13' 23 | docker_image: 24 | - quay.io/condaforge/linux-anvil-x86_64:alma9 25 | expat: 26 | - '2' 27 | freethreading: 28 | - 'no' 29 | libffi: 30 | - '3.4' 31 | liblzma_devel: 32 | - '5' 33 | libuuid: 34 | - '2' 35 | ncurses: 36 | - '6' 37 | openssl: 38 | - '3' 39 | pin_run_as_build: 40 | python: 41 | min_pin: x.x 42 | max_pin: x.x 43 | python: 44 | - '3.13' 45 | readline: 46 | - '8' 47 | sqlite: 48 | - '3' 49 | target_platform: 50 | - linux-aarch64 51 | tk: 52 | - '8.6' 53 | zip_keys: 54 | - - build_type 55 | - channel_targets 56 | - - c_compiler_version 57 | - cxx_compiler_version 58 | zlib: 59 | - '1' 60 | -------------------------------------------------------------------------------- /.ci_support/linux_aarch64_build_typedebugchannel_targetsconda-forge_python_debugfreethreadingyes.yaml: -------------------------------------------------------------------------------- 1 | build_type: 2 | - debug 3 | bzip2: 4 | - '1' 5 | c_compiler: 6 | - gcc 7 | c_compiler_version: 8 | - '13' 9 | c_stdlib: 10 | - sysroot 11 | c_stdlib_version: 12 | - '2.17' 13 | cdt_name: 14 | - conda 15 | channel_sources: 16 | - conda-forge/label/python_rc,conda-forge 17 | channel_targets: 18 | - conda-forge python_debug 19 | cxx_compiler: 20 | - gxx 21 | cxx_compiler_version: 22 | - '13' 23 | docker_image: 24 | - quay.io/condaforge/linux-anvil-x86_64:alma9 25 | expat: 26 | - '2' 27 | freethreading: 28 | - 'yes' 29 | libffi: 30 | - '3.4' 31 | liblzma_devel: 32 | - '5' 33 | libuuid: 34 | - '2' 35 | ncurses: 36 | - '6' 37 | openssl: 38 | - '3' 39 | pin_run_as_build: 40 | python: 41 | min_pin: x.x 42 | max_pin: x.x 43 | python: 44 | - '3.13' 45 | readline: 46 | - '8' 47 | sqlite: 48 | - '3' 49 | target_platform: 50 | - linux-aarch64 51 | tk: 52 | - '8.6' 53 | zip_keys: 54 | - - build_type 55 | - channel_targets 56 | - - c_compiler_version 57 | - cxx_compiler_version 58 | zlib: 59 | - '1' 60 | -------------------------------------------------------------------------------- /.ci_support/linux_aarch64_build_typereleasechannel_targetsconda-forge_mainfreethreadingno.yaml: -------------------------------------------------------------------------------- 1 | build_type: 2 | - release 3 | bzip2: 4 | - '1' 5 | c_compiler: 6 | - gcc 7 | c_compiler_version: 8 | - '13' 9 | c_stdlib: 10 | - sysroot 11 | c_stdlib_version: 12 | - '2.17' 13 | cdt_name: 14 | - conda 15 | channel_sources: 16 | - conda-forge/label/python_rc,conda-forge 17 | channel_targets: 18 | - conda-forge main 19 | cxx_compiler: 20 | - gxx 21 | cxx_compiler_version: 22 | - '13' 23 | docker_image: 24 | - quay.io/condaforge/linux-anvil-x86_64:alma9 25 | expat: 26 | - '2' 27 | freethreading: 28 | - 'no' 29 | libffi: 30 | - '3.4' 31 | liblzma_devel: 32 | - '5' 33 | libuuid: 34 | - '2' 35 | ncurses: 36 | - '6' 37 | openssl: 38 | - '3' 39 | pin_run_as_build: 40 | python: 41 | min_pin: x.x 42 | max_pin: x.x 43 | python: 44 | - '3.13' 45 | readline: 46 | - '8' 47 | sqlite: 48 | - '3' 49 | target_platform: 50 | - linux-aarch64 51 | tk: 52 | - '8.6' 53 | zip_keys: 54 | - - build_type 55 | - channel_targets 56 | - - c_compiler_version 57 | - cxx_compiler_version 58 | zlib: 59 | - '1' 60 | -------------------------------------------------------------------------------- /.ci_support/linux_aarch64_build_typereleasechannel_targetsconda-forge_mainfreethreadingyes.yaml: -------------------------------------------------------------------------------- 1 | build_type: 2 | - release 3 | bzip2: 4 | - '1' 5 | c_compiler: 6 | - gcc 7 | c_compiler_version: 8 | - '13' 9 | c_stdlib: 10 | - sysroot 11 | c_stdlib_version: 12 | - '2.17' 13 | cdt_name: 14 | - conda 15 | channel_sources: 16 | - conda-forge/label/python_rc,conda-forge 17 | channel_targets: 18 | - conda-forge main 19 | cxx_compiler: 20 | - gxx 21 | cxx_compiler_version: 22 | - '13' 23 | docker_image: 24 | - quay.io/condaforge/linux-anvil-x86_64:alma9 25 | expat: 26 | - '2' 27 | freethreading: 28 | - 'yes' 29 | libffi: 30 | - '3.4' 31 | liblzma_devel: 32 | - '5' 33 | libuuid: 34 | - '2' 35 | ncurses: 36 | - '6' 37 | openssl: 38 | - '3' 39 | pin_run_as_build: 40 | python: 41 | min_pin: x.x 42 | max_pin: x.x 43 | python: 44 | - '3.13' 45 | readline: 46 | - '8' 47 | sqlite: 48 | - '3' 49 | target_platform: 50 | - linux-aarch64 51 | tk: 52 | - '8.6' 53 | zip_keys: 54 | - - build_type 55 | - channel_targets 56 | - - c_compiler_version 57 | - cxx_compiler_version 58 | zlib: 59 | - '1' 60 | -------------------------------------------------------------------------------- /.ci_support/linux_ppc64le_build_typedebugchannel_targetsconda-forge_python_debugfreethreadingno.yaml: -------------------------------------------------------------------------------- 1 | build_type: 2 | - debug 3 | bzip2: 4 | - '1' 5 | c_compiler: 6 | - gcc 7 | c_compiler_version: 8 | - '13' 9 | c_stdlib: 10 | - sysroot 11 | c_stdlib_version: 12 | - '2.17' 13 | cdt_name: 14 | - conda 15 | channel_sources: 16 | - conda-forge/label/python_rc,conda-forge 17 | channel_targets: 18 | - conda-forge python_debug 19 | cxx_compiler: 20 | - gxx 21 | cxx_compiler_version: 22 | - '13' 23 | docker_image: 24 | - quay.io/condaforge/linux-anvil-x86_64:alma9 25 | expat: 26 | - '2' 27 | freethreading: 28 | - 'no' 29 | libffi: 30 | - '3.4' 31 | liblzma_devel: 32 | - '5' 33 | libuuid: 34 | - '2' 35 | ncurses: 36 | - '6' 37 | openssl: 38 | - '3' 39 | pin_run_as_build: 40 | python: 41 | min_pin: x.x 42 | max_pin: x.x 43 | python: 44 | - '3.13' 45 | readline: 46 | - '8' 47 | sqlite: 48 | - '3' 49 | target_platform: 50 | - linux-ppc64le 51 | zip_keys: 52 | - - build_type 53 | - channel_targets 54 | - - c_compiler_version 55 | - cxx_compiler_version 56 | zlib: 57 | - '1' 58 | -------------------------------------------------------------------------------- /.ci_support/linux_ppc64le_build_typedebugchannel_targetsconda-forge_python_debugfreethreadingyes.yaml: -------------------------------------------------------------------------------- 1 | build_type: 2 | - debug 3 | bzip2: 4 | - '1' 5 | c_compiler: 6 | - gcc 7 | c_compiler_version: 8 | - '13' 9 | c_stdlib: 10 | - sysroot 11 | c_stdlib_version: 12 | - '2.17' 13 | cdt_name: 14 | - conda 15 | channel_sources: 16 | - conda-forge/label/python_rc,conda-forge 17 | channel_targets: 18 | - conda-forge python_debug 19 | cxx_compiler: 20 | - gxx 21 | cxx_compiler_version: 22 | - '13' 23 | docker_image: 24 | - quay.io/condaforge/linux-anvil-x86_64:alma9 25 | expat: 26 | - '2' 27 | freethreading: 28 | - 'yes' 29 | libffi: 30 | - '3.4' 31 | liblzma_devel: 32 | - '5' 33 | libuuid: 34 | - '2' 35 | ncurses: 36 | - '6' 37 | openssl: 38 | - '3' 39 | pin_run_as_build: 40 | python: 41 | min_pin: x.x 42 | max_pin: x.x 43 | python: 44 | - '3.13' 45 | readline: 46 | - '8' 47 | sqlite: 48 | - '3' 49 | target_platform: 50 | - linux-ppc64le 51 | zip_keys: 52 | - - build_type 53 | - channel_targets 54 | - - c_compiler_version 55 | - cxx_compiler_version 56 | zlib: 57 | - '1' 58 | -------------------------------------------------------------------------------- /.ci_support/linux_ppc64le_build_typereleasechannel_targetsconda-forge_mainfreethreadingno.yaml: -------------------------------------------------------------------------------- 1 | build_type: 2 | - release 3 | bzip2: 4 | - '1' 5 | c_compiler: 6 | - gcc 7 | c_compiler_version: 8 | - '13' 9 | c_stdlib: 10 | - sysroot 11 | c_stdlib_version: 12 | - '2.17' 13 | cdt_name: 14 | - conda 15 | channel_sources: 16 | - conda-forge/label/python_rc,conda-forge 17 | channel_targets: 18 | - conda-forge main 19 | cxx_compiler: 20 | - gxx 21 | cxx_compiler_version: 22 | - '13' 23 | docker_image: 24 | - quay.io/condaforge/linux-anvil-x86_64:alma9 25 | expat: 26 | - '2' 27 | freethreading: 28 | - 'no' 29 | libffi: 30 | - '3.4' 31 | liblzma_devel: 32 | - '5' 33 | libuuid: 34 | - '2' 35 | ncurses: 36 | - '6' 37 | openssl: 38 | - '3' 39 | pin_run_as_build: 40 | python: 41 | min_pin: x.x 42 | max_pin: x.x 43 | python: 44 | - '3.13' 45 | readline: 46 | - '8' 47 | sqlite: 48 | - '3' 49 | target_platform: 50 | - linux-ppc64le 51 | zip_keys: 52 | - - build_type 53 | - channel_targets 54 | - - c_compiler_version 55 | - cxx_compiler_version 56 | zlib: 57 | - '1' 58 | -------------------------------------------------------------------------------- /.ci_support/linux_ppc64le_build_typereleasechannel_targetsconda-forge_mainfreethreadingyes.yaml: -------------------------------------------------------------------------------- 1 | build_type: 2 | - release 3 | bzip2: 4 | - '1' 5 | c_compiler: 6 | - gcc 7 | c_compiler_version: 8 | - '13' 9 | c_stdlib: 10 | - sysroot 11 | c_stdlib_version: 12 | - '2.17' 13 | cdt_name: 14 | - conda 15 | channel_sources: 16 | - conda-forge/label/python_rc,conda-forge 17 | channel_targets: 18 | - conda-forge main 19 | cxx_compiler: 20 | - gxx 21 | cxx_compiler_version: 22 | - '13' 23 | docker_image: 24 | - quay.io/condaforge/linux-anvil-x86_64:alma9 25 | expat: 26 | - '2' 27 | freethreading: 28 | - 'yes' 29 | libffi: 30 | - '3.4' 31 | liblzma_devel: 32 | - '5' 33 | libuuid: 34 | - '2' 35 | ncurses: 36 | - '6' 37 | openssl: 38 | - '3' 39 | pin_run_as_build: 40 | python: 41 | min_pin: x.x 42 | max_pin: x.x 43 | python: 44 | - '3.13' 45 | readline: 46 | - '8' 47 | sqlite: 48 | - '3' 49 | target_platform: 50 | - linux-ppc64le 51 | zip_keys: 52 | - - build_type 53 | - channel_targets 54 | - - c_compiler_version 55 | - cxx_compiler_version 56 | zlib: 57 | - '1' 58 | -------------------------------------------------------------------------------- /.ci_support/osx_64_build_typedebugchannel_targetsconda-forge_python_debugfreethreadingno.yaml: -------------------------------------------------------------------------------- 1 | MACOSX_DEPLOYMENT_TARGET: 2 | - '10.13' 3 | MACOSX_SDK_VERSION: 4 | - '11.0' 5 | build_type: 6 | - debug 7 | bzip2: 8 | - '1' 9 | c_compiler: 10 | - clang 11 | c_compiler_version: 12 | - '18' 13 | c_stdlib: 14 | - macosx_deployment_target 15 | c_stdlib_version: 16 | - '10.13' 17 | channel_sources: 18 | - conda-forge/label/python_rc,conda-forge 19 | channel_targets: 20 | - conda-forge python_debug 21 | cxx_compiler: 22 | - clangxx 23 | cxx_compiler_version: 24 | - '18' 25 | expat: 26 | - '2' 27 | freethreading: 28 | - 'no' 29 | libffi: 30 | - '3.4' 31 | liblzma_devel: 32 | - '5' 33 | macos_machine: 34 | - x86_64-apple-darwin13.4.0 35 | ncurses: 36 | - '6' 37 | openssl: 38 | - '3' 39 | pin_run_as_build: 40 | python: 41 | min_pin: x.x 42 | max_pin: x.x 43 | python: 44 | - '3.13' 45 | readline: 46 | - '8' 47 | sqlite: 48 | - '3' 49 | target_platform: 50 | - osx-64 51 | tk: 52 | - '8.6' 53 | zip_keys: 54 | - - build_type 55 | - channel_targets 56 | - - c_compiler_version 57 | - cxx_compiler_version 58 | zlib: 59 | - '1' 60 | -------------------------------------------------------------------------------- /.ci_support/osx_64_build_typedebugchannel_targetsconda-forge_python_debugfreethreadingyes.yaml: -------------------------------------------------------------------------------- 1 | MACOSX_DEPLOYMENT_TARGET: 2 | - '10.13' 3 | MACOSX_SDK_VERSION: 4 | - '11.0' 5 | build_type: 6 | - debug 7 | bzip2: 8 | - '1' 9 | c_compiler: 10 | - clang 11 | c_compiler_version: 12 | - '18' 13 | c_stdlib: 14 | - macosx_deployment_target 15 | c_stdlib_version: 16 | - '10.13' 17 | channel_sources: 18 | - conda-forge/label/python_rc,conda-forge 19 | channel_targets: 20 | - conda-forge python_debug 21 | cxx_compiler: 22 | - clangxx 23 | cxx_compiler_version: 24 | - '18' 25 | expat: 26 | - '2' 27 | freethreading: 28 | - 'yes' 29 | libffi: 30 | - '3.4' 31 | liblzma_devel: 32 | - '5' 33 | macos_machine: 34 | - x86_64-apple-darwin13.4.0 35 | ncurses: 36 | - '6' 37 | openssl: 38 | - '3' 39 | pin_run_as_build: 40 | python: 41 | min_pin: x.x 42 | max_pin: x.x 43 | python: 44 | - '3.13' 45 | readline: 46 | - '8' 47 | sqlite: 48 | - '3' 49 | target_platform: 50 | - osx-64 51 | tk: 52 | - '8.6' 53 | zip_keys: 54 | - - build_type 55 | - channel_targets 56 | - - c_compiler_version 57 | - cxx_compiler_version 58 | zlib: 59 | - '1' 60 | -------------------------------------------------------------------------------- /.ci_support/osx_64_build_typereleasechannel_targetsconda-forge_mainfreethreadingno.yaml: -------------------------------------------------------------------------------- 1 | MACOSX_DEPLOYMENT_TARGET: 2 | - '10.13' 3 | MACOSX_SDK_VERSION: 4 | - '11.0' 5 | build_type: 6 | - release 7 | bzip2: 8 | - '1' 9 | c_compiler: 10 | - clang 11 | c_compiler_version: 12 | - '18' 13 | c_stdlib: 14 | - macosx_deployment_target 15 | c_stdlib_version: 16 | - '10.13' 17 | channel_sources: 18 | - conda-forge/label/python_rc,conda-forge 19 | channel_targets: 20 | - conda-forge main 21 | cxx_compiler: 22 | - clangxx 23 | cxx_compiler_version: 24 | - '18' 25 | expat: 26 | - '2' 27 | freethreading: 28 | - 'no' 29 | libffi: 30 | - '3.4' 31 | liblzma_devel: 32 | - '5' 33 | macos_machine: 34 | - x86_64-apple-darwin13.4.0 35 | ncurses: 36 | - '6' 37 | openssl: 38 | - '3' 39 | pin_run_as_build: 40 | python: 41 | min_pin: x.x 42 | max_pin: x.x 43 | python: 44 | - '3.13' 45 | readline: 46 | - '8' 47 | sqlite: 48 | - '3' 49 | target_platform: 50 | - osx-64 51 | tk: 52 | - '8.6' 53 | zip_keys: 54 | - - build_type 55 | - channel_targets 56 | - - c_compiler_version 57 | - cxx_compiler_version 58 | zlib: 59 | - '1' 60 | -------------------------------------------------------------------------------- /.ci_support/osx_64_build_typereleasechannel_targetsconda-forge_mainfreethreadingyes.yaml: -------------------------------------------------------------------------------- 1 | MACOSX_DEPLOYMENT_TARGET: 2 | - '10.13' 3 | MACOSX_SDK_VERSION: 4 | - '11.0' 5 | build_type: 6 | - release 7 | bzip2: 8 | - '1' 9 | c_compiler: 10 | - clang 11 | c_compiler_version: 12 | - '18' 13 | c_stdlib: 14 | - macosx_deployment_target 15 | c_stdlib_version: 16 | - '10.13' 17 | channel_sources: 18 | - conda-forge/label/python_rc,conda-forge 19 | channel_targets: 20 | - conda-forge main 21 | cxx_compiler: 22 | - clangxx 23 | cxx_compiler_version: 24 | - '18' 25 | expat: 26 | - '2' 27 | freethreading: 28 | - 'yes' 29 | libffi: 30 | - '3.4' 31 | liblzma_devel: 32 | - '5' 33 | macos_machine: 34 | - x86_64-apple-darwin13.4.0 35 | ncurses: 36 | - '6' 37 | openssl: 38 | - '3' 39 | pin_run_as_build: 40 | python: 41 | min_pin: x.x 42 | max_pin: x.x 43 | python: 44 | - '3.13' 45 | readline: 46 | - '8' 47 | sqlite: 48 | - '3' 49 | target_platform: 50 | - osx-64 51 | tk: 52 | - '8.6' 53 | zip_keys: 54 | - - build_type 55 | - channel_targets 56 | - - c_compiler_version 57 | - cxx_compiler_version 58 | zlib: 59 | - '1' 60 | -------------------------------------------------------------------------------- /.ci_support/osx_arm64_build_typedebugchannel_targetsconda-forge_python_debugfreethreadingno.yaml: -------------------------------------------------------------------------------- 1 | MACOSX_DEPLOYMENT_TARGET: 2 | - '11.0' 3 | MACOSX_SDK_VERSION: 4 | - '11.0' 5 | build_type: 6 | - debug 7 | bzip2: 8 | - '1' 9 | c_compiler: 10 | - clang 11 | c_compiler_version: 12 | - '18' 13 | c_stdlib: 14 | - macosx_deployment_target 15 | c_stdlib_version: 16 | - '11.0' 17 | channel_sources: 18 | - conda-forge/label/python_rc,conda-forge 19 | channel_targets: 20 | - conda-forge python_debug 21 | cxx_compiler: 22 | - clangxx 23 | cxx_compiler_version: 24 | - '18' 25 | expat: 26 | - '2' 27 | freethreading: 28 | - 'no' 29 | libffi: 30 | - '3.4' 31 | liblzma_devel: 32 | - '5' 33 | macos_machine: 34 | - arm64-apple-darwin20.0.0 35 | ncurses: 36 | - '6' 37 | openssl: 38 | - '3' 39 | pin_run_as_build: 40 | python: 41 | min_pin: x.x 42 | max_pin: x.x 43 | python: 44 | - '3.13' 45 | readline: 46 | - '8' 47 | sqlite: 48 | - '3' 49 | target_platform: 50 | - osx-arm64 51 | tk: 52 | - '8.6' 53 | zip_keys: 54 | - - build_type 55 | - channel_targets 56 | - - c_compiler_version 57 | - cxx_compiler_version 58 | zlib: 59 | - '1' 60 | -------------------------------------------------------------------------------- /.ci_support/osx_arm64_build_typedebugchannel_targetsconda-forge_python_debugfreethreadingyes.yaml: -------------------------------------------------------------------------------- 1 | MACOSX_DEPLOYMENT_TARGET: 2 | - '11.0' 3 | MACOSX_SDK_VERSION: 4 | - '11.0' 5 | build_type: 6 | - debug 7 | bzip2: 8 | - '1' 9 | c_compiler: 10 | - clang 11 | c_compiler_version: 12 | - '18' 13 | c_stdlib: 14 | - macosx_deployment_target 15 | c_stdlib_version: 16 | - '11.0' 17 | channel_sources: 18 | - conda-forge/label/python_rc,conda-forge 19 | channel_targets: 20 | - conda-forge python_debug 21 | cxx_compiler: 22 | - clangxx 23 | cxx_compiler_version: 24 | - '18' 25 | expat: 26 | - '2' 27 | freethreading: 28 | - 'yes' 29 | libffi: 30 | - '3.4' 31 | liblzma_devel: 32 | - '5' 33 | macos_machine: 34 | - arm64-apple-darwin20.0.0 35 | ncurses: 36 | - '6' 37 | openssl: 38 | - '3' 39 | pin_run_as_build: 40 | python: 41 | min_pin: x.x 42 | max_pin: x.x 43 | python: 44 | - '3.13' 45 | readline: 46 | - '8' 47 | sqlite: 48 | - '3' 49 | target_platform: 50 | - osx-arm64 51 | tk: 52 | - '8.6' 53 | zip_keys: 54 | - - build_type 55 | - channel_targets 56 | - - c_compiler_version 57 | - cxx_compiler_version 58 | zlib: 59 | - '1' 60 | -------------------------------------------------------------------------------- /.ci_support/osx_arm64_build_typereleasechannel_targetsconda-forge_mainfreethreadingno.yaml: -------------------------------------------------------------------------------- 1 | MACOSX_DEPLOYMENT_TARGET: 2 | - '11.0' 3 | MACOSX_SDK_VERSION: 4 | - '11.0' 5 | build_type: 6 | - release 7 | bzip2: 8 | - '1' 9 | c_compiler: 10 | - clang 11 | c_compiler_version: 12 | - '18' 13 | c_stdlib: 14 | - macosx_deployment_target 15 | c_stdlib_version: 16 | - '11.0' 17 | channel_sources: 18 | - conda-forge/label/python_rc,conda-forge 19 | channel_targets: 20 | - conda-forge main 21 | cxx_compiler: 22 | - clangxx 23 | cxx_compiler_version: 24 | - '18' 25 | expat: 26 | - '2' 27 | freethreading: 28 | - 'no' 29 | libffi: 30 | - '3.4' 31 | liblzma_devel: 32 | - '5' 33 | macos_machine: 34 | - arm64-apple-darwin20.0.0 35 | ncurses: 36 | - '6' 37 | openssl: 38 | - '3' 39 | pin_run_as_build: 40 | python: 41 | min_pin: x.x 42 | max_pin: x.x 43 | python: 44 | - '3.13' 45 | readline: 46 | - '8' 47 | sqlite: 48 | - '3' 49 | target_platform: 50 | - osx-arm64 51 | tk: 52 | - '8.6' 53 | zip_keys: 54 | - - build_type 55 | - channel_targets 56 | - - c_compiler_version 57 | - cxx_compiler_version 58 | zlib: 59 | - '1' 60 | -------------------------------------------------------------------------------- /.ci_support/osx_arm64_build_typereleasechannel_targetsconda-forge_mainfreethreadingyes.yaml: -------------------------------------------------------------------------------- 1 | MACOSX_DEPLOYMENT_TARGET: 2 | - '11.0' 3 | MACOSX_SDK_VERSION: 4 | - '11.0' 5 | build_type: 6 | - release 7 | bzip2: 8 | - '1' 9 | c_compiler: 10 | - clang 11 | c_compiler_version: 12 | - '18' 13 | c_stdlib: 14 | - macosx_deployment_target 15 | c_stdlib_version: 16 | - '11.0' 17 | channel_sources: 18 | - conda-forge/label/python_rc,conda-forge 19 | channel_targets: 20 | - conda-forge main 21 | cxx_compiler: 22 | - clangxx 23 | cxx_compiler_version: 24 | - '18' 25 | expat: 26 | - '2' 27 | freethreading: 28 | - 'yes' 29 | libffi: 30 | - '3.4' 31 | liblzma_devel: 32 | - '5' 33 | macos_machine: 34 | - arm64-apple-darwin20.0.0 35 | ncurses: 36 | - '6' 37 | openssl: 38 | - '3' 39 | pin_run_as_build: 40 | python: 41 | min_pin: x.x 42 | max_pin: x.x 43 | python: 44 | - '3.13' 45 | readline: 46 | - '8' 47 | sqlite: 48 | - '3' 49 | target_platform: 50 | - osx-arm64 51 | tk: 52 | - '8.6' 53 | zip_keys: 54 | - - build_type 55 | - channel_targets 56 | - - c_compiler_version 57 | - cxx_compiler_version 58 | zlib: 59 | - '1' 60 | -------------------------------------------------------------------------------- /.ci_support/win_64_freethreadingno.yaml: -------------------------------------------------------------------------------- 1 | build_type: 2 | - release 3 | bzip2: 4 | - '1' 5 | c_compiler: 6 | - vs2019 7 | c_stdlib: 8 | - vs 9 | channel_sources: 10 | - conda-forge/label/python_rc,conda-forge 11 | channel_targets: 12 | - conda-forge main 13 | cxx_compiler: 14 | - vs2019 15 | expat: 16 | - '2' 17 | freethreading: 18 | - 'no' 19 | libffi: 20 | - '3.4' 21 | liblzma_devel: 22 | - '5' 23 | openssl: 24 | - '3' 25 | pin_run_as_build: 26 | python: 27 | min_pin: x.x 28 | max_pin: x.x 29 | python: 30 | - '3.13' 31 | sqlite: 32 | - '3' 33 | target_platform: 34 | - win-64 35 | tk: 36 | - '8.6' 37 | zip_keys: 38 | - - build_type 39 | - channel_targets 40 | zlib: 41 | - '1' 42 | -------------------------------------------------------------------------------- /.ci_support/win_64_freethreadingyes.yaml: -------------------------------------------------------------------------------- 1 | build_type: 2 | - release 3 | bzip2: 4 | - '1' 5 | c_compiler: 6 | - vs2019 7 | c_stdlib: 8 | - vs 9 | channel_sources: 10 | - conda-forge/label/python_rc,conda-forge 11 | channel_targets: 12 | - conda-forge main 13 | cxx_compiler: 14 | - vs2019 15 | expat: 16 | - '2' 17 | freethreading: 18 | - 'yes' 19 | libffi: 20 | - '3.4' 21 | liblzma_devel: 22 | - '5' 23 | openssl: 24 | - '3' 25 | pin_run_as_build: 26 | python: 27 | min_pin: x.x 28 | max_pin: x.x 29 | python: 30 | - '3.13' 31 | sqlite: 32 | - '3' 33 | target_platform: 34 | - win-64 35 | tk: 36 | - '8.6' 37 | zip_keys: 38 | - - build_type 39 | - channel_targets 40 | zlib: 41 | - '1' 42 | -------------------------------------------------------------------------------- /.circleci/config.yml: -------------------------------------------------------------------------------- 1 | # This file was generated automatically from conda-smithy. To update this configuration, 2 | # update the conda-forge.yml and/or the recipe/meta.yaml. 3 | # -*- mode: jinja-yaml -*- 4 | 5 | version: 2 6 | 7 | jobs: 8 | build: 9 | working_directory: ~/test 10 | machine: 11 | image: ubuntu-2004:current 12 | steps: 13 | - run: 14 | # The Circle-CI build should not be active, but if this is not true for some reason, do a fast finish. 15 | command: exit 0 16 | 17 | workflows: 18 | version: 2 19 | build_and_test: 20 | jobs: 21 | - build: 22 | filters: 23 | branches: 24 | ignore: 25 | - /.*/ 26 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto 2 | 3 | *.patch binary 4 | *.diff binary 5 | meta.yaml text eol=lf 6 | build.sh text eol=lf 7 | bld.bat text eol=crlf 8 | 9 | # github helper pieces to make some files not show up in diffs automatically 10 | .azure-pipelines/* linguist-generated=true 11 | .circleci/* linguist-generated=true 12 | .ci_support/README linguist-generated=true 13 | .drone/* linguist-generated=true 14 | .drone.yml linguist-generated=true 15 | .github/* linguist-generated=true 16 | .travis/* linguist-generated=true 17 | .appveyor.yml linguist-generated=true 18 | .gitattributes linguist-generated=true 19 | .gitignore linguist-generated=true 20 | .travis.yml linguist-generated=true 21 | .scripts/* linguist-generated=true 22 | .woodpecker.yml linguist-generated=true 23 | /LICENSE.txt linguist-generated=true 24 | /README.md linguist-generated=true 25 | azure-pipelines.yml linguist-generated=true 26 | build-locally.py linguist-generated=true 27 | shippable.yml linguist-generated=true 28 | -------------------------------------------------------------------------------- /.github/CODEOWNERS: -------------------------------------------------------------------------------- 1 | * @chrisburr @isuruf @jakirkham @katietz @mbargull @msarahan @ocefpaf @pelson @scopatz @xhochy -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # User content belongs under recipe/. 2 | # Feedstock configuration goes in `conda-forge.yml` 3 | # Everything else is managed by the conda-smithy rerender process. 4 | # Please do not modify 5 | 6 | # Ignore all files and folders in root 7 | * 8 | !/conda-forge.yml 9 | 10 | # Don't ignore any files/folders if the parent folder is 'un-ignored' 11 | # This also avoids warnings when adding an already-checked file with an ignored parent. 12 | !/**/ 13 | # Don't ignore any files/folders recursively in the following folders 14 | !/recipe/** 15 | !/.ci_support/** 16 | 17 | # Since we ignore files/folders recursively, any folders inside 18 | # build_artifacts gets ignored which trips some build systems. 19 | # To avoid that we 'un-ignore' all files/folders recursively 20 | # and only ignore the root build_artifacts folder. 21 | !/build_artifacts/** 22 | /build_artifacts 23 | 24 | *.pyc 25 | 26 | # Rattler-build's artifacts are in `output` when not specifying anything. 27 | /output 28 | # Pixi's configuration 29 | .pixi 30 | -------------------------------------------------------------------------------- /.scripts/build_steps.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # PLEASE NOTE: This script has been automatically generated by conda-smithy. Any changes here 4 | # will be lost next time ``conda smithy rerender`` is run. If you would like to make permanent 5 | # changes to this script, consider a proposal to conda-smithy so that other feedstocks can also 6 | # benefit from the improvement. 7 | 8 | # -*- mode: jinja-shell -*- 9 | 10 | set -xeuo pipefail 11 | export FEEDSTOCK_ROOT="${FEEDSTOCK_ROOT:-/home/conda/feedstock_root}" 12 | source ${FEEDSTOCK_ROOT}/.scripts/logging_utils.sh 13 | 14 | 15 | ( endgroup "Start Docker" ) 2> /dev/null 16 | 17 | ( startgroup "Configuring conda" ) 2> /dev/null 18 | 19 | export PYTHONUNBUFFERED=1 20 | export RECIPE_ROOT="${RECIPE_ROOT:-/home/conda/recipe_root}" 21 | export CI_SUPPORT="${FEEDSTOCK_ROOT}/.ci_support" 22 | export CONFIG_FILE="${CI_SUPPORT}/${CONFIG}.yaml" 23 | 24 | cat >~/.condarc < /opt/conda/conda-meta/history 36 | micromamba install --root-prefix ~/.conda --prefix /opt/conda \ 37 | --yes --override-channels --channel conda-forge --strict-channel-priority \ 38 | pip python=3.12 conda-build conda-forge-ci-setup=4 "conda-build>=24.1" 39 | export CONDA_LIBMAMBA_SOLVER_NO_CHANNELS_FROM_INSTALLED=1 40 | 41 | # set up the condarc 42 | setup_conda_rc "${FEEDSTOCK_ROOT}" "${RECIPE_ROOT}" "${CONFIG_FILE}" 43 | 44 | source run_conda_forge_build_setup 45 | 46 | ( 47 | # Due to https://bugzilla.redhat.com/show_bug.cgi?id=1537564 old versions of rpm 48 | # are drastically slowed down when the number of file descriptors is very high. 49 | # This can be visible during a `yum install` step of a feedstock build. 50 | # => Set a lower limit in a subshell for the `yum install`s only. 51 | ulimit -n 1024 52 | 53 | # Install the yum requirements defined canonically in the 54 | # "recipe/yum_requirements.txt" file. After updating that file, 55 | # run "conda smithy rerender" and this line will be updated 56 | # automatically. 57 | /usr/bin/sudo -n yum install -y libX11 libxcb libXau 58 | ) 59 | 60 | # make the build number clobber 61 | make_build_number "${FEEDSTOCK_ROOT}" "${RECIPE_ROOT}" "${CONFIG_FILE}" 62 | 63 | if [[ "${HOST_PLATFORM}" != "${BUILD_PLATFORM}" ]] && [[ "${HOST_PLATFORM}" != linux-* ]] && [[ "${BUILD_WITH_CONDA_DEBUG:-0}" != 1 ]]; then 64 | EXTRA_CB_OPTIONS="${EXTRA_CB_OPTIONS:-} --no-test" 65 | fi 66 | 67 | 68 | ( endgroup "Configuring conda" ) 2> /dev/null 69 | 70 | if [[ -f "${FEEDSTOCK_ROOT}/LICENSE.txt" ]]; then 71 | cp "${FEEDSTOCK_ROOT}/LICENSE.txt" "${RECIPE_ROOT}/recipe-scripts-license.txt" 72 | fi 73 | 74 | if [[ "${BUILD_WITH_CONDA_DEBUG:-0}" == 1 ]]; then 75 | if [[ "x${BUILD_OUTPUT_ID:-}" != "x" ]]; then 76 | EXTRA_CB_OPTIONS="${EXTRA_CB_OPTIONS:-} --output-id ${BUILD_OUTPUT_ID}" 77 | fi 78 | conda debug "${RECIPE_ROOT}" -m "${CI_SUPPORT}/${CONFIG}.yaml" \ 79 | ${EXTRA_CB_OPTIONS:-} \ 80 | --clobber-file "${CI_SUPPORT}/clobber_${CONFIG}.yaml" 81 | 82 | # Drop into an interactive shell 83 | /bin/bash 84 | else 85 | conda-build "${RECIPE_ROOT}" -m "${CI_SUPPORT}/${CONFIG}.yaml" \ 86 | --suppress-variables ${EXTRA_CB_OPTIONS:-} \ 87 | --clobber-file "${CI_SUPPORT}/clobber_${CONFIG}.yaml" \ 88 | --extra-meta flow_run_id="${flow_run_id:-}" remote_url="${remote_url:-}" sha="${sha:-}" 89 | ( startgroup "Inspecting artifacts" ) 2> /dev/null 90 | 91 | # inspect_artifacts was only added in conda-forge-ci-setup 4.9.4 92 | command -v inspect_artifacts >/dev/null 2>&1 && inspect_artifacts --recipe-dir "${RECIPE_ROOT}" -m "${CONFIG_FILE}" || echo "inspect_artifacts needs conda-forge-ci-setup >=4.9.4" 93 | 94 | ( endgroup "Inspecting artifacts" ) 2> /dev/null 95 | ( startgroup "Validating outputs" ) 2> /dev/null 96 | 97 | validate_recipe_outputs "${FEEDSTOCK_NAME}" 98 | 99 | ( endgroup "Validating outputs" ) 2> /dev/null 100 | 101 | ( startgroup "Uploading packages" ) 2> /dev/null 102 | 103 | if [[ "${UPLOAD_PACKAGES}" != "False" ]] && [[ "${IS_PR_BUILD}" == "False" ]]; then 104 | upload_package --validate --feedstock-name="${FEEDSTOCK_NAME}" "${FEEDSTOCK_ROOT}" "${RECIPE_ROOT}" "${CONFIG_FILE}" 105 | fi 106 | 107 | ( endgroup "Uploading packages" ) 2> /dev/null 108 | fi 109 | 110 | ( startgroup "Final checks" ) 2> /dev/null 111 | 112 | touch "${FEEDSTOCK_ROOT}/build_artifacts/conda-forge-build-done-${CONFIG}" -------------------------------------------------------------------------------- /.scripts/create_conda_build_artifacts.bat: -------------------------------------------------------------------------------- 1 | setlocal enableextensions enabledelayedexpansion 2 | 3 | rem INPUTS (environment variables that need to be set before calling this script): 4 | rem 5 | rem CI (azure/github_actions/UNSET) 6 | rem CI_RUN_ID (unique identifier for the CI job run) 7 | rem FEEDSTOCK_NAME 8 | rem CONFIG (build matrix configuration string) 9 | rem SHORT_CONFIG (uniquely-shortened configuration string) 10 | rem CONDA_BLD_DIR (path to the conda-bld directory) 11 | rem ARTIFACT_STAGING_DIR (use working directory if unset) 12 | rem BLD_ARTIFACT_PREFIX (prefix for the conda build artifact name, skip if unset) 13 | rem ENV_ARTIFACT_PREFIX (prefix for the conda build environments artifact name, skip if unset) 14 | 15 | rem OUTPUTS 16 | rem 17 | rem BLD_ARTIFACT_NAME 18 | rem BLD_ARTIFACT_PATH 19 | rem ENV_ARTIFACT_NAME 20 | rem ENV_ARTIFACT_PATH 21 | 22 | rem Check that the conda-build directory exists 23 | if not exist %CONDA_BLD_DIR% ( 24 | echo conda-build directory does not exist 25 | exit 1 26 | ) 27 | 28 | if not defined ARTIFACT_STAGING_DIR ( 29 | rem Set staging dir to the working dir 30 | set ARTIFACT_STAGING_DIR=%cd% 31 | ) 32 | 33 | rem Set a unique ID for the artifact(s), specialized for this particular job run 34 | set ARTIFACT_UNIQUE_ID=%CI_RUN_ID%_%CONFIG% 35 | if not "%ARTIFACT_UNIQUE_ID%" == "%ARTIFACT_UNIQUE_ID:~0,80%" ( 36 | set ARTIFACT_UNIQUE_ID=%CI_RUN_ID%_%SHORT_CONFIG% 37 | ) 38 | 39 | rem Set a descriptive ID for the archive(s), specialized for this particular job run 40 | set ARCHIVE_UNIQUE_ID=%CI_RUN_ID%_%CONFIG% 41 | 42 | rem Make the build artifact zip 43 | if defined BLD_ARTIFACT_PREFIX ( 44 | set BLD_ARTIFACT_NAME=%BLD_ARTIFACT_PREFIX%_%ARTIFACT_UNIQUE_ID% 45 | echo BLD_ARTIFACT_NAME: !BLD_ARTIFACT_NAME! 46 | 47 | set "BLD_ARTIFACT_PATH=%ARTIFACT_STAGING_DIR%\%FEEDSTOCK_NAME%_%BLD_ARTIFACT_PREFIX%_%ARCHIVE_UNIQUE_ID%.zip" 48 | 7z a "!BLD_ARTIFACT_PATH!" "%CONDA_BLD_DIR%" -xr^^!.git/ -xr^^!_*_env*/ -xr^^!*_cache/ -bb 49 | if errorlevel 1 exit 1 50 | echo BLD_ARTIFACT_PATH: !BLD_ARTIFACT_PATH! 51 | 52 | if "%CI%" == "azure" ( 53 | echo ##vso[task.setVariable variable=BLD_ARTIFACT_NAME]!BLD_ARTIFACT_NAME! 54 | echo ##vso[task.setVariable variable=BLD_ARTIFACT_PATH]!BLD_ARTIFACT_PATH! 55 | ) 56 | if "%CI%" == "github_actions" ( 57 | echo BLD_ARTIFACT_NAME=!BLD_ARTIFACT_NAME!>> !GITHUB_OUTPUT! 58 | echo BLD_ARTIFACT_PATH=!BLD_ARTIFACT_PATH!>> !GITHUB_OUTPUT! 59 | ) 60 | ) 61 | 62 | rem Make the environments artifact zip 63 | if defined ENV_ARTIFACT_PREFIX ( 64 | set ENV_ARTIFACT_NAME=!ENV_ARTIFACT_PREFIX!_%ARTIFACT_UNIQUE_ID% 65 | echo ENV_ARTIFACT_NAME: !ENV_ARTIFACT_NAME! 66 | 67 | set "ENV_ARTIFACT_PATH=%ARTIFACT_STAGING_DIR%\%FEEDSTOCK_NAME%_%ENV_ARTIFACT_PREFIX%_%ARCHIVE_UNIQUE_ID%.zip" 68 | 7z a "!ENV_ARTIFACT_PATH!" -r "%CONDA_BLD_DIR%"/_*_env*/ -bb 69 | if errorlevel 1 exit 1 70 | echo ENV_ARTIFACT_PATH: !ENV_ARTIFACT_PATH! 71 | 72 | if "%CI%" == "azure" ( 73 | echo ##vso[task.setVariable variable=ENV_ARTIFACT_NAME]!ENV_ARTIFACT_NAME! 74 | echo ##vso[task.setVariable variable=ENV_ARTIFACT_PATH]!ENV_ARTIFACT_PATH! 75 | ) 76 | if "%CI%" == "github_actions" ( 77 | echo ENV_ARTIFACT_NAME=!ENV_ARTIFACT_NAME!>> !GITHUB_OUTPUT! 78 | echo ENV_ARTIFACT_PATH=!ENV_ARTIFACT_PATH!>> !GITHUB_OUTPUT! 79 | ) 80 | ) -------------------------------------------------------------------------------- /.scripts/create_conda_build_artifacts.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # INPUTS (environment variables that need to be set before calling this script): 4 | # 5 | # CI (azure/github_actions/UNSET) 6 | # CI_RUN_ID (unique identifier for the CI job run) 7 | # FEEDSTOCK_NAME 8 | # CONFIG (build matrix configuration string) 9 | # SHORT_CONFIG (uniquely-shortened configuration string) 10 | # CONDA_BLD_DIR (path to the conda-bld directory) 11 | # ARTIFACT_STAGING_DIR (use working directory if unset) 12 | # BLD_ARTIFACT_PREFIX (prefix for the conda build artifact name, skip if unset) 13 | # ENV_ARTIFACT_PREFIX (prefix for the conda build environments artifact name, skip if unset) 14 | 15 | # OUTPUTS 16 | # 17 | # BLD_ARTIFACT_NAME 18 | # BLD_ARTIFACT_PATH 19 | # ENV_ARTIFACT_NAME 20 | # ENV_ARTIFACT_PATH 21 | 22 | source .scripts/logging_utils.sh 23 | 24 | # DON'T do set -x, because it results in double echo-ing pipeline commands 25 | # and that might end up inserting extraneous quotation marks in output variables 26 | set -e 27 | 28 | # Check that the conda-build directory exists 29 | if [ ! -d "$CONDA_BLD_DIR" ]; then 30 | echo "conda-build directory does not exist" 31 | exit 1 32 | fi 33 | 34 | # Set staging dir to the working dir, in Windows style if applicable 35 | if [[ -z "${ARTIFACT_STAGING_DIR}" ]]; then 36 | if pwd -W; then 37 | ARTIFACT_STAGING_DIR=$(pwd -W) 38 | else 39 | ARTIFACT_STAGING_DIR=$PWD 40 | fi 41 | fi 42 | echo "ARTIFACT_STAGING_DIR: $ARTIFACT_STAGING_DIR" 43 | 44 | FEEDSTOCK_ROOT=$(cd "$(dirname "$0")/.."; pwd;) 45 | if [ -z ${FEEDSTOCK_NAME} ]; then 46 | export FEEDSTOCK_NAME=$(basename ${FEEDSTOCK_ROOT}) 47 | fi 48 | 49 | # Set a unique ID for the artifact(s), specialized for this particular job run 50 | ARTIFACT_UNIQUE_ID="${CI_RUN_ID}_${CONFIG}" 51 | if [[ ${#ARTIFACT_UNIQUE_ID} -gt 80 ]]; then 52 | ARTIFACT_UNIQUE_ID="${CI_RUN_ID}_${SHORT_CONFIG}" 53 | fi 54 | echo "ARTIFACT_UNIQUE_ID: $ARTIFACT_UNIQUE_ID" 55 | 56 | # Set a descriptive ID for the archive(s), specialized for this particular job run 57 | ARCHIVE_UNIQUE_ID="${CI_RUN_ID}_${CONFIG}" 58 | 59 | # Make the build artifact zip 60 | if [[ ! -z "$BLD_ARTIFACT_PREFIX" ]]; then 61 | export BLD_ARTIFACT_NAME="${BLD_ARTIFACT_PREFIX}_${ARTIFACT_UNIQUE_ID}" 62 | export BLD_ARTIFACT_PATH="${ARTIFACT_STAGING_DIR}/${FEEDSTOCK_NAME}_${BLD_ARTIFACT_PREFIX}_${ARCHIVE_UNIQUE_ID}.zip" 63 | 64 | ( startgroup "Archive conda build directory" ) 2> /dev/null 65 | 66 | # Try 7z and fall back to zip if it fails (for cross-platform use) 67 | if ! 7z a "$BLD_ARTIFACT_PATH" "$CONDA_BLD_DIR" '-xr!.git/' '-xr!_*_env*/' '-xr!*_cache/' -bb; then 68 | pushd "$CONDA_BLD_DIR" 69 | zip -r -y -T "$BLD_ARTIFACT_PATH" . -x '*.git/*' '*_*_env*/*' '*_cache/*' 70 | popd 71 | fi 72 | 73 | ( endgroup "Archive conda build directory" ) 2> /dev/null 74 | 75 | echo "BLD_ARTIFACT_NAME: $BLD_ARTIFACT_NAME" 76 | echo "BLD_ARTIFACT_PATH: $BLD_ARTIFACT_PATH" 77 | 78 | if [[ "$CI" == "azure" ]]; then 79 | echo "##vso[task.setVariable variable=BLD_ARTIFACT_NAME]$BLD_ARTIFACT_NAME" 80 | echo "##vso[task.setVariable variable=BLD_ARTIFACT_PATH]$BLD_ARTIFACT_PATH" 81 | elif [[ "$CI" == "github_actions" ]]; then 82 | echo "BLD_ARTIFACT_NAME=$BLD_ARTIFACT_NAME" >> $GITHUB_OUTPUT 83 | echo "BLD_ARTIFACT_PATH=$BLD_ARTIFACT_PATH" >> $GITHUB_OUTPUT 84 | fi 85 | fi 86 | 87 | # Make the environments artifact zip 88 | if [[ ! -z "$ENV_ARTIFACT_PREFIX" ]]; then 89 | export ENV_ARTIFACT_NAME="${ENV_ARTIFACT_PREFIX}_${ARTIFACT_UNIQUE_ID}" 90 | export ENV_ARTIFACT_PATH="${ARTIFACT_STAGING_DIR}/${FEEDSTOCK_NAME}_${ENV_ARTIFACT_PREFIX}_${ARCHIVE_UNIQUE_ID}.zip" 91 | 92 | ( startgroup "Archive conda build environments" ) 2> /dev/null 93 | 94 | # Try 7z and fall back to zip if it fails (for cross-platform use) 95 | if ! 7z a "$ENV_ARTIFACT_PATH" -r "$CONDA_BLD_DIR"/'_*_env*/' -bb; then 96 | pushd "$CONDA_BLD_DIR" 97 | zip -r -y -T "$ENV_ARTIFACT_PATH" . -i '*_*_env*/*' 98 | popd 99 | fi 100 | 101 | ( endgroup "Archive conda build environments" ) 2> /dev/null 102 | 103 | echo "ENV_ARTIFACT_NAME: $ENV_ARTIFACT_NAME" 104 | echo "ENV_ARTIFACT_PATH: $ENV_ARTIFACT_PATH" 105 | 106 | if [[ "$CI" == "azure" ]]; then 107 | echo "##vso[task.setVariable variable=ENV_ARTIFACT_NAME]$ENV_ARTIFACT_NAME" 108 | echo "##vso[task.setVariable variable=ENV_ARTIFACT_PATH]$ENV_ARTIFACT_PATH" 109 | elif [[ "$CI" == "github_actions" ]]; then 110 | echo "ENV_ARTIFACT_NAME=$ENV_ARTIFACT_NAME" >> $GITHUB_OUTPUT 111 | echo "ENV_ARTIFACT_PATH=$ENV_ARTIFACT_PATH" >> $GITHUB_OUTPUT 112 | fi 113 | fi -------------------------------------------------------------------------------- /.scripts/logging_utils.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Provide a unified interface for the different logging 4 | # utilities CI providers offer. If unavailable, provide 5 | # a compatible fallback (e.g. bare `echo xxxxxx`). 6 | 7 | function startgroup { 8 | # Start a foldable group of log lines 9 | # Pass a single argument, quoted 10 | case ${CI:-} in 11 | azure ) 12 | echo "##[group]$1";; 13 | travis ) 14 | echo "$1" 15 | echo -en 'travis_fold:start:'"${1// /}"'\r';; 16 | github_actions ) 17 | echo "::group::$1";; 18 | * ) 19 | echo "$1";; 20 | esac 21 | } 2> /dev/null 22 | 23 | function endgroup { 24 | # End a foldable group of log lines 25 | # Pass a single argument, quoted 26 | 27 | case ${CI:-} in 28 | azure ) 29 | echo "##[endgroup]";; 30 | travis ) 31 | echo -en 'travis_fold:end:'"${1// /}"'\r';; 32 | github_actions ) 33 | echo "::endgroup::";; 34 | esac 35 | } 2> /dev/null 36 | -------------------------------------------------------------------------------- /.scripts/run_docker_build.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # PLEASE NOTE: This script has been automatically generated by conda-smithy. Any changes here 4 | # will be lost next time ``conda smithy rerender`` is run. If you would like to make permanent 5 | # changes to this script, consider a proposal to conda-smithy so that other feedstocks can also 6 | # benefit from the improvement. 7 | 8 | source .scripts/logging_utils.sh 9 | 10 | ( startgroup "Configure Docker" ) 2> /dev/null 11 | 12 | set -xeo pipefail 13 | 14 | THISDIR="$( cd "$( dirname "$0" )" >/dev/null && pwd )" 15 | PROVIDER_DIR="$(basename "$THISDIR")" 16 | 17 | FEEDSTOCK_ROOT="$( cd "$( dirname "$0" )/.." >/dev/null && pwd )" 18 | RECIPE_ROOT="${FEEDSTOCK_ROOT}/recipe" 19 | 20 | if [ -z ${FEEDSTOCK_NAME} ]; then 21 | export FEEDSTOCK_NAME=$(basename ${FEEDSTOCK_ROOT}) 22 | fi 23 | 24 | if [[ "${sha:-}" == "" ]]; then 25 | pushd "${FEEDSTOCK_ROOT}" 26 | sha=$(git rev-parse HEAD) 27 | popd 28 | fi 29 | 30 | docker info 31 | 32 | # In order for the conda-build process in the container to write to the mounted 33 | # volumes, we need to run with the same id as the host machine, which is 34 | # normally the owner of the mounted volumes, or at least has write permission 35 | export HOST_USER_ID=$(id -u) 36 | # Check if docker-machine is being used (normally on OSX) and get the uid from 37 | # the VM 38 | if hash docker-machine 2> /dev/null && docker-machine active > /dev/null; then 39 | export HOST_USER_ID=$(docker-machine ssh $(docker-machine active) id -u) 40 | fi 41 | 42 | ARTIFACTS="$FEEDSTOCK_ROOT/build_artifacts" 43 | 44 | if [ -z "$CONFIG" ]; then 45 | set +x 46 | FILES=`ls .ci_support/linux_*` 47 | CONFIGS="" 48 | for file in $FILES; do 49 | CONFIGS="${CONFIGS}'${file:12:-5}' or "; 50 | done 51 | echo "Need to set CONFIG env variable. Value can be one of ${CONFIGS:0:-4}" 52 | exit 1 53 | fi 54 | 55 | if [ -z "${DOCKER_IMAGE}" ]; then 56 | SHYAML_INSTALLED="$(shyaml -h || echo NO)" 57 | if [ "${SHYAML_INSTALLED}" == "NO" ]; then 58 | echo "WARNING: DOCKER_IMAGE variable not set and shyaml not installed. Trying to parse with coreutils" 59 | DOCKER_IMAGE=$(cat .ci_support/${CONFIG}.yaml | grep '^docker_image:$' -A 1 | tail -n 1 | cut -b 3-) 60 | if [ "${DOCKER_IMAGE}" = "" ]; then 61 | echo "No docker_image entry found in ${CONFIG}. Falling back to quay.io/condaforge/linux-anvil-comp7" 62 | DOCKER_IMAGE="quay.io/condaforge/linux-anvil-comp7" 63 | fi 64 | else 65 | DOCKER_IMAGE="$(cat "${FEEDSTOCK_ROOT}/.ci_support/${CONFIG}.yaml" | shyaml get-value docker_image.0 quay.io/condaforge/linux-anvil-comp7 )" 66 | fi 67 | fi 68 | 69 | mkdir -p "$ARTIFACTS" 70 | DONE_CANARY="$ARTIFACTS/conda-forge-build-done-${CONFIG}" 71 | rm -f "$DONE_CANARY" 72 | 73 | # Allow people to specify extra default arguments to `docker run` (e.g. `--rm`) 74 | DOCKER_RUN_ARGS="${CONDA_FORGE_DOCKER_RUN_ARGS}" 75 | if [ -z "${CI}" ]; then 76 | DOCKER_RUN_ARGS="-it ${DOCKER_RUN_ARGS}" 77 | fi 78 | 79 | ( endgroup "Configure Docker" ) 2> /dev/null 80 | 81 | ( startgroup "Start Docker" ) 2> /dev/null 82 | 83 | export UPLOAD_PACKAGES="${UPLOAD_PACKAGES:-True}" 84 | export IS_PR_BUILD="${IS_PR_BUILD:-False}" 85 | docker pull "${DOCKER_IMAGE}" 86 | docker run ${DOCKER_RUN_ARGS} \ 87 | -v "${RECIPE_ROOT}":/home/conda/recipe_root:rw,z,delegated \ 88 | -v "${FEEDSTOCK_ROOT}":/home/conda/feedstock_root:rw,z,delegated \ 89 | -e CONFIG \ 90 | -e HOST_USER_ID \ 91 | -e UPLOAD_PACKAGES \ 92 | -e IS_PR_BUILD \ 93 | -e GIT_BRANCH \ 94 | -e UPLOAD_ON_BRANCH \ 95 | -e CI \ 96 | -e FEEDSTOCK_NAME \ 97 | -e CPU_COUNT \ 98 | -e BUILD_WITH_CONDA_DEBUG \ 99 | -e BUILD_OUTPUT_ID \ 100 | -e flow_run_id \ 101 | -e remote_url \ 102 | -e sha \ 103 | -e BINSTAR_TOKEN \ 104 | -e FEEDSTOCK_TOKEN \ 105 | -e STAGING_BINSTAR_TOKEN \ 106 | "${DOCKER_IMAGE}" \ 107 | bash \ 108 | "/home/conda/feedstock_root/${PROVIDER_DIR}/build_steps.sh" 109 | 110 | # verify that the end of the script was reached 111 | test -f "$DONE_CANARY" 112 | 113 | # This closes the last group opened in `build_steps.sh` 114 | ( endgroup "Final checks" ) 2> /dev/null -------------------------------------------------------------------------------- /.scripts/run_osx_build.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # -*- mode: jinja-shell -*- 4 | 5 | source .scripts/logging_utils.sh 6 | 7 | set -xe 8 | 9 | MINIFORGE_HOME="${MINIFORGE_HOME:-${HOME}/miniforge3}" 10 | MINIFORGE_HOME="${MINIFORGE_HOME%/}" # remove trailing slash 11 | export CONDA_BLD_PATH="${CONDA_BLD_PATH:-${MINIFORGE_HOME}/conda-bld}" 12 | 13 | ( startgroup "Provisioning base env with micromamba" ) 2> /dev/null 14 | MICROMAMBA_VERSION="1.5.10-0" 15 | if [[ "$(uname -m)" == "arm64" ]]; then 16 | osx_arch="osx-arm64" 17 | else 18 | osx_arch="osx-64" 19 | fi 20 | MICROMAMBA_URL="https://github.com/mamba-org/micromamba-releases/releases/download/${MICROMAMBA_VERSION}/micromamba-${osx_arch}" 21 | MAMBA_ROOT_PREFIX="${MINIFORGE_HOME}-micromamba-$(date +%s)" 22 | echo "Downloading micromamba ${MICROMAMBA_VERSION}" 23 | micromamba_exe="$(mktemp -d)/micromamba" 24 | curl -L -o "${micromamba_exe}" "${MICROMAMBA_URL}" 25 | chmod +x "${micromamba_exe}" 26 | echo "Creating environment" 27 | "${micromamba_exe}" create --yes --root-prefix "${MAMBA_ROOT_PREFIX}" --prefix "${MINIFORGE_HOME}" \ 28 | --channel conda-forge \ 29 | pip python=3.12 conda-build conda-forge-ci-setup=4 "conda-build>=24.1" 30 | echo "Moving pkgs cache from ${MAMBA_ROOT_PREFIX} to ${MINIFORGE_HOME}" 31 | mv "${MAMBA_ROOT_PREFIX}/pkgs" "${MINIFORGE_HOME}" 32 | echo "Cleaning up micromamba" 33 | rm -rf "${MAMBA_ROOT_PREFIX}" "${micromamba_exe}" || true 34 | ( endgroup "Provisioning base env with micromamba" ) 2> /dev/null 35 | 36 | ( startgroup "Configuring conda" ) 2> /dev/null 37 | echo "Activating environment" 38 | source "${MINIFORGE_HOME}/etc/profile.d/conda.sh" 39 | conda activate base 40 | export CONDA_SOLVER="libmamba" 41 | export CONDA_LIBMAMBA_SOLVER_NO_CHANNELS_FROM_INSTALLED=1 42 | 43 | 44 | 45 | 46 | 47 | echo -e "\n\nSetting up the condarc and mangling the compiler." 48 | setup_conda_rc ./ ./recipe ./.ci_support/${CONFIG}.yaml 49 | 50 | if [[ "${CI:-}" != "" ]]; then 51 | mangle_compiler ./ ./recipe .ci_support/${CONFIG}.yaml 52 | fi 53 | 54 | if [[ "${CI:-}" != "" ]]; then 55 | echo -e "\n\nMangling homebrew in the CI to avoid conflicts." 56 | /usr/bin/sudo mangle_homebrew 57 | /usr/bin/sudo -k 58 | else 59 | echo -e "\n\nNot mangling homebrew as we are not running in CI" 60 | fi 61 | 62 | if [[ "${sha:-}" == "" ]]; then 63 | sha=$(git rev-parse HEAD) 64 | fi 65 | 66 | echo -e "\n\nRunning the build setup script." 67 | source run_conda_forge_build_setup 68 | 69 | 70 | 71 | ( endgroup "Configuring conda" ) 2> /dev/null 72 | 73 | echo -e "\n\nMaking the build clobber file" 74 | make_build_number ./ ./recipe ./.ci_support/${CONFIG}.yaml 75 | 76 | if [[ -f LICENSE.txt ]]; then 77 | cp LICENSE.txt "recipe/recipe-scripts-license.txt" 78 | fi 79 | 80 | if [[ "${BUILD_WITH_CONDA_DEBUG:-0}" == 1 ]]; then 81 | if [[ "x${BUILD_OUTPUT_ID:-}" != "x" ]]; then 82 | EXTRA_CB_OPTIONS="${EXTRA_CB_OPTIONS:-} --output-id ${BUILD_OUTPUT_ID}" 83 | fi 84 | conda debug ./recipe -m ./.ci_support/${CONFIG}.yaml \ 85 | ${EXTRA_CB_OPTIONS:-} \ 86 | --clobber-file ./.ci_support/clobber_${CONFIG}.yaml 87 | 88 | # Drop into an interactive shell 89 | /bin/bash 90 | else 91 | 92 | if [[ "${HOST_PLATFORM}" != "${BUILD_PLATFORM}" ]]; then 93 | EXTRA_CB_OPTIONS="${EXTRA_CB_OPTIONS:-} --no-test" 94 | fi 95 | 96 | conda-build ./recipe -m ./.ci_support/${CONFIG}.yaml \ 97 | --suppress-variables ${EXTRA_CB_OPTIONS:-} \ 98 | --clobber-file ./.ci_support/clobber_${CONFIG}.yaml \ 99 | --extra-meta flow_run_id="$flow_run_id" remote_url="$remote_url" sha="$sha" 100 | 101 | ( startgroup "Inspecting artifacts" ) 2> /dev/null 102 | 103 | # inspect_artifacts was only added in conda-forge-ci-setup 4.9.4 104 | command -v inspect_artifacts >/dev/null 2>&1 && inspect_artifacts --recipe-dir ./recipe -m ./.ci_support/${CONFIG}.yaml || echo "inspect_artifacts needs conda-forge-ci-setup >=4.9.4" 105 | 106 | ( endgroup "Inspecting artifacts" ) 2> /dev/null 107 | ( startgroup "Validating outputs" ) 2> /dev/null 108 | 109 | validate_recipe_outputs "${FEEDSTOCK_NAME}" 110 | 111 | ( endgroup "Validating outputs" ) 2> /dev/null 112 | 113 | ( startgroup "Uploading packages" ) 2> /dev/null 114 | 115 | if [[ "${UPLOAD_PACKAGES}" != "False" ]] && [[ "${IS_PR_BUILD}" == "False" ]]; then 116 | upload_package --validate --feedstock-name="${FEEDSTOCK_NAME}" ./ ./recipe ./.ci_support/${CONFIG}.yaml 117 | fi 118 | 119 | ( endgroup "Uploading packages" ) 2> /dev/null 120 | fi -------------------------------------------------------------------------------- /.scripts/run_win_build.bat: -------------------------------------------------------------------------------- 1 | :: PLEASE NOTE: This script has been automatically generated by conda-smithy. Any changes here 2 | :: will be lost next time ``conda smithy rerender`` is run. If you would like to make permanent 3 | :: changes to this script, consider a proposal to conda-smithy so that other feedstocks can also 4 | :: benefit from the improvement. 5 | 6 | :: INPUTS (required environment variables) 7 | :: CONFIG: name of the .ci_support/*.yaml file for this job 8 | :: CI: azure, github_actions, or unset 9 | :: MINIFORGE_HOME: where to install the base conda environment 10 | :: UPLOAD_PACKAGES: true or false 11 | :: UPLOAD_ON_BRANCH: true or false 12 | 13 | setlocal enableextensions enabledelayedexpansion 14 | 15 | FOR %%A IN ("%~dp0.") DO SET "REPO_ROOT=%%~dpA" 16 | if "%MINIFORGE_HOME%"=="" set "MINIFORGE_HOME=%USERPROFILE%\Miniforge3" 17 | :: Remove trailing backslash, if present 18 | if "%MINIFORGE_HOME:~-1%"=="\" set "MINIFORGE_HOME=%MINIFORGE_HOME:~0,-1%" 19 | call :start_group "Provisioning base env with micromamba" 20 | set "MAMBA_ROOT_PREFIX=%MINIFORGE_HOME%-micromamba-%RANDOM%" 21 | set "MICROMAMBA_VERSION=1.5.10-0" 22 | set "MICROMAMBA_URL=https://github.com/mamba-org/micromamba-releases/releases/download/%MICROMAMBA_VERSION%/micromamba-win-64" 23 | set "MICROMAMBA_TMPDIR=%TMP%\micromamba-%RANDOM%" 24 | set "MICROMAMBA_EXE=%MICROMAMBA_TMPDIR%\micromamba.exe" 25 | 26 | echo Downloading micromamba %MICROMAMBA_VERSION% 27 | if not exist "%MICROMAMBA_TMPDIR%" mkdir "%MICROMAMBA_TMPDIR%" 28 | certutil -urlcache -split -f "%MICROMAMBA_URL%" "%MICROMAMBA_EXE%" 29 | if !errorlevel! neq 0 exit /b !errorlevel! 30 | 31 | echo Creating environment 32 | call "%MICROMAMBA_EXE%" create --yes --root-prefix "%MAMBA_ROOT_PREFIX%" --prefix "%MINIFORGE_HOME%" ^ 33 | --channel conda-forge ^ 34 | pip python=3.12 conda-build conda-forge-ci-setup=4 "conda-build>=24.1" 35 | if !errorlevel! neq 0 exit /b !errorlevel! 36 | echo Removing %MAMBA_ROOT_PREFIX% 37 | del /S /Q "%MAMBA_ROOT_PREFIX%" >nul 38 | del /S /Q "%MICROMAMBA_TMPDIR%" >nul 39 | call :end_group 40 | 41 | call :start_group "Configuring conda" 42 | 43 | :: Activate the base conda environment 44 | echo Activating environment 45 | call "%MINIFORGE_HOME%\Scripts\activate.bat" 46 | :: Configure the solver 47 | set "CONDA_SOLVER=libmamba" 48 | if !errorlevel! neq 0 exit /b !errorlevel! 49 | set "CONDA_LIBMAMBA_SOLVER_NO_CHANNELS_FROM_INSTALLED=1" 50 | 51 | :: Set basic configuration 52 | echo Setting up configuration 53 | setup_conda_rc .\ ".\recipe" .\.ci_support\%CONFIG%.yaml 54 | if !errorlevel! neq 0 exit /b !errorlevel! 55 | echo Running build setup 56 | CALL run_conda_forge_build_setup 57 | 58 | 59 | if !errorlevel! neq 0 exit /b !errorlevel! 60 | 61 | if EXIST LICENSE.txt ( 62 | echo Copying feedstock license 63 | copy LICENSE.txt "recipe\\recipe-scripts-license.txt" 64 | ) 65 | if NOT [%HOST_PLATFORM%] == [%BUILD_PLATFORM%] ( 66 | if [%CROSSCOMPILING_EMULATOR%] == [] ( 67 | set "EXTRA_CB_OPTIONS=%EXTRA_CB_OPTIONS% --no-test" 68 | ) 69 | ) 70 | 71 | if NOT [%flow_run_id%] == [] ( 72 | set "EXTRA_CB_OPTIONS=%EXTRA_CB_OPTIONS% --extra-meta flow_run_id=%flow_run_id% remote_url=%remote_url% sha=%sha%" 73 | ) 74 | 75 | call :end_group 76 | 77 | :: Build the recipe 78 | echo Building recipe 79 | conda-build.exe "recipe" -m .ci_support\%CONFIG%.yaml --suppress-variables %EXTRA_CB_OPTIONS% 80 | if !errorlevel! neq 0 exit /b !errorlevel! 81 | 82 | call :start_group "Inspecting artifacts" 83 | :: inspect_artifacts was only added in conda-forge-ci-setup 4.9.4 84 | WHERE inspect_artifacts >nul 2>nul && inspect_artifacts --recipe-dir ".\recipe" -m .ci_support\%CONFIG%.yaml || echo "inspect_artifacts needs conda-forge-ci-setup >=4.9.4" 85 | call :end_group 86 | 87 | :: Prepare some environment variables for the upload step 88 | if /i "%CI%" == "github_actions" ( 89 | set "FEEDSTOCK_NAME=%GITHUB_REPOSITORY:*/=%" 90 | set "GIT_BRANCH=%GITHUB_REF:refs/heads/=%" 91 | if /i "%GITHUB_EVENT_NAME%" == "pull_request" ( 92 | set "IS_PR_BUILD=True" 93 | ) else ( 94 | set "IS_PR_BUILD=False" 95 | ) 96 | set "TEMP=%RUNNER_TEMP%" 97 | ) 98 | if /i "%CI%" == "azure" ( 99 | set "FEEDSTOCK_NAME=%BUILD_REPOSITORY_NAME:*/=%" 100 | set "GIT_BRANCH=%BUILD_SOURCEBRANCHNAME%" 101 | if /i "%BUILD_REASON%" == "PullRequest" ( 102 | set "IS_PR_BUILD=True" 103 | ) else ( 104 | set "IS_PR_BUILD=False" 105 | ) 106 | set "TEMP=%UPLOAD_TEMP%" 107 | ) 108 | 109 | :: Validate 110 | call :start_group "Validating outputs" 111 | validate_recipe_outputs "%FEEDSTOCK_NAME%" 112 | if !errorlevel! neq 0 exit /b !errorlevel! 113 | call :end_group 114 | 115 | if /i "%UPLOAD_PACKAGES%" == "true" ( 116 | if /i "%IS_PR_BUILD%" == "false" ( 117 | call :start_group "Uploading packages" 118 | if not exist "%TEMP%\" md "%TEMP%" 119 | set "TMP=%TEMP%" 120 | upload_package --validate --feedstock-name="%FEEDSTOCK_NAME%" .\ ".\recipe" .ci_support\%CONFIG%.yaml 121 | if !errorlevel! neq 0 exit /b !errorlevel! 122 | call :end_group 123 | ) 124 | ) 125 | 126 | exit 127 | 128 | :: Logging subroutines 129 | 130 | :start_group 131 | if /i "%CI%" == "github_actions" ( 132 | echo ::group::%~1 133 | exit /b 134 | ) 135 | if /i "%CI%" == "azure" ( 136 | echo ##[group]%~1 137 | exit /b 138 | ) 139 | echo %~1 140 | exit /b 141 | 142 | :end_group 143 | if /i "%CI%" == "github_actions" ( 144 | echo ::endgroup:: 145 | exit /b 146 | ) 147 | if /i "%CI%" == "azure" ( 148 | echo ##[endgroup] 149 | exit /b 150 | ) 151 | exit /b -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | BSD-3-Clause license 2 | Copyright (c) 2015-2022, conda-forge contributors 3 | All rights reserved. 4 | 5 | Redistribution and use in source and binary forms, with or without 6 | modification, are permitted provided that the following conditions are met: 7 | 8 | 1. Redistributions of source code must retain the above copyright notice, 9 | this list of conditions and the following disclaimer. 10 | 2. Redistributions in binary form must reproduce the above copyright 11 | notice, this list of conditions and the following disclaimer in the 12 | documentation and/or other materials provided with the distribution. 13 | 3. Neither the name of the copyright holder nor the names of its 14 | contributors may be used to endorse or promote products derived from 15 | this software without specific prior written permission. 16 | 17 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR 21 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 23 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 24 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 | LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 | OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH 27 | DAMAGE. 28 | -------------------------------------------------------------------------------- /azure-pipelines.yml: -------------------------------------------------------------------------------- 1 | # This file was generated automatically from conda-smithy. To update this configuration, 2 | # update the conda-forge.yml and/or the recipe/meta.yaml. 3 | # -*- mode: yaml -*- 4 | 5 | stages: 6 | - stage: Check 7 | jobs: 8 | - job: Skip 9 | pool: 10 | vmImage: 'ubuntu-22.04' 11 | variables: 12 | DECODE_PERCENTS: 'false' 13 | RET: 'true' 14 | steps: 15 | - checkout: self 16 | fetchDepth: '2' 17 | - bash: | 18 | git_log=`git log --max-count=1 --skip=1 --pretty=format:"%B" | tr "\n" " "` 19 | echo "##vso[task.setvariable variable=log]$git_log" 20 | displayName: Obtain commit message 21 | - bash: echo "##vso[task.setvariable variable=RET]false" 22 | condition: and(eq(variables['Build.Reason'], 'PullRequest'), or(contains(variables.log, '[skip azp]'), contains(variables.log, '[azp skip]'), contains(variables.log, '[skip ci]'), contains(variables.log, '[ci skip]'))) 23 | displayName: Skip build? 24 | - bash: echo "##vso[task.setvariable variable=start_main;isOutput=true]$RET" 25 | name: result 26 | displayName: Export result 27 | - stage: Build 28 | condition: and(succeeded(), eq(dependencies.Check.outputs['Skip.result.start_main'], 'true')) 29 | dependsOn: Check 30 | jobs: 31 | - template: ./.azure-pipelines/azure-pipelines-linux.yml 32 | - template: ./.azure-pipelines/azure-pipelines-osx.yml 33 | - template: ./.azure-pipelines/azure-pipelines-win.yml -------------------------------------------------------------------------------- /build-locally.py: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | """exec" "python3" "$0" "$@" #""" # fmt: off # fmt: on 3 | # 4 | # This file has been generated by conda-smithy in order to build the recipe 5 | # locally. 6 | # 7 | # The line above this comment is a bash / sh / zsh guard 8 | # to stop people from running it with the wrong interpreter 9 | import glob 10 | import os 11 | import platform 12 | import subprocess 13 | import sys 14 | from argparse import ArgumentParser 15 | 16 | 17 | def setup_environment(ns): 18 | os.environ["CONFIG"] = ns.config 19 | os.environ["UPLOAD_PACKAGES"] = "False" 20 | os.environ["IS_PR_BUILD"] = "True" 21 | if ns.debug: 22 | os.environ["BUILD_WITH_CONDA_DEBUG"] = "1" 23 | if ns.output_id: 24 | os.environ["BUILD_OUTPUT_ID"] = ns.output_id 25 | if "MINIFORGE_HOME" not in os.environ: 26 | os.environ["MINIFORGE_HOME"] = os.path.join( 27 | os.path.dirname(__file__), "miniforge3" 28 | ) 29 | 30 | # The default cache location might not be writable using docker on macOS. 31 | if ns.config.startswith("linux") and platform.system() == "Darwin": 32 | os.environ["CONDA_FORGE_DOCKER_RUN_ARGS"] = ( 33 | os.environ.get("CONDA_FORGE_DOCKER_RUN_ARGS", "") 34 | + " -e RATTLER_CACHE_DIR=/tmp/rattler_cache" 35 | ) 36 | 37 | 38 | def run_docker_build(ns): 39 | script = ".scripts/run_docker_build.sh" 40 | subprocess.check_call([script]) 41 | 42 | 43 | def run_osx_build(ns): 44 | script = ".scripts/run_osx_build.sh" 45 | subprocess.check_call([script]) 46 | 47 | 48 | def run_win_build(ns): 49 | script = ".scripts/run_win_build.bat" 50 | subprocess.check_call(["cmd", "/D", "/Q", "/C", f"CALL {script}"]) 51 | 52 | 53 | def verify_config(ns): 54 | choices_filter = ns.filter or "*" 55 | valid_configs = { 56 | os.path.basename(f)[:-5] 57 | for f in glob.glob(f".ci_support/{choices_filter}.yaml") 58 | } 59 | if choices_filter != "*": 60 | print(f"filtering for '{choices_filter}.yaml' configs") 61 | print(f"valid configs are {valid_configs}") 62 | if ns.config in valid_configs: 63 | print("Using " + ns.config + " configuration") 64 | return 65 | elif len(valid_configs) == 1: 66 | ns.config = valid_configs.pop() 67 | print("Found " + ns.config + " configuration") 68 | elif ns.config is None: 69 | print("config not selected, please choose from the following:\n") 70 | selections = list(enumerate(sorted(valid_configs), 1)) 71 | for i, c in selections: 72 | print(f"{i}. {c}") 73 | try: 74 | s = input("\n> ") 75 | except KeyboardInterrupt: 76 | print("\nno option selected, bye!", file=sys.stderr) 77 | sys.exit(1) 78 | idx = int(s) - 1 79 | ns.config = selections[idx][1] 80 | print(f"selected {ns.config}") 81 | else: 82 | raise ValueError("config " + ns.config + " is not valid") 83 | if ( 84 | ns.config.startswith("osx") 85 | and platform.system() == "Darwin" 86 | and not os.environ.get("OSX_SDK_DIR") 87 | ): 88 | raise RuntimeError( 89 | "Need OSX_SDK_DIR env variable set. Run 'export OSX_SDK_DIR=$PWD/SDKs' " 90 | "to download the SDK automatically to '$PWD/SDKs/MacOSX.sdk'. " 91 | "Note: OSX_SDK_DIR must be set to an absolute path. " 92 | "Setting this variable implies agreement to the licensing terms of the SDK by Apple." 93 | ) 94 | 95 | 96 | def main(args=None): 97 | p = ArgumentParser("build-locally") 98 | p.add_argument("config", default=None, nargs="?") 99 | p.add_argument( 100 | "--filter", 101 | default=None, 102 | help="Glob string to filter which build choices are presented in interactive mode.", 103 | ) 104 | p.add_argument( 105 | "--debug", 106 | action="store_true", 107 | help="Setup debug environment using `conda debug`", 108 | ) 109 | p.add_argument( 110 | "--output-id", help="If running debug, specify the output to setup." 111 | ) 112 | 113 | ns = p.parse_args(args=args) 114 | verify_config(ns) 115 | setup_environment(ns) 116 | 117 | try: 118 | if ns.config.startswith("linux") or ( 119 | ns.config.startswith("osx") and platform.system() == "Linux" 120 | ): 121 | run_docker_build(ns) 122 | elif ns.config.startswith("osx"): 123 | run_osx_build(ns) 124 | elif ns.config.startswith("win"): 125 | run_win_build(ns) 126 | finally: 127 | recipe_license_file = os.path.join( 128 | "recipe", "recipe-scripts-license.txt" 129 | ) 130 | if os.path.exists(recipe_license_file): 131 | os.remove(recipe_license_file) 132 | 133 | 134 | if __name__ == "__main__": 135 | main() 136 | -------------------------------------------------------------------------------- /conda-forge.yml: -------------------------------------------------------------------------------- 1 | build_platform: {osx_arm64: osx_64, linux_ppc64le: linux_64, linux_aarch64: linux_64} 2 | conda_forge_output_validation: true 3 | provider: {linux_aarch64: default, linux_ppc64le: native} 4 | bot: 5 | abi_migration_branches: 6 | - '3.8' 7 | - '3.9' 8 | - '3.10' 9 | - '3.11' 10 | - '3.12' 11 | azure: 12 | store_build_artifacts: true 13 | github: 14 | branch_name: main 15 | tooling_branch_name: main 16 | conda_build: 17 | pkg_format: '2' 18 | test: native_and_emulated 19 | -------------------------------------------------------------------------------- /recipe/LICENSE.txt: -------------------------------------------------------------------------------- 1 | BSD 3-clause license 2 | Copyright (c) 2015-2017, conda-forge 3 | All rights reserved. 4 | 5 | Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 6 | 7 | 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 8 | 9 | 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 10 | 11 | 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. 12 | 13 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 14 | -------------------------------------------------------------------------------- /recipe/build_base.bat: -------------------------------------------------------------------------------- 1 | setlocal EnableDelayedExpansion 2 | echo on 3 | 4 | :: Compile python, extensions and external libraries 5 | if "%ARCH%"=="64" ( 6 | set PLATFORM=x64 7 | set VC_PATH=x64 8 | set BUILD_PATH=amd64 9 | ) else ( 10 | set PLATFORM=Win32 11 | set VC_PATH=x86 12 | set BUILD_PATH=win32 13 | ) 14 | 15 | for /F "tokens=1,2 delims=." %%i in ("%PKG_VERSION%") do ( 16 | set "VERNODOTS=%%i%%j" 17 | ) 18 | 19 | for /F "tokens=1,2 delims=." %%i in ("%PKG_VERSION%") do ( 20 | set "VER=%%i.%%j" 21 | ) 22 | 23 | :: Make sure the "python" value in conda_build_config.yaml is up to date. 24 | for /F "tokens=1,2 delims=." %%i in ("%PKG_VERSION%") do ( 25 | if NOT "%PY_VER%"=="%%i.%%j" exit 1 26 | ) 27 | 28 | for /f "usebackq delims=" %%i in (`conda list -p %PREFIX% sqlite --no-show-channel-urls --json ^| findstr "version"`) do set SQLITE3_VERSION_LINE=%%i 29 | for /f "tokens=2 delims==/ " %%i IN ('echo %SQLITE3_VERSION_LINE%') do (set SQLITE3_VERSION=%%~i) 30 | echo SQLITE3_VERSION detected as %SQLITE3_VERSION% 31 | 32 | if "%PY_INTERP_DEBUG%"=="yes" ( 33 | set CONFIG=-d 34 | set _D=_d 35 | ) else ( 36 | set CONFIG= 37 | set _D= 38 | ) 39 | 40 | 41 | if "%DEBUG_C%"=="yes" ( 42 | set PGO= 43 | ) else ( 44 | set PGO=--pgo 45 | ) 46 | 47 | if "%PY_FREETHREADING%" == "yes" ( 48 | set "FREETHREADING=--disable-gil" 49 | set "THREAD=t" 50 | set "EXE_T=%VER%t" 51 | ) else ( 52 | set "FREETHREADING=" 53 | set "THREAD=" 54 | set "EXE_T=" 55 | ) 56 | 57 | :: AP doesn't support PGO atm? 58 | set PGO= 59 | 60 | cd PCbuild 61 | 62 | :: Twice because: 63 | :: error : importlib_zipimport.h updated. You will need to rebuild pythoncore to see the changes. 64 | call build.bat %PGO% %CONFIG% %FREETHREADING% --experimental-jit-off -m -e -v -p %PLATFORM% 65 | call build.bat %PGO% %CONFIG% %FREETHREADING% --experimental-jit-off -m -e -v -p %PLATFORM% 66 | if errorlevel 1 exit 1 67 | cd .. 68 | 69 | :: Populate the root package directory 70 | for %%x in (python%VERNODOTS%%THREAD%%_D%.dll python3%THREAD%%_D%.dll python%EXE_T%%_D%.exe pythonw%EXE_T%%_D%.exe) do ( 71 | if exist %SRC_DIR%\PCbuild\%BUILD_PATH%\%%x ( 72 | copy /Y %SRC_DIR%\PCbuild\%BUILD_PATH%\%%x %PREFIX% 73 | ) else ( 74 | echo "WARNING :: %SRC_DIR%\PCbuild\%BUILD_PATH%\%%x does not exist" 75 | ) 76 | ) 77 | 78 | for %%x in (python%THREAD%%_D%.pdb python%VERNODOTS%%THREAD%%_D%.pdb pythonw%THREAD%%_D%.pdb) do ( 79 | if exist %SRC_DIR%\PCbuild\%BUILD_PATH%\%%x ( 80 | copy /Y %SRC_DIR%\PCbuild\%BUILD_PATH%\%%x %PREFIX% 81 | ) else ( 82 | echo "WARNING :: %SRC_DIR%\PCbuild\%BUILD_PATH%\%%x does not exist" 83 | ) 84 | ) 85 | 86 | @echo on 87 | 88 | copy %SRC_DIR%\LICENSE %PREFIX%\LICENSE_PYTHON.txt 89 | if errorlevel 1 exit 1 90 | 91 | :: Populate the DLLs directory 92 | mkdir %PREFIX%\DLLs 93 | xcopy /s /y %SRC_DIR%\PCBuild\%BUILD_PATH%\*.pyd %PREFIX%\DLLs\ 94 | if errorlevel 1 exit 1 95 | 96 | copy /Y %SRC_DIR%\PC\icons\py.ico %PREFIX%\DLLs\ 97 | if errorlevel 1 exit 1 98 | copy /Y %SRC_DIR%\PC\icons\pyc.ico %PREFIX%\DLLs\ 99 | if errorlevel 1 exit 1 100 | 101 | :: Populate the Tools directory 102 | mkdir %PREFIX%\Tools 103 | xcopy /s /y /i %SRC_DIR%\Tools\i18n %PREFIX%\Tools\i18n 104 | if errorlevel 1 exit 1 105 | xcopy /s /y /i %SRC_DIR%\Tools\scripts %PREFIX%\Tools\scripts 106 | if errorlevel 1 exit 1 107 | 108 | del %PREFIX%\Tools\scripts\README 109 | if errorlevel 1 exit 1 110 | del %PREFIX%\Tools\scripts\idle3 111 | if errorlevel 1 exit 1 112 | 113 | move /y %PREFIX%\Tools\scripts\pydoc3 %PREFIX%\Tools\scripts\pydoc3.py 114 | if errorlevel 1 exit 1 115 | 116 | :: Populate the include directory 117 | xcopy /s /y %SRC_DIR%\Include %PREFIX%\include\ 118 | if errorlevel 1 exit 1 119 | 120 | :: Copy generated pyconfig.h 121 | copy /Y %SRC_DIR%\PCbuild\%BUILD_PATH%\pyconfig.h %PREFIX%\include\ 122 | if errorlevel 1 exit 1 123 | 124 | :: Populate the Scripts directory 125 | if not exist %SCRIPTS% (mkdir %SCRIPTS%) 126 | if errorlevel 1 exit 1 127 | 128 | for %%x in (idle pydoc) do ( 129 | copy /Y %SRC_DIR%\Tools\scripts\%%x3 %SCRIPTS%\%%x 130 | if errorlevel 1 exit 1 131 | ) 132 | 133 | :: Populate the libs directory 134 | if not exist %PREFIX%\libs mkdir %PREFIX%\libs 135 | dir %SRC_DIR%\PCbuild\%BUILD_PATH%\ 136 | 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\ 137 | if errorlevel 1 exit 1 138 | if exist %SRC_DIR%\PCbuild\%BUILD_PATH%\python3%THREAD%%_D%.lib copy /Y %SRC_DIR%\PCbuild\%BUILD_PATH%\python3%THREAD%%_D%.lib %PREFIX%\libs\ 139 | if errorlevel 1 exit 1 140 | if exist %SRC_DIR%\PCbuild\%BUILD_PATH%\_tkinter%THREAD%%_D%.lib copy /Y %SRC_DIR%\PCbuild\%BUILD_PATH%\_tkinter%THREAD%%_D%.lib %PREFIX%\libs\ 141 | if errorlevel 1 exit 1 142 | 143 | 144 | :: Populate the Lib directory 145 | del %PREFIX%\libs\libpython*.a 146 | xcopy /s /y %SRC_DIR%\Lib %PREFIX%\Lib\ 147 | if errorlevel 1 exit 1 148 | 149 | :: Copy venv[w]launcher scripts to venv\srcipts\nt 150 | :: See https://github.com/python/cpython/blob/b4a316087c32d83e375087fd35fc511bc430ee8b/Lib/venv/__init__.py#L334-L376 151 | if exist %SRC_DIR%\PCbuild\%BUILD_PATH%\venvlauncher%THREAD%%_D%.exe ( 152 | @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? 153 | copy /Y %SRC_DIR%\PCbuild\%BUILD_PATH%\venvlauncher%THREAD%%_D%.exe %PREFIX%\Lib\venv\scripts\nt\python.exe 154 | copy /Y %SRC_DIR%\PCbuild\%BUILD_PATH%\venvlauncher%THREAD%%_D%.exe %PREFIX%\Lib\venv\scripts\nt\venvlauncher%THREAD%%_D%.exe 155 | ) else ( 156 | echo "WARNING :: %SRC_DIR%\PCbuild\%BUILD_PATH%\venvlauncher%THREAD%%_D%.exe does not exist" 157 | ) 158 | 159 | if exist %SRC_DIR%\PCbuild\%BUILD_PATH%\venvwlauncher%THREAD%%_D%.exe ( 160 | @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? 161 | copy /Y %SRC_DIR%\PCbuild\%BUILD_PATH%\venvwlauncher%THREAD%%_D%.exe %PREFIX%\Lib\venv\scripts\nt\pythonw.exe 162 | copy /Y %SRC_DIR%\PCbuild\%BUILD_PATH%\venvwlauncher%THREAD%%_D%.exe %PREFIX%\Lib\venv\scripts\nt\venvwlauncher%THREAD%%_D%.exe 163 | ) else ( 164 | echo "WARNING :: %SRC_DIR%\PCbuild\%BUILD_PATH%\venvwlauncher%THREAD%%_D%.exe does not exist" 165 | ) 166 | 167 | :: Remove test data to save space. 168 | :: Though keep `support` as some things use that. 169 | mkdir %PREFIX%\Lib\test_keep 170 | if errorlevel 1 exit 1 171 | move %PREFIX%\Lib\test\__init__.py %PREFIX%\Lib\test_keep\ 172 | if errorlevel 1 exit 1 173 | move %PREFIX%\Lib\test\support %PREFIX%\Lib\test_keep\ 174 | if errorlevel 1 exit 1 175 | rd /s /q %PREFIX%\Lib\test 176 | if errorlevel 1 exit 1 177 | move %PREFIX%\Lib\test_keep %PREFIX%\Lib\test 178 | if errorlevel 1 exit 1 179 | 180 | :: We need our Python to be found! 181 | if "%_D%" neq "" copy %PREFIX%\python%_D%.exe %PREFIX%\python.exe 182 | if "%EXE_T%" neq "" copy %PREFIX%\python%EXE_T%.exe %PREFIX%\python.exe 183 | 184 | :: bytecode compile the standard library 185 | %PREFIX%\python.exe -Wi %PREFIX%\Lib\compileall.py -f -q -x "bad_coding|badsyntax|py2_" %PREFIX%\Lib 186 | if errorlevel 1 exit 1 187 | 188 | :: Ensure that scripts are generated 189 | :: https://github.com/conda-forge/python-feedstock/issues/384 190 | %PREFIX%\python.exe %RECIPE_DIR%\fix_staged_scripts.py 191 | if errorlevel 1 exit 1 192 | 193 | :: Some quick tests for common failures 194 | echo "Testing print() does not print: Hello" 195 | %PREFIX%\python.exe -c "print()" 2>&1 | findstr /r /c:"Hello" 196 | if %errorlevel% neq 1 exit /b 1 197 | 198 | echo "Testing print('Hello') prints: Hello" 199 | %PREFIX%\python.exe -c "print('Hello')" 2>&1 | findstr /r /c:"Hello" 200 | if %errorlevel% neq 0 exit /b 1 201 | 202 | echo "Testing import of os (no DLL needed) does not print: The specified module could not be found" 203 | %PREFIX%\python.exe -v -c "import os" 2>&1 204 | %PREFIX%\python.exe -v -c "import os" 2>&1 | findstr /r /c:"The specified module could not be found" 205 | if %errorlevel% neq 1 exit /b 1 206 | 207 | echo "Testing import of _sqlite3 (DLL located via PATH needed) does not print: The specified module could not be found" 208 | %PREFIX%\python.exe -v -c "import _sqlite3" 2>&1 209 | %PREFIX%\python.exe -v -c "import _sqlite3" 2>&1 | findstr /r /c:"The specified module could not be found" 210 | if %errorlevel% neq 1 exit /b 1 211 | -------------------------------------------------------------------------------- /recipe/build_static.bat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/conda-forge/python-feedstock/a9c2dde0e7719d4517d198fe8f8420933a51c5c7/recipe/build_static.bat -------------------------------------------------------------------------------- /recipe/build_static.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -ex 3 | 4 | _buildd_static=build-static 5 | _buildd_shared=build-shared 6 | if [[ ${PY_INTERP_DEBUG} == yes ]]; then 7 | DBG=d 8 | else 9 | DBG= 10 | fi 11 | if [[ ${PY_FREETHREADING} == yes ]]; then 12 | # This Python will not be usable with non-free threading Python modules. 13 | THREAD=t 14 | else 15 | THREAD= 16 | fi 17 | 18 | VER=${PKG_VERSION%.*} 19 | ABIFLAGS=${DBG}${THREAD} 20 | VERABI=${VER}${THREAD}${DBG} 21 | VERABI_NO_DBG=${VER}${THREAD} 22 | 23 | cp -pf ${_buildd_static}/libpython${VERABI}.a ${PREFIX}/lib/libpython${VERABI}.a 24 | if [[ ${HOST} =~ .*linux.* ]]; then 25 | pushd ${PREFIX}/lib/python${VERABI_NO_DBG}/config-${VERABI}-${HOST/-conda/} 26 | elif [[ ${HOST} =~ .*darwin.* ]]; then 27 | pushd ${PREFIX}/lib/python${VERABI_NO_DBG}/config-${VERABI}-darwin 28 | fi 29 | ln -s ../../libpython${VERABI}.a libpython${VERABI}.a 30 | popd 31 | # If the LTO info in the normal lib is problematic (using different compilers for example 32 | # we also provide a 'nolto' version). 33 | cp -pf ${_buildd_shared}/libpython${VERABI_NO_DBG}-pic.a ${PREFIX}/lib/libpython${VERABI_NO_DBG}.nolto.a 34 | -------------------------------------------------------------------------------- /recipe/conda_build_config.yaml: -------------------------------------------------------------------------------- 1 | MACOSX_SDK_VERSION: # [osx and x86_64] 2 | - 11.0 # [osx and x86_64] 3 | 4 | # Override Python `zip_keys` 5 | python: 6 | - 3.13 7 | numpy: 8 | - 1.16 9 | python_impl: 10 | - cpython 11 | is_python_min: 12 | - no 13 | 14 | # Whether to build free-threaded Python (3.13+) 15 | freethreading: 16 | - yes 17 | - no 18 | 19 | # Use Python RC components in build 20 | channel_sources: 21 | - conda-forge/label/python_rc,conda-forge 22 | 23 | # Configuration for debug and release builds 24 | build_type: 25 | - release 26 | - debug # [not win] 27 | channel_targets: 28 | - conda-forge main 29 | - conda-forge python_debug # [not win] 30 | zip_keys: 31 | - build_type 32 | - channel_targets 33 | -------------------------------------------------------------------------------- /recipe/fix_staged_scripts.py: -------------------------------------------------------------------------------- 1 | from os.path import isdir, isfile, dirname, join 2 | 3 | import os 4 | import shutil 5 | 6 | 7 | # Taken and adapted from conda_build/windows.py 8 | def fix_staged_scripts(scripts_dir): 9 | """ 10 | Fixes scripts which have been installed unix-style to have a .bat 11 | helper 12 | """ 13 | if not isdir(scripts_dir): 14 | return 15 | for fn in os.listdir(scripts_dir): 16 | # process all the extensionless files 17 | if not isfile(join(scripts_dir, fn)) or '.' in fn: 18 | continue 19 | 20 | # read as binary file to ensure we don't run into encoding errors, see #1632 21 | with open(join(scripts_dir, fn), 'rb') as f: 22 | line = f.readline() 23 | # If it's a #!python script 24 | if not (line.startswith(b'#!') and b'python' in line.lower()): 25 | continue 26 | print('Adjusting unix-style #! script %s, ' 27 | 'and adding a .bat file for it' % fn) 28 | # copy it with a .py extension (skipping that first #! line) 29 | with open(join(scripts_dir, fn + '-script.py'), 'wb') as fo: 30 | fo.write(f.read()) 31 | # now create the .exe file 32 | # This is hardcoded that conda and conda-build are in the same environment 33 | base_env = dirname(dirname(os.environ['CONDA_EXE'])) 34 | exe = join(base_env, 'lib', 'site-packages', 'conda_build', 'cli-64.exe') 35 | shutil.copyfile(exe, join(scripts_dir, fn + '.exe')) 36 | 37 | # remove the original script 38 | os.remove(join(scripts_dir, fn)) 39 | 40 | 41 | fix_staged_scripts(os.environ['SCRIPTS']) 42 | -------------------------------------------------------------------------------- /recipe/install_jit_activation.bat: -------------------------------------------------------------------------------- 1 | @echo on 2 | 3 | :: Copy the [de]activate scripts to %PREFIX%\etc\conda\[de]activate.d. 4 | :: This will allow them to be run on environment activation. 5 | if not exist %PREFIX%\etc\conda\activate.d mkdir %PREFIX%\etc\conda\activate.d 6 | copy %RECIPE_DIR%\scripts\activate.bat %PREFIX%\etc\conda\activate.d\%PKG_NAME%_activate.bat 7 | if errorlevel 1 exit 1 8 | :: We also copy .sh scripts to be able to use them with POSIX CLI on Windows. 9 | copy %RECIPE_DIR%\scripts\activate.sh %PREFIX%\etc\conda\activate.d\%PKG_NAME%_activate.sh 10 | if errorlevel 1 exit 1 11 | 12 | if not exist %PREFIX%\etc\conda\deactivate.d mkdir %PREFIX%\etc\conda\deactivate.d 13 | copy %RECIPE_DIR%\scripts\deactivate.bat %PREFIX%\etc\conda\deactivate.d\%PKG_NAME%_deactivate.bat 14 | if errorlevel 1 exit 1 15 | copy %RECIPE_DIR%\scripts\deactivate.sh %PREFIX%\etc\conda\deactivate.d\%PKG_NAME%_deactivate.sh 16 | if errorlevel 1 exit 1 17 | -------------------------------------------------------------------------------- /recipe/install_jit_activation.sh: -------------------------------------------------------------------------------- 1 | # Copy the [de]activate scripts to $PREFIX/etc/conda/[de]activate.d. 2 | # This will allow them to be run on environment activation. 3 | for CHANGE in "activate" "deactivate" 4 | do 5 | mkdir -p "${PREFIX}/etc/conda/${CHANGE}.d" 6 | cp "${RECIPE_DIR}/scripts/${CHANGE}.sh" "${PREFIX}/etc/conda/${CHANGE}.d/${PKG_NAME}_${CHANGE}.sh" 7 | done 8 | -------------------------------------------------------------------------------- /recipe/meta.yaml: -------------------------------------------------------------------------------- 1 | {% set version = "3.13.3" %} 2 | {% set dev = "" %} 3 | {% set dev_ = "" %} 4 | {% set ver2 = '.'.join(version.split('.')[0:2]) %} 5 | {% set ver2nd = ''.join(version.split('.')[0:2]) %} 6 | {% set ver3nd = ''.join(version.split('.')[0:3]) %} 7 | {% set build_number = 1 %} 8 | 9 | # this makes the linter happy 10 | {% set channel_targets = channel_targets or 'conda-forge main' %} 11 | 12 | # Sanitize build system env. var tweak parameters 13 | # (passed to the build scripts via script_env). 14 | {% if freethreading is not defined %} 15 | {% set freethreading = "yes" %} 16 | {% endif %} 17 | 18 | {% set abi_tag = "cp" + ver2nd %} 19 | # freethreading, set using conda_build_config.yaml 20 | {% if freethreading == "yes" %} 21 | {% set abi_tag = abi_tag + "t" %} 22 | {% else %} 23 | {% set build_number = build_number + 100 %} 24 | {% endif %} 25 | 26 | {% if build_type == "debug" %} 27 | {% set py_interp_debug = "yes" %} 28 | {% set debug = "_debug" %} 29 | {% else %} 30 | {% set py_interp_debug = "no" %} 31 | {% set debug = "" %} 32 | {% endif %} 33 | 34 | {% if win %} 35 | {% set site_packages_path = "Lib/site-packages" %} 36 | {% elif freethreading == "yes" %} 37 | {% set site_packages_path = "lib/python" + ver2 + "t/site-packages" %} 38 | {% else %} 39 | {% set site_packages_path = "lib/python" + ver2 + "/site-packages" %} 40 | {% endif %} 41 | 42 | package: 43 | name: python-split 44 | version: {{ version }}{{ dev }} 45 | 46 | source: 47 | - url: https://www.python.org/ftp/python/{{ version }}/Python-{{ version }}{{ dev }}.tar.xz 48 | # md5 from: https://www.python.org/downloads/release/python-{{ ver3nd }}{{ dev }}/ 49 | md5: 8bb5f0b8c9d9d7b87d7d98510e8d58e5 50 | patches: 51 | - patches/0001-Win32-Change-FD_SETSIZE-from-512-to-2048.patch 52 | - patches/0002-Win32-Do-not-download-externals.patch 53 | - patches/0003-Fix-find_library-so-that-it-looks-in-sys.prefix-lib-.patch 54 | - patches/0004-Disable-registry-lookup-unless-CONDA_PY_ALLOW_REG_PA.patch 55 | - patches/0005-Unvendor-openssl.patch 56 | - patches/0006-Unvendor-sqlite3.patch 57 | - patches/0007-Add-CondaEcosystemModifyDllSearchPath.patch 58 | - patches/0008-Doing-d1trimfile.patch 59 | # https://github.com/python/cpython/pull/23523 60 | - patches/0009-cross-compile-darwin.patch 61 | - patches/0010-Fix-TZPATH-on-windows.patch 62 | # https://github.com/python/cpython/pull/24324 63 | - patches/0011-Make-dyld-search-work-with-SYSTEM_VERSION_COMPAT-1.patch 64 | - patches/0012-Unvendor-bzip2.patch 65 | - patches/0013-Unvendor-libffi.patch 66 | - patches/0014-Unvendor-tcltk.patch 67 | - patches/0015-unvendor-xz.patch 68 | - patches/0016-unvendor-zlib.patch 69 | - patches/0017-Do-not-pass-g-to-GCC-when-not-Py_DEBUG.patch 70 | - patches/0018-Unvendor-expat.patch 71 | - patches/0019-Remove-unused-readelf.patch 72 | - patches/0020-Don-t-checksharedmods-if-cross-compiling.patch 73 | - patches/0021-Override-configure-LIBFFI.patch 74 | - patches/0022-Unvendor-libmpdec.patch 75 | {% if 'conda-forge' in channel_targets %} 76 | - patches/0023-Brand-conda-forge.patch 77 | {% endif %} 78 | - patches/0024-Do-not-define-pid_t-as-it-might-conflict-with-the-ac.patch 79 | 80 | build: 81 | number: {{ build_number }} 82 | 83 | requirements: 84 | build: 85 | - patch # [not win] 86 | - m2-patch # [win] 87 | - m2-gcc-libs # [win] 88 | 89 | outputs: 90 | - name: python 91 | script: build_base.sh # [unix] 92 | script: build_base.bat # [win] 93 | build: 94 | number: {{ build_number }} 95 | activate_in_script: true 96 | # Windows has issues updating python if conda is using files itself. 97 | # Copy rather than link. 98 | no_link: 99 | - DLLs/_ctypes.pyd # [win] 100 | ignore_run_exports_from: 101 | # C++ only installed so CXX is defined for distutils/sysconfig. 102 | - {{ compiler('cxx') }} # [unix] 103 | # These two are just to get the headers needed for tk.h, but is unused 104 | - xorg-libx11 105 | - xorg-xorgproto 106 | # Disabled until verified to work correctly 107 | detect_binary_files_with_prefix: true 108 | # detect_binary_files_with_prefix: False 109 | # binary_has_prefix_files: 110 | # - lib/libpython{{ ver2 }}.*.1.0 111 | # - bin/python{{ ver2 }} # [linux] 112 | # - lib/libpython{{ ver2 }}.a # [linux] 113 | # - lib/libpython{{ ver2 }}.nolto.a # [linux] 114 | # - lib/libpython3.so # [linux] 115 | # - lib/python{{ ver2 }}/lib-dynload/_hashlib.cpython-{{ ver2nd }}-x86_64-linux-gnu.so # [linux] 116 | # - lib/libpython3.dylib # [osx] 117 | # match python.org compiler standard 118 | skip: true # [win and int(float(vc)) < 14] 119 | skip_compile_pyc: 120 | - '*.py' # [build_platform != target_platform] 121 | string: {{ dev_ }}h{{ PKG_HASH }}_{{ PKG_BUILDNUM }}{{ debug }}_{{ abi_tag }} 122 | python_site_packages_path: {{ site_packages_path }} 123 | run_exports: 124 | noarch: 125 | - python 126 | weak: 127 | - python_abi {{ ver2 }}.* *_{{ abi_tag }} 128 | {% if py_interp_debug == "yes" %} 129 | - python {{ ver2 }}.* *_debug_{{ abi_tag }} 130 | {% endif %} 131 | track_features: 132 | {% if freethreading == "yes" %} 133 | - py_freethreading 134 | {% endif %} 135 | script_env: 136 | - PY_INTERP_DEBUG={{ py_interp_debug }} 137 | - PY_FREETHREADING={{ freethreading }} 138 | # Putting these here means they get emitted to build_env_setup.{sh,bat} meaning we can launch IDEs 139 | # after sourcing or calling that script without examine the contents of conda_build.{sh,bat} for 140 | # important env. vars. 141 | missing_dso_whitelist: # [win] 142 | - '**/MSVCR71.dll' # [win] 143 | - '**/MSVCR80.dll' # [win] 144 | # I have no idea why this is not in C:\Windows\System32\downlevel 145 | - '**/api-ms-win-core-path-l1-1-0.dll' # [win] 146 | requirements: 147 | build: 148 | - {{ compiler('c') }} 149 | - {{ stdlib('c') }} 150 | - {{ compiler('cxx') }} 151 | - make # [not win] 152 | - libtool # [unix] 153 | - pkg-config # [not win] 154 | # configure script looks for llvm-ar for lto 155 | - llvm-tools # [osx] 156 | - ld_impl_{{ target_platform }} # [linux] 157 | - binutils_impl_{{ target_platform }} # [linux] 158 | - clang-18 # [not win] 159 | - llvm-tools-18 # [not win] 160 | - clang 18.* # [win] 161 | - llvm-tools 18.* # [win] 162 | - bzip2 # [build_platform != target_platform] 163 | - sqlite # [build_platform != target_platform] 164 | - liblzma-devel # [build_platform != target_platform] 165 | - zlib # [build_platform != target_platform] 166 | - openssl # [build_platform != target_platform] 167 | - readline # [not win and build_platform != target_platform] 168 | - tk # [build_platform != target_platform] 169 | - ncurses # [unix and build_platform != target_platform] 170 | - libffi # [build_platform != target_platform] 171 | - libuuid # [linux and build_platform != target_platform] 172 | - libxcrypt # [linux and build_platform != target_platform] 173 | - expat # [build_platform != target_platform] 174 | host: 175 | - bzip2 176 | - sqlite 177 | - liblzma-devel 178 | - zlib 179 | - openssl 180 | - readline # [not win] 181 | - tk 182 | # These two are just to get the headers needed for tk.h, but is unused 183 | - xorg-libx11 184 | - xorg-xorgproto 185 | - ncurses # [unix] 186 | - libffi 187 | - ld_impl_{{ target_platform }} >=2.36.1 # [linux] 188 | - libuuid # [linux] 189 | - libmpdec-devel 190 | - expat 191 | run: 192 | - ld_impl_{{ target_platform }} >=2.36.1 # [linux] 193 | - tzdata 194 | {% if dev != '' %} 195 | - _python_rc 196 | {% endif %} 197 | - python_abi {{ ver2 }}.* *_{{ abi_tag }} 198 | test: 199 | downstreams: 200 | {% if freethreading == "yes" %} 201 | - cython >=3.1.0.a0 202 | {% else %} 203 | - cython 204 | {% endif %} 205 | - setuptools 206 | requires: 207 | - ripgrep 208 | - cmake 209 | - ninja 210 | - {{ compiler('c') }} 211 | # Tried to use enable_language(C) to avoid needing this. It does not work. 212 | - {{ compiler('cxx') }} 213 | files: 214 | - tests/cmake/* 215 | - tests/cython/* 216 | - tests/prefix-replacement/* 217 | - run_test.py 218 | commands: 219 | - echo on # [win] 220 | - set # [win] 221 | - python -V 222 | - python3 -V # [not win] 223 | - pydoc -h 224 | - python3-config --help # [not win] 225 | - set "PIP_NO_BUILD_ISOLATION=False" # [win] 226 | - set "PIP_NO_DEPENDENCIES=True" # [win] 227 | - set "PIP_IGNORE_INSTALLED=True" # [win] 228 | - set "PIP_NO_INDEX=True" # [win] 229 | - set "PIP_CACHE_DIR=%CONDA_PREFIX%/pip_cache" # [win] 230 | - set "TEMP=%CONDA_PREFIX%/tmp" # [win] 231 | - mkdir "%TEMP%" # [win] 232 | - python -Im ensurepip --upgrade --default-pip # [win] 233 | # tzdata/zoneinfo test that will need the tzdata package to pass 234 | - python -c "from zoneinfo import ZoneInfo; from datetime import datetime; dt = datetime(2020, 10, 31, 12, tzinfo=ZoneInfo('America/Los_Angeles')); print(dt.tzname())" 235 | - python -m venv test-venv 236 | - test-venv\\Scripts\\python.exe -c "import ctypes" # [win] 237 | - test-venv/bin/python -c "import ctypes" # [unix] 238 | - python -c "import sysconfig; print(sysconfig.get_config_var('CC'))" # [not win] 239 | - _CONDA_PYTHON_SYSCONFIGDATA_NAME=_sysconfigdata_x86_64_conda_cos6_linux_gnu python -c "import sysconfig; print(sysconfig.get_config_var('CC'))" # [linux64] 240 | # check for unreplaced @ symbols in sysconfig files, excluding e.g. '"$@".lto' 241 | - for f in ${CONDA_PREFIX}/lib/python*/_sysconfig*.py; do echo "Checking $f:"; if [[ `rg @[^@]*@ $f` ]]; then echo "FAILED ON $f"; cat $f; exit 1; fi; done # [linux64 or osx] 242 | - test ! -f ${PREFIX}/lib/libpython${PKG_VERSION%.*}.a # [unix] 243 | - test ! -f ${PREFIX}/lib/libpython${PKG_VERSION%.*}.nolto.a # [unix] 244 | {% if freethreading == "yes" %} 245 | - if not exist %PREFIX%\\libs\\python3t.lib exit 1 # [win] 246 | - if not exist %PREFIX%\\libs\\python{{ ver2nd }}t.lib exit 1 # [win] 247 | {% else %} 248 | - if not exist %PREFIX%\\libs\\python3.lib exit 1 # [win] 249 | - if not exist %PREFIX%\\libs\\python{{ ver2nd }}.lib exit 1 # [win] 250 | {% endif %} 251 | # https://github.com/conda-forge/python-feedstock/issues/384 252 | - if exist %PREFIX%\\Scripts\\pydoc exit 1 # [win] 253 | - if exist %PREFIX%\\Scripts\\idle exit 1 # [win] 254 | - if not exist %PREFIX%\\Scripts\\pydoc-script.py exit 1 # [win] 255 | - if not exist %PREFIX%\\Scripts\\idle-script.py exit 1 # [win] 256 | - if not exist %PREFIX%\\Scripts\\idle.exe exit 1 # [win] 257 | - if not exist %PREFIX%\\Scripts\\pydoc.exe exit 1 # [win] 258 | - if not exist %PREFIX%\\include\\pyconfig.h exit 1 # [win] 259 | - pushd tests 260 | - pushd prefix-replacement # [unix] 261 | - bash build-and-test.sh # [unix] 262 | - popd # [unix] 263 | - pushd cmake 264 | {% if freethreading == "no" %} 265 | # TODO: use the new FindPython3 which supports freethreading 266 | - cmake -GNinja -DPY_VER={{ version }} --debug-find --trace --debug-output --debug-trycompile . 267 | {% endif %} 268 | - popd 269 | - popd 270 | - python run_test.py 271 | - test ! -f default.profraw # [osx] 272 | - python3.1 --version # [unix] 273 | # Test for segfault on osx-64 with libffi=3.4, see https://bugs.python.org/issue44556 274 | - python -c "from ctypes import CFUNCTYPE; CFUNCTYPE(None)(id)" 275 | # Test for wide character supported via ncursesw 276 | - TERM=xterm >/dev/null python -c "import curses; scr = curses.initscr(); curses.unget_wch('x'); assert 'x' == scr.get_wch()" # [unix] 277 | 278 | - name: libpython-static 279 | script: build_static.sh # [unix] 280 | script: build_static.bat # [win] 281 | build: 282 | number: {{ build_number }} 283 | activate_in_script: true 284 | ignore_run_exports: 285 | - python_abi 286 | script_env: 287 | - PY_INTERP_DEBUG={{ py_interp_debug }} 288 | - PY_FREETHREADING={{ freethreading }} 289 | string: h{{ PKG_HASH }}_{{ PKG_BUILDNUM }}{{ debug }}_{{ abi_tag }} 290 | requirements: 291 | build: 292 | - {{ compiler('c') }} 293 | - {{ stdlib('c') }} 294 | - {{ compiler('cxx') }} 295 | host: 296 | - {{ pin_subpackage('python', exact=True) }} 297 | run: 298 | - {{ pin_subpackage('python', exact=True) }} 299 | test: 300 | files: 301 | - tests/prefix-replacement/* 302 | requires: 303 | - {{ compiler('c') }} 304 | commands: 305 | - VER=${PKG_VERSION%.*} # [not win] 306 | - VERABI=${VER} # [not win] 307 | {% if freethreading == "yes" %} 308 | - VERABI=${VERABI}t # [not win] 309 | {% endif %} 310 | - VERABI_NO_DBG=${VERABI} # [not win] 311 | {% if py_interp_debug == "yes" %} 312 | - VERABI=${VERABI}d # [not win] 313 | {% endif %} 314 | - test -f ${PREFIX}/lib/libpython${VERABI}.a # [unix] 315 | - test -f ${PREFIX}/lib/libpython${VERABI_NO_DBG}.nolto.a # [unix] 316 | - test -f ${PREFIX}/lib/python${VERABI_NO_DBG}/config-${VERABI}-darwin/libpython${VERABI}.a # [osx] 317 | - pushd tests/prefix-replacement # [unix] 318 | - bash build-and-test.sh # [unix] 319 | - popd # [unix] 320 | 321 | - name: cpython 322 | build: 323 | noarch: generic 324 | requirements: 325 | - python {{ version }}.* 326 | - python_abi * *_{{ abi_tag }} 327 | 328 | - name: python-freethreading 329 | build: 330 | noarch: generic 331 | {% if freethreading != "yes" %} 332 | skip: True 333 | {% endif %} 334 | requirements: 335 | - cpython {{ version }}.* 336 | - python_abi * *_{{ abi_tag }} 337 | 338 | - name: python-gil 339 | build: 340 | noarch: generic 341 | {% if freethreading == "yes" %} 342 | skip: True 343 | {% endif %} 344 | requirements: 345 | - cpython {{ version }}.* 346 | - python_abi * *_{{ abi_tag }} 347 | 348 | - name: python-jit 349 | script: install_jit_activation.sh # [not win] 350 | script: install_jit_activation.bat # [win] 351 | build: 352 | noarch: generic 353 | requirements: 354 | - cpython {{ version }}.* 355 | - __unix # [unix] 356 | - __win # [win] 357 | 358 | about: 359 | home: https://www.python.org/ 360 | license: Python-2.0 361 | license_file: LICENSE 362 | summary: General purpose programming language 363 | description: | 364 | Python is a widely used high-level, general-purpose, interpreted, dynamic 365 | programming language. Its design philosophy emphasizes code 366 | readability, and its syntax allows programmers to express concepts in 367 | fewer lines of code than would be possible in languages such as C++ or 368 | Java. The language provides constructs intended to enable clear programs 369 | on both a small and large scale. 370 | 371 | We provide some meta packages for convenience. 372 | To get a CPython flavour, use: 373 | 374 | conda install cpython 375 | 376 | To get the freethreading build (i.e. without the Global Interpreter Lock - GIL): 377 | 378 | conda install python-freethreading 379 | 380 | To get the default build (i.e. with the GIL): 381 | 382 | conda install python-gil 383 | 384 | To enable the use of the experimental JIT compiler in CPython: 385 | 386 | conda install python-jit 387 | 388 | or set the environment variable PYTHON_JIT=1. Note that the JIT support 389 | is available for x86_64 builds only. 390 | 391 | doc_url: https://www.python.org/doc/versions/ 392 | doc_source_url: https://github.com/python/pythondotorg/blob/master/docs/source/index.rst 393 | dev_url: https://docs.python.org/devguide/ 394 | 395 | extra: 396 | feedstock-name: python 397 | recipe-maintainers: 398 | - chrisburr 399 | - isuruf 400 | - jakirkham 401 | - mbargull 402 | - msarahan 403 | - pelson 404 | - ocefpaf 405 | - scopatz 406 | - katietz 407 | - xhochy 408 | -------------------------------------------------------------------------------- /recipe/patches/0001-Win32-Change-FD_SETSIZE-from-512-to-2048.patch: -------------------------------------------------------------------------------- 1 | From b2dc38f831aa57016c7197a902310119c72a1b73 Mon Sep 17 00:00:00 2001 2 | From: Ray Donnelly 3 | Date: Wed, 16 Aug 2017 11:53:55 +0100 4 | Subject: [PATCH 01/24] Win32: Change FD_SETSIZE from 512 to 2048 5 | 6 | https://github.com/ContinuumIO/anaconda-issues/issues/1241 7 | --- 8 | Modules/selectmodule.c | 2 +- 9 | 1 file changed, 1 insertion(+), 1 deletion(-) 10 | 11 | diff --git a/Modules/selectmodule.c b/Modules/selectmodule.c 12 | index 5bd9b7732a4..504f79e8998 100644 13 | --- a/Modules/selectmodule.c 14 | +++ b/Modules/selectmodule.c 15 | @@ -45,7 +45,7 @@ 16 | FD_SETSIZE higher before this; e.g., via compiler /D switch. 17 | */ 18 | #if defined(MS_WINDOWS) && !defined(FD_SETSIZE) 19 | -#define FD_SETSIZE 512 20 | +#define FD_SETSIZE 2048 21 | #endif 22 | 23 | #if defined(HAVE_POLL_H) 24 | -------------------------------------------------------------------------------- /recipe/patches/0002-Win32-Do-not-download-externals.patch: -------------------------------------------------------------------------------- 1 | From 6b2be09a90969918df41b16e3f04c6d65c8d618b Mon Sep 17 00:00:00 2001 2 | From: Ray Donnelly 3 | Date: Thu, 7 Sep 2017 11:35:47 +0100 4 | Subject: [PATCH 02/24] Win32: Do not download externals 5 | 6 | --- 7 | PCbuild/build.bat | 4 ++-- 8 | 1 file changed, 2 insertions(+), 2 deletions(-) 9 | 10 | diff --git a/PCbuild/build.bat b/PCbuild/build.bat 11 | index 6c76f09a071..3dc802b8cef 100644 12 | --- a/PCbuild/build.bat 13 | +++ b/PCbuild/build.bat 14 | @@ -102,7 +102,7 @@ if "%~1"=="--no-ctypes" (set IncludeCTypes=false) & shift & goto CheckOpts 15 | if "%~1"=="--no-ssl" (set IncludeSSL=false) & shift & goto CheckOpts 16 | if "%~1"=="--no-tkinter" (set IncludeTkinter=false) & shift & goto CheckOpts 17 | 18 | -if "%IncludeExternals%"=="" set IncludeExternals=true 19 | +@rem if "%IncludeExternals%"=="" set IncludeExternals=true 20 | if "%IncludeCTypes%"=="" set IncludeCTypes=true 21 | if "%IncludeSSL%"=="" set IncludeSSL=true 22 | if "%IncludeTkinter%"=="" set IncludeTkinter=true 23 | @@ -196,4 +196,4 @@ rem Display the current build version information 24 | call "%dir%find_msbuild.bat" %MSBUILD% 25 | if ERRORLEVEL 1 (echo Cannot locate MSBuild.exe on PATH or as MSBUILD variable & exit /b 2) 26 | %MSBUILD% "%dir%pythoncore.vcxproj" /t:ShowVersionInfo /v:m /nologo %1 %2 %3 %4 %5 %6 %7 %8 %9 27 | -if ERRORLEVEL 1 exit /b 3 28 | \ No newline at end of file 29 | +if ERRORLEVEL 1 exit /b 3 30 | -------------------------------------------------------------------------------- /recipe/patches/0003-Fix-find_library-so-that-it-looks-in-sys.prefix-lib-.patch: -------------------------------------------------------------------------------- 1 | From d949c804acdacbc1e47de8e5aedc6c2ab3cbed5e Mon Sep 17 00:00:00 2001 2 | From: Ray Donnelly 3 | Date: Tue, 5 Dec 2017 22:47:59 +0000 4 | Subject: [PATCH 03/24] Fix find_library so that it looks in sys.prefix/lib 5 | first 6 | 7 | --- 8 | Lib/ctypes/macholib/dyld.py | 4 ++++ 9 | Lib/ctypes/util.py | 27 ++++++++++++++++++++++++--- 10 | 2 files changed, 28 insertions(+), 3 deletions(-) 11 | 12 | diff --git a/Lib/ctypes/macholib/dyld.py b/Lib/ctypes/macholib/dyld.py 13 | index 583c47daff3..ab9b01c87e2 100644 14 | --- a/Lib/ctypes/macholib/dyld.py 15 | +++ b/Lib/ctypes/macholib/dyld.py 16 | @@ -93,6 +93,10 @@ def dyld_executable_path_search(name, executable_path=None): 17 | # If we haven't done any searching and found a library and the 18 | # dylib_name starts with "@executable_path/" then construct the 19 | # library name. 20 | + if not executable_path: 21 | + import sys 22 | + if sys.prefix: 23 | + executable_path = os.path.join(sys.prefix, 'bin') 24 | if name.startswith('@executable_path/') and executable_path is not None: 25 | yield os.path.join(executable_path, name[len('@executable_path/'):]) 26 | 27 | diff --git a/Lib/ctypes/util.py b/Lib/ctypes/util.py 28 | index 117bf06cb01..2e9fa474ace 100644 29 | --- a/Lib/ctypes/util.py 30 | +++ b/Lib/ctypes/util.py 31 | @@ -70,7 +70,8 @@ def find_library(name): 32 | elif os.name == "posix" and sys.platform in {"darwin", "ios", "tvos", "watchos"}: 33 | from ctypes.macholib.dyld import dyld_find as _dyld_find 34 | def find_library(name): 35 | - possible = ['lib%s.dylib' % name, 36 | + possible = ['@executable_path/../lib/lib%s.dylib' % name, 37 | + 'lib%s.dylib' % name, 38 | '%s.dylib' % name, 39 | '%s.framework/%s' % (name, name)] 40 | for name in possible: 41 | @@ -336,10 +337,30 @@ def _findLib_ld(name): 42 | pass # result will be None 43 | return result 44 | 45 | + def _findLib_prefix(name): 46 | + if not name: 47 | + return None 48 | + for fullname in (name, "lib%s.so" % (name)): 49 | + path = os.path.join(sys.prefix, 'lib', fullname) 50 | + if os.path.exists(path): 51 | + return path 52 | + return None 53 | + 54 | def find_library(name): 55 | # See issue #9998 56 | - return _findSoname_ldconfig(name) or \ 57 | - _get_soname(_findLib_gcc(name)) or _get_soname(_findLib_ld(name)) 58 | + # Yes calling _findLib_prefix twice is deliberate, because _get_soname ditches 59 | + # the full path. 60 | + # When objdump is unavailable this returns None 61 | + so_name = _get_soname(_findLib_prefix(name)) or name 62 | + if so_name != name: 63 | + return _findLib_prefix(so_name) or \ 64 | + _findLib_prefix(name) or \ 65 | + _findSoname_ldconfig(name) or \ 66 | + _get_soname(_findLib_gcc(name)) or _get_soname(_findLib_ld(name)) 67 | + else: 68 | + return _findLib_prefix(name) or \ 69 | + _findSoname_ldconfig(name) or \ 70 | + _get_soname(_findLib_gcc(name)) or _get_soname(_findLib_ld(name)) 71 | 72 | ################################################################ 73 | # test code 74 | -------------------------------------------------------------------------------- /recipe/patches/0004-Disable-registry-lookup-unless-CONDA_PY_ALLOW_REG_PA.patch: -------------------------------------------------------------------------------- 1 | From f4e637fd1598a98625f5c969a92edc3aab0a0704 Mon Sep 17 00:00:00 2001 2 | From: Ray Donnelly 3 | Date: Sat, 27 Oct 2018 18:48:30 +0100 4 | Subject: [PATCH 04/24] Disable registry lookup unless CONDA_PY_ALLOW_REG_PATHS 5 | is not 0 6 | 7 | Co-authored-by: Isuru Fernando 8 | --- 9 | Modules/getpath.c | 1 + 10 | Modules/getpath.py | 3 ++- 11 | 2 files changed, 3 insertions(+), 1 deletion(-) 12 | 13 | diff --git a/Modules/getpath.c b/Modules/getpath.c 14 | index d0128b20fae..e7cfeba25ec 100644 15 | --- a/Modules/getpath.c 16 | +++ b/Modules/getpath.c 17 | @@ -945,6 +945,7 @@ _PyConfig_InitPathConfig(PyConfig *config, int compute_path_config) 18 | !env_to_dict(dict, "ENV_PATH", 0) || 19 | !env_to_dict(dict, "ENV_PYTHONHOME", 0) || 20 | !env_to_dict(dict, "ENV_PYTHONEXECUTABLE", 0) || 21 | + !env_to_dict(dict, "ENV_CONDA_PY_ALLOW_REG_PATHS", 0) || 22 | !env_to_dict(dict, "ENV___PYVENV_LAUNCHER__", 1) || 23 | !progname_to_dict(dict, "real_executable") || 24 | !library_to_dict(dict, "library") || 25 | diff --git a/Modules/getpath.py b/Modules/getpath.py 26 | index 1f1bfcb4f64..344900c05e7 100644 27 | --- a/Modules/getpath.py 28 | +++ b/Modules/getpath.py 29 | @@ -52,6 +52,7 @@ 30 | # ENV_PYTHONHOME -- [in] getenv(...) 31 | # ENV_PYTHONEXECUTABLE -- [in] getenv(...) 32 | # ENV___PYVENV_LAUNCHER__ -- [in] getenv(...) 33 | +# ENV_CONDA_PY_ALLOW_REG_PATHS -- [in] getenv(...) 34 | 35 | # ** Values calculated at runtime ** 36 | # config -- [in/out] dict of the PyConfig structure 37 | @@ -681,7 +682,7 @@ def search_up(prefix, *landmarks, test=isfile): 38 | else: 39 | pythonpath.append(joinpath(prefix, ZIP_LANDMARK)) 40 | 41 | - if os_name == 'nt' and use_environment and winreg: 42 | + if os_name == 'nt' and use_environment and winreg and ENV_CONDA_PY_ALLOW_REG_PATHS and ENV_CONDA_PY_ALLOW_REG_PATHS != '0': 43 | # QUIRK: Windows also lists paths in the registry. Paths are stored 44 | # as the default value of each subkey of 45 | # {HKCU,HKLM}\Software\Python\PythonCore\{winver}\PythonPath 46 | -------------------------------------------------------------------------------- /recipe/patches/0005-Unvendor-openssl.patch: -------------------------------------------------------------------------------- 1 | From 0fe38386a63c0294fa0a25766554d3430ea909b4 Mon Sep 17 00:00:00 2001 2 | From: Nehal J Wani 3 | Date: Sat, 24 Nov 2018 20:38:02 -0600 4 | Subject: [PATCH 05/24] Unvendor openssl 5 | 6 | Co-authored-by: Isuru Fernando 7 | --- 8 | PCbuild/openssl.props | 14 ++------------ 9 | PCbuild/openssl.vcxproj | 32 -------------------------------- 10 | PCbuild/python.props | 11 +---------- 11 | PCbuild/python.vcxproj | 3 +++ 12 | PCbuild/pythonw.vcxproj | 3 +++ 13 | 5 files changed, 9 insertions(+), 54 deletions(-) 14 | 15 | diff --git a/PCbuild/openssl.props b/PCbuild/openssl.props 16 | index 5fd708b211e..044cefd95ea 100644 17 | --- a/PCbuild/openssl.props 18 | +++ b/PCbuild/openssl.props 19 | @@ -2,10 +2,10 @@ 20 | 21 | 22 | 23 | - $(opensslIncludeDir);%(AdditionalIncludeDirectories) 24 | + $(condaDir)include;%(AdditionalIncludeDirectories) 25 | 26 | 27 | - $(opensslOutDir);%(AdditionalLibraryDirectories) 28 | + $(condaDir)lib;%(AdditionalLibraryDirectories) 29 | ws2_32.lib;libcrypto.lib;libssl.lib;%(AdditionalDependencies) 30 | 31 | 32 | @@ -21,14 +21,4 @@ 33 | <_SSLDLL Include="$(opensslOutDir)\libssl$(_DLLSuffix).dll" /> 34 | <_SSLDLL Include="$(opensslOutDir)\libssl$(_DLLSuffix).pdb" /> 35 | 36 | - 41 | - 42 | - 43 | - 44 | - 45 | - 46 | 47 | diff --git a/PCbuild/openssl.vcxproj b/PCbuild/openssl.vcxproj 48 | index 7ca750dda8f..17eee400ebb 100644 49 | --- a/PCbuild/openssl.vcxproj 50 | +++ b/PCbuild/openssl.vcxproj 51 | @@ -60,40 +60,8 @@ 52 | 53 | 54 | 55 | - 56 | - $(opensslDir)\tmp$(Bitness)dll 57 | - $(opensslOutDir) 58 | - setlocal 59 | -set VCINSTALLDIR=$(VCInstallDir) 60 | -if not exist "$(IntDir.TrimEnd('\'))" mkdir "$(IntDir.TrimEnd('\'))" 61 | -cd /D "$(IntDir.TrimEnd('\'))" 62 | -$(Perl) "$(opensslDir)\configure" $(OpenSSLPlatform) no-asm no-uplink 63 | -nmake 64 | - 65 | - 66 | - 67 | 68 | 69 | - 70 | - 71 | - <_Built Include="$(opensslDir)\LICENSE" /> 72 | - <_Built Include="$(IntDir)\libcrypto.lib;$(IntDir)\libcrypto-*.dll;$(IntDir)\libcrypto-*.pdb" /> 73 | - <_Built Include="$(IntDir)\libssl.lib;$(IntDir)\libssl-*.dll;$(IntDir)\libssl-*.pdb" /> 74 | - <_Include Include="$(opensslDir)\Include\openssl\*.h" /> 75 | - <_Include Include="$(IntDir)\include\openssl\*.h" /> 76 | - 77 | - 78 | - 79 | - 80 | - 81 | - 82 | - 83 | - 84 | - 85 | - 86 | - 87 | - 88 | - 89 | 90 | 91 | 92 | diff --git a/PCbuild/python.props b/PCbuild/python.props 93 | index 42f11754218..0ec0914facd 100644 94 | --- a/PCbuild/python.props 95 | +++ b/PCbuild/python.props 96 | @@ -61,6 +61,7 @@ 97 | 98 | 99 | $(EXTERNALS_DIR) 100 | + $(LIBRARY_PREFIX)\ 101 | $([System.IO.Path]::GetFullPath(`$(PySourcePath)externals`)) 102 | $(ExternalsDir)\ 103 | 104 | @@ -68,18 +69,8 @@ 105 | 106 | 107 | 108 | - $(ExternalsDir)sqlite-3.49.1.0\ 109 | - $(ExternalsDir)bzip2-1.0.8\ 110 | - $(ExternalsDir)xz-5.2.5\ 111 | - $(ExternalsDir)libffi-3.4.4\ 112 | - $(libffiDir)$(ArchName)\ 113 | - $(libffiOutDir)include 114 | $(ExternalsDir)\mpdecimal-4.0.0\ 115 | - $(ExternalsDir)openssl-3.0.16\ 116 | - $(ExternalsDir)openssl-bin-3.0.16.2\$(ArchName)\ 117 | - $(opensslOutDir)include 118 | $(ExternalsDir)\nasm-2.11.06\ 119 | - $(ExternalsDir)\zlib-1.3.1\ 120 | 121 | 122 | 123 | diff --git a/PCbuild/python.vcxproj b/PCbuild/python.vcxproj 124 | index 4a99ffc677c..b11fb617963 100644 125 | --- a/PCbuild/python.vcxproj 126 | +++ b/PCbuild/python.vcxproj 127 | @@ -110,6 +110,9 @@ 128 | 129 | 130 | 131 | + 132 | + _CRT_SECURE_NO_WARNINGS;$(PreprocessorDefinitions) 133 | + 134 | 135 | 136 | 137 | diff --git a/PCbuild/pythonw.vcxproj b/PCbuild/pythonw.vcxproj 138 | index d08c210ef8a..87f71ca59d1 100644 139 | --- a/PCbuild/pythonw.vcxproj 140 | +++ b/PCbuild/pythonw.vcxproj 141 | @@ -102,6 +102,9 @@ 142 | 143 | 144 | 145 | + 146 | + _CRT_SECURE_NO_WARNINGS;$(PreprocessorDefinitions) 147 | + 148 | 149 | 150 | 151 | -------------------------------------------------------------------------------- /recipe/patches/0006-Unvendor-sqlite3.patch: -------------------------------------------------------------------------------- 1 | From 0f989c30617df3a745f5ae53077e48a3ce7af2bd Mon Sep 17 00:00:00 2001 2 | From: Nehal J Wani 3 | Date: Tue, 5 Oct 2021 12:42:06 -0700 4 | Subject: [PATCH 06/24] Unvendor sqlite3 5 | 6 | --- 7 | PCbuild/_sqlite3.vcxproj | 11 +++++------ 8 | PCbuild/pcbuild.sln | 2 -- 9 | PCbuild/sqlite3.vcxproj | 12 ++++++------ 10 | 3 files changed, 11 insertions(+), 14 deletions(-) 11 | 12 | diff --git a/PCbuild/_sqlite3.vcxproj b/PCbuild/_sqlite3.vcxproj 13 | index 9ae0a0fc3a0..f482734ba1d 100644 14 | --- a/PCbuild/_sqlite3.vcxproj 15 | +++ b/PCbuild/_sqlite3.vcxproj 16 | @@ -93,9 +93,12 @@ 17 | 18 | 19 | 20 | - $(sqlite3Dir);%(AdditionalIncludeDirectories) 21 | + $(condaDir)\include;%(AdditionalIncludeDirectories) 22 | PY_SQLITE_HAVE_SERIALIZE;PY_SQLITE_ENABLE_LOAD_EXTENSION;%(PreprocessorDefinitions) 23 | 24 | + 25 | + $(condaDir)\lib\sqlite3.lib;%(AdditionalDependencies) 26 | + 27 | 28 | 29 | 30 | @@ -127,12 +130,8 @@ 31 | {cf7ac3d1-e2df-41d2-bea6-1e2556cdea26} 32 | false 33 | 34 | - 35 | - {a1a295e5-463c-437f-81ca-1f32367685da} 36 | - false 37 | - 38 | 39 | 40 | 41 | 42 | - 43 | \ No newline at end of file 44 | + 45 | diff --git a/PCbuild/pcbuild.sln b/PCbuild/pcbuild.sln 46 | index d10e1c46a91..7516820de82 100644 47 | --- a/PCbuild/pcbuild.sln 48 | +++ b/PCbuild/pcbuild.sln 49 | @@ -71,8 +71,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_elementtree", "_elementtre 50 | EndProject 51 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_socket", "_socket.vcxproj", "{86937F53-C189-40EF-8CE8-8759D8E7D480}" 52 | EndProject 53 | -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_sqlite3", "_sqlite3.vcxproj", "{13CECB97-4119-4316-9D42-8534019A5A44}" 54 | -EndProject 55 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_ssl", "_ssl.vcxproj", "{C6E20F84-3247-4AD6-B051-B073268F73BA}" 56 | EndProject 57 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_testcapi", "_testcapi.vcxproj", "{6901D91C-6E48-4BB7-9FEC-700C8131DF1D}" 58 | diff --git a/PCbuild/sqlite3.vcxproj b/PCbuild/sqlite3.vcxproj 59 | index 6bcc4e913c8..9fe4bb740ab 100644 60 | --- a/PCbuild/sqlite3.vcxproj 61 | +++ b/PCbuild/sqlite3.vcxproj 62 | @@ -88,12 +88,12 @@ 63 | 64 | 65 | <_ProjectFileVersion>10.0.30319.1 66 | - <_SqliteVersion>$([System.Text.RegularExpressions.Regex]::Match(`$(sqlite3Dir)`, `((\d+)\.(\d+)\.(\d+)\.(\d+))\\?$`).Groups) 67 | - $(_SqliteVersion.Split(`;`)[1]) 68 | - $(_SqliteVersion.Split(`;`)[2]) 69 | - $(_SqliteVersion.Split(`;`)[3]) 70 | - $(_SqliteVersion.Split(`;`)[4]) 71 | - $(_SqliteVersion.Split(`;`)[5]) 72 | + <_SqliteVersion>$(SQLITE3_VERSION) 73 | + $(_SqliteVersion) 74 | + $(_SqliteVersion.Split(`.`)[1]) 75 | + $(_SqliteVersion.Split(`.`)[2]) 76 | + $(_SqliteVersion.Split(`.`)[3]) 77 | + $(_SqliteVersion.Split(`.`)[4]) 78 | 79 | 80 | 81 | -------------------------------------------------------------------------------- /recipe/patches/0007-Add-CondaEcosystemModifyDllSearchPath.patch: -------------------------------------------------------------------------------- 1 | From 9d2c319335f1a4e0dfb25b4a2e99657afbbd6a67 Mon Sep 17 00:00:00 2001 2 | From: Ray Donnelly 3 | Date: Tue, 24 Dec 2019 18:37:17 +0100 4 | Subject: [PATCH 07/24] Add CondaEcosystemModifyDllSearchPath() 5 | 6 | The python interpreter is modifed so that it works as if the python interpreter 7 | was called with the following conda directories. 8 | 9 | os.add_dll_directory(join(sys.prefix, 'bin')) 10 | os.add_dll_directory(join(sys.prefix, 'Scripts')) 11 | os.add_dll_directory(join(sys.prefix, 'Library', 'bin')) 12 | os.add_dll_directory(join(sys.prefix, 'Library', 'usr', 'bin')) 13 | os.add_dll_directory(join(sys.prefix, 'Library', 'mingw-w64', 'bin')) 14 | 15 | Search order 16 | - The directory that contains the DLL (if looking for a dependency) 17 | - Application (python.exe) directory 18 | - Directories added with os.add_dll_directory 19 | - The 5 conda directories 20 | - C:\Windows\System32 21 | 22 | Note that the default behaviour changed in conda python 3.10 to 23 | make os.add_dll_directory work in user code. 24 | 25 | Note that in conda python <3.11, there was an option 26 | CONDA_DLL_SEARCH_MODIFICATION=1 to add directories in PATH to the search 27 | order, but this was deprecated in 3.10 and removed in 3.11 in favour of using 28 | AddDllDirectory 29 | 30 | Co-authored-by: Isuru Fernando 31 | --- 32 | Python/pylifecycle.c | 96 ++++++++++++++++++++++++++++++++++++++++++++ 33 | 1 file changed, 96 insertions(+) 34 | 35 | diff --git a/Python/pylifecycle.c b/Python/pylifecycle.c 36 | index a8852a88f94..f1a919bad51 100644 37 | --- a/Python/pylifecycle.c 38 | +++ b/Python/pylifecycle.c 39 | @@ -74,6 +74,10 @@ 40 | 41 | #ifdef MS_WINDOWS 42 | # undef BYTE 43 | +# include 44 | +# include 45 | +# include 46 | +# include 47 | #endif 48 | 49 | #define PUTS(fd, str) (void)_Py_write_noraise(fd, str, (int)strlen(str)) 50 | @@ -123,6 +127,94 @@ __attribute__ ((section (".PyRuntime"))) 51 | = _PyRuntimeState_INIT(_PyRuntime, _Py_Debug_Cookie); 52 | _Py_COMP_DIAG_POP 53 | 54 | +#ifdef MS_WINDOWS 55 | +/* 56 | + This function will modify the DLL search path so that /Library\bin 57 | + and other conda PATHS are added to the front of the DLL search path. 58 | +*/ 59 | + 60 | +#if !defined(LOAD_LIBRARY_SEARCH_DEFAULT_DIRS) 61 | +#define LOAD_LIBRARY_SEARCH_DEFAULT_DIRS 0x00001000 62 | +#endif 63 | + 64 | +typedef void (WINAPI *ADD)(PCWSTR NewDirectory); 65 | +static ADD pAddDllDirectory = NULL; 66 | +typedef struct 67 | +{ 68 | + wchar_t *p_relative; 69 | + wchar_t *p_name; 70 | +} CONDA_PATH; 71 | + 72 | +#define NUM_CONDA_PATHS 5 73 | + 74 | +static CONDA_PATH condaPaths[NUM_CONDA_PATHS] = 75 | +{ 76 | + {L"Library\\mingw-w64\\bin", NULL}, 77 | + {L"Library\\usr\\bin", NULL}, 78 | + {L"Library\\bin", NULL}, 79 | + {L"Scripts", NULL}, 80 | + {L"bin", NULL} 81 | +}; 82 | +static wchar_t sv_dll_dirname[1024]; 83 | + 84 | +int CondaEcosystemModifyDllSearchPath_Init() 85 | +{ 86 | + int debug_it = _wgetenv(L"CONDA_DLL_SEARCH_MODIFICATION_DEBUG") ? 1 : 0; 87 | + wchar_t* enable = _wgetenv(L"CONDA_DLL_SEARCH_MODIFICATION_ENABLE"); 88 | + int res = 0; 89 | + long long j; 90 | + CONDA_PATH *p_conda_path; 91 | + HMODULE dll_handle = NULL; 92 | + 93 | + if (pAddDllDirectory == NULL) 94 | + { 95 | + pAddDllDirectory = (ADD)GetProcAddress(GetModuleHandle(TEXT("kernel32.dll")), "AddDllDirectory"); 96 | + 97 | + /* Determine sv_dll_dirname */ 98 | + if (GetModuleHandleEx(GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS | GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT, 99 | + (LPCSTR) &CondaEcosystemModifyDllSearchPath_Init, &dll_handle) == 0) 100 | + { 101 | + // Getting the pythonxx.dll path failed. Fall back to relative path of python.exe 102 | + // assuming that the executable that is running this code is python.exe 103 | + dll_handle = NULL; 104 | + } 105 | + GetModuleFileNameW(dll_handle, &sv_dll_dirname[0], sizeof(sv_dll_dirname)/sizeof(sv_dll_dirname[0])-1); 106 | + sv_dll_dirname[sizeof(sv_dll_dirname)/sizeof(sv_dll_dirname[0])-1] = L'\0'; 107 | + if (wcsrchr(sv_dll_dirname, L'\\')) 108 | + *wcsrchr(sv_dll_dirname, L'\\') = L'\0'; 109 | + 110 | + for (p_conda_path = &condaPaths[0]; p_conda_path < &condaPaths[NUM_CONDA_PATHS]; ++p_conda_path) 111 | + { 112 | + size_t n_chars_dll_dirname = wcslen(sv_dll_dirname); 113 | + size_t n_chars_p_relative = wcslen(p_conda_path->p_relative); 114 | + p_conda_path->p_name = malloc(sizeof(wchar_t) * (n_chars_dll_dirname + n_chars_p_relative + 2)); 115 | + wcsncpy(p_conda_path->p_name, sv_dll_dirname, n_chars_dll_dirname+1); 116 | + wcsncat(p_conda_path->p_name, L"\\", 2); 117 | + wcsncat(p_conda_path->p_name, p_conda_path->p_relative, n_chars_p_relative+1); 118 | + } 119 | + 120 | + } 121 | + 122 | + if (pAddDllDirectory == NULL) 123 | + { 124 | + if (debug_it) 125 | + fwprintf(stderr, L"CondaEcosystemModifyDllSearchPath() :: WARNING :: Please install KB2533623 from http://go.microsoft.com/fwlink/p/?linkid=217865\n"\ 126 | + L"CondaEcosystemModifyDllSearchPath() :: WARNING :: to improve conda ecosystem DLL isolation"); 127 | + res = 2; 128 | + } 129 | + else { 130 | + for (j = NUM_CONDA_PATHS-1, p_conda_path = &condaPaths[NUM_CONDA_PATHS-1]; j > -1; --j, --p_conda_path) 131 | + { 132 | + if (debug_it) 133 | + fwprintf(stderr, L"CondaEcosystemModifyDllSearchPath() :: AddDllDirectory(%ls - ExePrefix)\n", p_conda_path->p_name); 134 | + pAddDllDirectory(p_conda_path->p_name); 135 | + } 136 | + } 137 | + return res; 138 | +} 139 | + 140 | +#endif 141 | + 142 | static int runtime_initialized = 0; 143 | 144 | PyStatus 145 | @@ -139,6 +231,10 @@ _PyRuntime_Initialize(void) 146 | } 147 | runtime_initialized = 1; 148 | 149 | +#ifdef MS_WINDOWS 150 | + extern int CondaEcosystemModifyDllSearchPath_Init(); 151 | + CondaEcosystemModifyDllSearchPath_Init(); 152 | +#endif 153 | return _PyRuntimeState_Init(&_PyRuntime); 154 | } 155 | 156 | -------------------------------------------------------------------------------- /recipe/patches/0009-cross-compile-darwin.patch: -------------------------------------------------------------------------------- 1 | From 2b1e4a9b02d9644d294325d2236f57121db8b98f Mon Sep 17 00:00:00 2001 2 | From: Ray Donnelly 3 | Date: Fri, 2 Oct 2020 00:03:12 +0200 4 | Subject: [PATCH 09/24] cross compile darwin 5 | 6 | By Isuru Fernando. 7 | --- 8 | Lib/platform.py | 7 ++++++- 9 | configure | 6 ++++++ 10 | configure.ac | 6 ++++++ 11 | 3 files changed, 18 insertions(+), 1 deletion(-) 12 | 13 | diff --git a/Lib/platform.py b/Lib/platform.py 14 | index 8895177e326..fd93841d034 100755 15 | --- a/Lib/platform.py 16 | +++ b/Lib/platform.py 17 | @@ -460,7 +460,12 @@ def win32_ver(release='', version='', csd='', ptype=''): 18 | def _mac_ver_xml(): 19 | fn = '/System/Library/CoreServices/SystemVersion.plist' 20 | if not os.path.exists(fn): 21 | - return None 22 | + if 'SDKROOT' in os.environ: 23 | + fn = os.environ['SDKROOT'] + fn 24 | + if not os.path.exists(fn): 25 | + return None 26 | + else: 27 | + return None 28 | 29 | try: 30 | import plistlib 31 | diff --git a/configure b/configure 32 | index 1cd1f690f7b..603108eb031 100755 33 | --- a/configure 34 | +++ b/configure 35 | @@ -4052,6 +4052,9 @@ then 36 | *-*-linux*) 37 | ac_sys_system=Linux 38 | ;; 39 | + *-*-darwin*) 40 | + ac_sys_system=Darwin 41 | + ;; 42 | *-*-cygwin*) 43 | ac_sys_system=Cygwin 44 | ;; 45 | @@ -4500,6 +4503,9 @@ if test "$cross_compiling" = yes; then 46 | _host_ident=$host_cpu 47 | esac 48 | ;; 49 | + *-*-darwin*) 50 | + _host_ident=$host_cpu 51 | + ;; 52 | *-*-cygwin*) 53 | _host_ident= 54 | ;; 55 | diff --git a/configure.ac b/configure.ac 56 | index 3fcb18922c5..fd3cba43283 100644 57 | --- a/configure.ac 58 | +++ b/configure.ac 59 | @@ -324,6 +324,9 @@ then 60 | *-*-linux*) 61 | ac_sys_system=Linux 62 | ;; 63 | + *-*-darwin*) 64 | + ac_sys_system=Darwin 65 | + ;; 66 | *-*-cygwin*) 67 | ac_sys_system=Cygwin 68 | ;; 69 | @@ -748,6 +751,9 @@ if test "$cross_compiling" = yes; then 70 | _host_ident=$host_cpu 71 | esac 72 | ;; 73 | + *-*-darwin*) 74 | + _host_ident=$host_cpu 75 | + ;; 76 | *-*-cygwin*) 77 | _host_ident= 78 | ;; 79 | -------------------------------------------------------------------------------- /recipe/patches/0010-Fix-TZPATH-on-windows.patch: -------------------------------------------------------------------------------- 1 | From 80c75a40f139e463c1405af3e7ecf8a1185b09eb Mon Sep 17 00:00:00 2001 2 | From: Isuru Fernando 3 | Date: Wed, 7 Oct 2020 10:08:30 -0500 4 | Subject: [PATCH 10/24] Fix TZPATH on windows 5 | 6 | --- 7 | Lib/sysconfig/__init__.py | 1 + 8 | 1 file changed, 1 insertion(+) 9 | 10 | diff --git a/Lib/sysconfig/__init__.py b/Lib/sysconfig/__init__.py 11 | index 510c7b9568a..c45f79fbc29 100644 12 | --- a/Lib/sysconfig/__init__.py 13 | +++ b/Lib/sysconfig/__init__.py 14 | @@ -499,6 +499,7 @@ def _init_config_vars(): 15 | if os.name == 'nt': 16 | _init_non_posix(_CONFIG_VARS) 17 | _CONFIG_VARS['VPATH'] = sys._vpath 18 | + _CONFIG_VARS['TZPATH'] = os.path.join(_PREFIX, "share", "zoneinfo") 19 | if os.name == 'posix': 20 | _init_posix(_CONFIG_VARS) 21 | if _HAS_USER_BASE: 22 | -------------------------------------------------------------------------------- /recipe/patches/0011-Make-dyld-search-work-with-SYSTEM_VERSION_COMPAT-1.patch: -------------------------------------------------------------------------------- 1 | From a61264b976babc757e386d46d505f0c0c4b470a3 Mon Sep 17 00:00:00 2001 2 | From: Isuru Fernando 3 | Date: Mon, 25 Jan 2021 03:28:08 -0600 4 | Subject: [PATCH 11/24] Make dyld search work with SYSTEM_VERSION_COMPAT=1 5 | 6 | In macOS Big Sur, if the executable was compiled with `MACOSX_DEPLOYMENT_TARGET=10.15` 7 | or below, then SYSTEM_VERSION_COMPAT=1 is the default which means that Big Sur 8 | reports itself as 10.16 which means that `__builtin_available(macOS 11.0)` will not be triggered. 9 | 10 | This can be observed by using the python 3.9.1 universal2 installer and using it on 11 | x86_64 Big Sur or with Rossetta 2 on arm64 Big Sur. (Not an issue with native arm64 12 | as that part is compiled with `MACOSX_DEPLOYMENT_TARGET=11.0`) 13 | --- 14 | Modules/_ctypes/callproc.c | 2 +- 15 | 1 file changed, 1 insertion(+), 1 deletion(-) 16 | 17 | diff --git a/Modules/_ctypes/callproc.c b/Modules/_ctypes/callproc.c 18 | index f9864ebb735..c413621f01b 100644 19 | --- a/Modules/_ctypes/callproc.c 20 | +++ b/Modules/_ctypes/callproc.c 21 | @@ -1489,7 +1489,7 @@ copy_com_pointer(PyObject *self, PyObject *args) 22 | #ifdef HAVE_DYLD_SHARED_CACHE_CONTAINS_PATH 23 | # ifdef HAVE_BUILTIN_AVAILABLE 24 | # define HAVE_DYLD_SHARED_CACHE_CONTAINS_PATH_RUNTIME \ 25 | - __builtin_available(macOS 11.0, iOS 14.0, tvOS 14.0, watchOS 7.0, *) 26 | + __builtin_available(macOS 10.16, iOS 14.0, tvOS 14.0, watchOS 7.0, *) 27 | # else 28 | # define HAVE_DYLD_SHARED_CACHE_CONTAINS_PATH_RUNTIME \ 29 | (_dyld_shared_cache_contains_path != NULL) 30 | -------------------------------------------------------------------------------- /recipe/patches/0012-Unvendor-bzip2.patch: -------------------------------------------------------------------------------- 1 | From 9b6346b06684f48994c3ecdb96b34c1c22df5783 Mon Sep 17 00:00:00 2001 2 | From: Isuru Fernando 3 | Date: Mon, 16 Aug 2021 02:56:27 -0700 4 | Subject: [PATCH 12/24] Unvendor bzip2 5 | 6 | --- 7 | PCbuild/_bz2.vcxproj | 15 +++++---------- 8 | PCbuild/_bz2.vcxproj.filters | 28 ++-------------------------- 9 | 2 files changed, 7 insertions(+), 36 deletions(-) 10 | 11 | diff --git a/PCbuild/_bz2.vcxproj b/PCbuild/_bz2.vcxproj 12 | index 30ad0dc4864..1d46cc8198f 100644 13 | --- a/PCbuild/_bz2.vcxproj 14 | +++ b/PCbuild/_bz2.vcxproj 15 | @@ -94,7 +94,7 @@ 16 | 17 | 18 | 19 | - $(bz2Dir);%(AdditionalIncludeDirectories) 20 | + $(condaDir)\include;%(AdditionalIncludeDirectories) 21 | WIN32;_FILE_OFFSET_BITS=64;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;%(PreprocessorDefinitions) 22 | 4244;4267;%(DisableSpecificWarnings) 23 | /d1trimfile:%SRC_DIR% 24 | @@ -102,20 +102,15 @@ 25 | /d1trimfile:%SRC_DIR% 26 | /d1trimfile:%SRC_DIR% 27 | 28 | + 29 | + $(condaDir)\lib\bzip2.lib;%(AdditionalDependencies) 30 | + 31 | 32 | 33 | 34 | - 35 | - 36 | - 37 | - 38 | - 39 | - 40 | - 41 | 42 | 43 | - 44 | - 45 | + 46 | 47 | 48 | 49 | diff --git a/PCbuild/_bz2.vcxproj.filters b/PCbuild/_bz2.vcxproj.filters 50 | index 7c0b5162537..ed9510978f1 100644 51 | --- a/PCbuild/_bz2.vcxproj.filters 52 | +++ b/PCbuild/_bz2.vcxproj.filters 53 | @@ -21,33 +21,9 @@ 54 | 55 | Source Files 56 | 57 | - 58 | - Source Files\bzip2 59 | - 60 | - 61 | - Source Files\bzip2 62 | - 63 | - 64 | - Source Files\bzip2 65 | - 66 | - 67 | - Source Files\bzip2 68 | - 69 | - 70 | - Source Files\bzip2 71 | - 72 | - 73 | - Source Files\bzip2 74 | - 75 | - 76 | - Source Files\bzip2 77 | - 78 | 79 | 80 | - 81 | - Header Files\bzip2 82 | - 83 | - 84 | + 85 | Header Files\bzip2 86 | 87 | 88 | @@ -56,4 +32,4 @@ 89 | Resource Files 90 | 91 | 92 | - 93 | \ No newline at end of file 94 | + 95 | -------------------------------------------------------------------------------- /recipe/patches/0013-Unvendor-libffi.patch: -------------------------------------------------------------------------------- 1 | From 00cdc35f73b62ff9d380fbb02586eb88d0b7bbb2 Mon Sep 17 00:00:00 2001 2 | From: Isuru Fernando 3 | Date: Mon, 16 Aug 2021 03:07:40 -0700 4 | Subject: [PATCH 13/24] Unvendor libffi 5 | 6 | --- 7 | PCbuild/libffi.props | 17 ++++------------- 8 | 1 file changed, 4 insertions(+), 13 deletions(-) 9 | 10 | diff --git a/PCbuild/libffi.props b/PCbuild/libffi.props 11 | index 22c9550e2c0..40ddb08d2b0 100644 12 | --- a/PCbuild/libffi.props 13 | +++ b/PCbuild/libffi.props 14 | @@ -2,20 +2,11 @@ 15 | 16 | 17 | 18 | - $(libffiIncludeDir);%(AdditionalIncludeDirectories) 19 | + $(condaDir)\include;%(AdditionalIncludeDirectories) 20 | 21 | 22 | - $(libffiOutDir);%(AdditionalLibraryDirectories) 23 | - libffi-8.lib;%(AdditionalDependencies) 24 | + $(condaDir)\lib;%(AdditionalLibraryDirectories) 25 | + ffi.lib;%(AdditionalDependencies) 26 | 27 | 28 | - 29 | - <_LIBFFIDLL Include="$(libffiOutDir)\libffi-8.dll" /> 30 | - 31 | - 32 | - 33 | - 34 | - 35 | - 36 | - 37 | - 38 | \ No newline at end of file 39 | + 40 | -------------------------------------------------------------------------------- /recipe/patches/0014-Unvendor-tcltk.patch: -------------------------------------------------------------------------------- 1 | From 717122c210b8f6ff32879a060897f937d2e39c75 Mon Sep 17 00:00:00 2001 2 | From: Isuru Fernando 3 | Date: Fri, 20 Aug 2021 10:23:51 -0700 4 | Subject: [PATCH 14/24] Unvendor tcltk 5 | 6 | --- 7 | PCbuild/_tkinter.vcxproj | 6 ------ 8 | PCbuild/tcltk.props | 11 +++++------ 9 | 2 files changed, 5 insertions(+), 12 deletions(-) 10 | 11 | diff --git a/PCbuild/_tkinter.vcxproj b/PCbuild/_tkinter.vcxproj 12 | index 5ca877b5f2e..4ee4ff6d619 100644 13 | --- a/PCbuild/_tkinter.vcxproj 14 | +++ b/PCbuild/_tkinter.vcxproj 15 | @@ -126,12 +126,6 @@ 16 | 17 | 18 | 19 | - 20 | - 21 | - 22 | - 23 | - 24 | - 25 | 26 | 27 | 28 | diff --git a/PCbuild/tcltk.props b/PCbuild/tcltk.props 29 | index 2aa3b7a1e42..81299f3a7dc 100644 30 | --- a/PCbuild/tcltk.props 31 | +++ b/PCbuild/tcltk.props 32 | @@ -12,12 +12,11 @@ 33 | $([System.Version]::Parse($(TkVersion)).Minor) 34 | $([System.Version]::Parse($(TkVersion)).Build) 35 | $([System.Version]::Parse($(TkVersion)).Revision) 36 | - $(ExternalsDir)tcl-core-$(TclVersion)\ 37 | - $(ExternalsDir)tk-$(TkVersion)\ 38 | - $(ExternalsDir)tcltk-$(TclVersion)\$(ArchName)\ 39 | - $(tcltkDir)\bin\tclsh$(TclMajorVersion)$(TclMinorVersion)t.exe 40 | - $(tcltkDir)\..\win32\bin\tclsh$(TclMajorVersion)$(TclMinorVersion)t.exe 41 | - 42 | + $(condaDir) 43 | + $(condaDir) 44 | + $(condaDir) 45 | + $(condaDir) 46 | + $(condaDir)\bin\tclsh$(TclMajorVersion)$(TclMinorVersion)t.exe 47 | 48 | tcl$(TclMajorVersion)$(TclMinorVersion)t$(TclDebugExt).dll 49 | tcl$(TclMajorVersion)$(TclMinorVersion)t$(TclDebugExt).lib 50 | -------------------------------------------------------------------------------- /recipe/patches/0015-unvendor-xz.patch: -------------------------------------------------------------------------------- 1 | From f5cb3ed68fab92894c6e6833814155a19f75435e Mon Sep 17 00:00:00 2001 2 | From: Isuru Fernando 3 | Date: Sat, 25 Sep 2021 10:07:05 -0700 4 | Subject: [PATCH 15/24] unvendor xz 5 | 6 | --- 7 | PCbuild/_lzma.vcxproj | 10 +++------- 8 | 1 file changed, 3 insertions(+), 7 deletions(-) 9 | 10 | diff --git a/PCbuild/_lzma.vcxproj b/PCbuild/_lzma.vcxproj 11 | index 321f41d8d27..6811fd1709e 100644 12 | --- a/PCbuild/_lzma.vcxproj 13 | +++ b/PCbuild/_lzma.vcxproj 14 | @@ -93,15 +93,15 @@ 15 | 16 | 17 | 18 | - $(lzmaDir)src/liblzma/api;%(AdditionalIncludeDirectories) 19 | - WIN32;_FILE_OFFSET_BITS=64;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;LZMA_API_STATIC;%(PreprocessorDefinitions) 20 | + $(condaDir)\include;%(AdditionalIncludeDirectories) 21 | + WIN32;_FILE_OFFSET_BITS=64;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;%(PreprocessorDefinitions) 22 | /d1trimfile:%SRC_DIR% 23 | /d1trimfile:%SRC_DIR% 24 | /d1trimfile:%SRC_DIR% 25 | /d1trimfile:%SRC_DIR% 26 | 27 | 28 | - $(OutDir)liblzma$(PyDebugExt).lib;%(AdditionalDependencies) 29 | + $(condaDir)\lib\lzma.lib;%(AdditionalDependencies) 30 | 31 | 32 | 33 | @@ -115,10 +115,6 @@ 34 | {cf7ac3d1-e2df-41d2-bea6-1e2556cdea26} 35 | false 36 | 37 | - 38 | - {12728250-16eC-4dc6-94d7-e21dd88947f8} 39 | - false 40 | - 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /recipe/patches/0016-unvendor-zlib.patch: -------------------------------------------------------------------------------- 1 | From a6201164d0c51c2aa574aa420d4662fb13481286 Mon Sep 17 00:00:00 2001 2 | From: Isuru Fernando 3 | Date: Wed, 29 Sep 2021 15:21:55 -0700 4 | Subject: [PATCH 16/24] unvendor zlib 5 | 6 | --- 7 | PCbuild/pythoncore.vcxproj | 33 ++------------- 8 | PCbuild/pythoncore.vcxproj.filters | 66 ------------------------------ 9 | 2 files changed, 4 insertions(+), 95 deletions(-) 10 | 11 | diff --git a/PCbuild/pythoncore.vcxproj b/PCbuild/pythoncore.vcxproj 12 | index b85cca2cd51..8e09d243c53 100644 13 | --- a/PCbuild/pythoncore.vcxproj 14 | +++ b/PCbuild/pythoncore.vcxproj 15 | @@ -82,7 +82,7 @@ 16 | 17 | true 18 | true 19 | - true 20 | + true 21 | false 22 | 23 | 24 | @@ -101,14 +101,15 @@ 25 | 26 | /d1trimfile:%SRC_DIR% 27 | $(PySourcePath)Modules\_hacl\include;$(PySourcePath)Modules\_hacl\internal;$(PySourcePath)Python;%(AdditionalIncludeDirectories) 28 | - $(zlibDir);%(AdditionalIncludeDirectories) 29 | + $(condaDir)\include;%(AdditionalIncludeDirectories) 30 | _USRDLL;Py_BUILD_CORE;Py_BUILD_CORE_BUILTIN;Py_ENABLE_SHARED;MS_DLL_ID="$(SysWinVer)";%(PreprocessorDefinitions) 31 | _Py_HAVE_ZLIB;%(PreprocessorDefinitions) 32 | _Py_JIT;%(PreprocessorDefinitions) 33 | _Py_TIER2=$(UseTIER2);%(PreprocessorDefinitions) 34 | 35 | 36 | - version.lib;ws2_32.lib;pathcch.lib;bcrypt.lib;%(AdditionalDependencies) 37 | + version.lib;ws2_32.lib;pathcch.lib;bcrypt.lib;zlib.lib;%(AdditionalDependencies) 38 | + $(condaDir)\lib;%(AdditionalLibraryDirectories) 39 | 40 | 41 | 42 | @@ -397,19 +398,6 @@ 43 | 44 | 45 | 46 | - 47 | - 48 | - 49 | - 50 | - 51 | - 52 | - 53 | - 54 | - 55 | - 56 | - 57 | - 58 | - 59 | 60 | 61 | 62 | @@ -643,19 +631,6 @@ 63 | 64 | 65 | 66 | - 67 | - 68 | - 69 | - 70 | - 4244 71 | - 72 | - 73 | - 74 | - 75 | - 76 | - 77 | - 78 | - 79 | 80 | 81 | 82 | diff --git a/PCbuild/pythoncore.vcxproj.filters b/PCbuild/pythoncore.vcxproj.filters 83 | index 3eed5a9465b..0892b669d6b 100644 84 | --- a/PCbuild/pythoncore.vcxproj.filters 85 | +++ b/PCbuild/pythoncore.vcxproj.filters 86 | @@ -852,39 +852,6 @@ 87 | 88 | Include\internal\mimalloc 89 | 90 | - 91 | - Modules\zlib 92 | - 93 | - 94 | - Modules\zlib 95 | - 96 | - 97 | - Modules\zlib 98 | - 99 | - 100 | - Modules\zlib 101 | - 102 | - 103 | - Modules\zlib 104 | - 105 | - 106 | - Modules\zlib 107 | - 108 | - 109 | - Modules\zlib 110 | - 111 | - 112 | - Modules\zlib 113 | - 114 | - 115 | - Modules\zlib 116 | - 117 | - 118 | - Modules\zlib 119 | - 120 | - 121 | - Modules\zlib 122 | - 123 | 124 | Include\internal 125 | 126 | @@ -1514,39 +1481,6 @@ 127 | 128 | Modules 129 | 130 | - 131 | - Modules\zlib 132 | - 133 | - 134 | - Modules\zlib 135 | - 136 | - 137 | - Modules\zlib 138 | - 139 | - 140 | - Modules\zlib 141 | - 142 | - 143 | - Modules\zlib 144 | - 145 | - 146 | - Modules\zlib 147 | - 148 | - 149 | - Modules\zlib 150 | - 151 | - 152 | - Modules\zlib 153 | - 154 | - 155 | - Modules\zlib 156 | - 157 | - 158 | - Modules\zlib 159 | - 160 | - 161 | - Modules\zlib 162 | - 163 | 164 | Python 165 | 166 | -------------------------------------------------------------------------------- /recipe/patches/0017-Do-not-pass-g-to-GCC-when-not-Py_DEBUG.patch: -------------------------------------------------------------------------------- 1 | From 27fcf7aefe92bc81c68e73d92268b55213363345 Mon Sep 17 00:00:00 2001 2 | From: Ray Donnelly 3 | Date: Wed, 16 Aug 2017 11:45:28 +0100 4 | Subject: [PATCH 17/24] Do not pass -g to GCC when not Py_DEBUG 5 | 6 | This bloats our exe and our modules a lot. 7 | --- 8 | configure | 6 +++--- 9 | configure.ac | 2 +- 10 | 2 files changed, 4 insertions(+), 4 deletions(-) 11 | 12 | diff --git a/configure b/configure 13 | index 603108eb031..a4df798edca 100755 14 | --- a/configure 15 | +++ b/configure 16 | @@ -5671,9 +5671,9 @@ if test $ac_test_CFLAGS; then 17 | CFLAGS=$ac_save_CFLAGS 18 | elif test $ac_cv_prog_cc_g = yes; then 19 | if test "$GCC" = yes; then 20 | - CFLAGS="-g -O2" 21 | + CFLAGS="-O2" 22 | else 23 | - CFLAGS="-g" 24 | + CFLAGS= 25 | fi 26 | else 27 | if test "$GCC" = yes; then 28 | @@ -9522,7 +9522,7 @@ then 29 | if test "$Py_DEBUG" = 'true' ; then 30 | OPT="-g $PYDEBUG_CFLAGS -Wall" 31 | else 32 | - OPT="-g -O3 -Wall" 33 | + OPT="-O3 -Wall" 34 | fi 35 | ;; 36 | *) 37 | diff --git a/configure.ac b/configure.ac 38 | index fd3cba43283..b747715f637 100644 39 | --- a/configure.ac 40 | +++ b/configure.ac 41 | @@ -2389,7 +2389,7 @@ then 42 | if test "$Py_DEBUG" = 'true' ; then 43 | OPT="-g $PYDEBUG_CFLAGS -Wall" 44 | else 45 | - OPT="-g -O3 -Wall" 46 | + OPT="-O3 -Wall" 47 | fi 48 | ;; 49 | *) 50 | -------------------------------------------------------------------------------- /recipe/patches/0018-Unvendor-expat.patch: -------------------------------------------------------------------------------- 1 | From 2b9f7797353290e3b11acfd3adf8353d6bc3e688 Mon Sep 17 00:00:00 2001 2 | From: Isuru Fernando 3 | Date: Wed, 29 Mar 2023 23:07:10 -0500 4 | Subject: [PATCH 18/24] Unvendor expat 5 | 6 | --- 7 | PCbuild/_elementtree.vcxproj | 25 ++---------- 8 | PCbuild/_elementtree.vcxproj.filters | 58 +--------------------------- 9 | PCbuild/pyexpat.vcxproj | 12 ++---- 10 | PCbuild/pyexpat.vcxproj.filters | 19 +-------- 11 | 4 files changed, 10 insertions(+), 104 deletions(-) 12 | 13 | diff --git a/PCbuild/_elementtree.vcxproj b/PCbuild/_elementtree.vcxproj 14 | index 94da21f6425..f47bcd8e4e6 100644 15 | --- a/PCbuild/_elementtree.vcxproj 16 | +++ b/PCbuild/_elementtree.vcxproj 17 | @@ -93,36 +93,19 @@ 18 | 19 | 20 | 21 | - ..\Modules\expat;%(AdditionalIncludeDirectories) 22 | + $(condaDir)\include;%(AdditionalIncludeDirectories) 23 | _CRT_SECURE_NO_WARNINGS;USE_PYEXPAT_CAPI;XML_STATIC;%(PreprocessorDefinitions) 24 | /d1trimfile:%SRC_DIR% 25 | /d1trimfile:%SRC_DIR% 26 | /d1trimfile:%SRC_DIR% 27 | /d1trimfile:%SRC_DIR% 28 | 29 | + 30 | + $(condaDir)\lib\expat.lib;%(AdditionalDependencies) 31 | + 32 | 33 | - 34 | - 35 | - 36 | - 37 | - 38 | - 39 | - 40 | - 41 | - 42 | - 43 | - 44 | - 45 | - 46 | - 47 | - 48 | - 49 | - 50 | 51 | 52 | - 53 | - 54 | - 55 | 56 | 57 | 58 | diff --git a/PCbuild/_elementtree.vcxproj.filters b/PCbuild/_elementtree.vcxproj.filters 59 | index bc14e31f32b..7cc8e9a3b9b 100644 60 | --- a/PCbuild/_elementtree.vcxproj.filters 61 | +++ b/PCbuild/_elementtree.vcxproj.filters 62 | @@ -17,70 +17,14 @@ 63 | {f99990ba-cd06-40cc-8f28-d2d424ec13be} 64 | 65 | 66 | - 67 | - 68 | - Header Files\expat 69 | - 70 | - 71 | - Header Files\expat 72 | - 73 | - 74 | - Header Files\expat 75 | - 76 | - 77 | - Header Files\expat 78 | - 79 | - 80 | - Header Files\expat 81 | - 82 | - 83 | - Header Files\expat 84 | - 85 | - 86 | - Header Files\expat 87 | - 88 | - 89 | - Header Files\expat 90 | - 91 | - 92 | - Header Files\expat 93 | - 94 | - 95 | - Header Files\expat 96 | - 97 | - 98 | - Header Files\expat 99 | - 100 | - 101 | - Header Files\expat 102 | - 103 | - 104 | - Header Files\expat 105 | - 106 | - 107 | - Header Files\expat 108 | - 109 | - 110 | - Header Files\expat 111 | - 112 | - 113 | 114 | 115 | Source Files 116 | 117 | - 118 | - Source Files\expat 119 | - 120 | - 121 | - Source Files\expat 122 | - 123 | - 124 | - Source Files\expat 125 | - 126 | 127 | 128 | 129 | Resource Files 130 | 131 | 132 | - 133 | \ No newline at end of file 134 | + 135 | diff --git a/PCbuild/pyexpat.vcxproj b/PCbuild/pyexpat.vcxproj 136 | index 3bcef600a3e..ec5d4b64b3c 100644 137 | --- a/PCbuild/pyexpat.vcxproj 138 | +++ b/PCbuild/pyexpat.vcxproj 139 | @@ -90,23 +90,19 @@ 140 | 141 | 142 | 143 | - $(PySourcePath)Modules\expat;%(AdditionalIncludeDirectories) 144 | + $(condaDir)\include;%(AdditionalIncludeDirectories) 145 | _CRT_SECURE_NO_WARNINGS;PYEXPAT_EXPORTS;XML_STATIC;%(PreprocessorDefinitions) 146 | /d1trimfile:%SRC_DIR% 147 | /d1trimfile:%SRC_DIR% 148 | /d1trimfile:%SRC_DIR% 149 | /d1trimfile:%SRC_DIR% 150 | 151 | + 152 | + $(condaDir)\lib\expat.lib;%(AdditionalDependencies) 153 | + 154 | 155 | - 156 | - 157 | - 158 | - 159 | 160 | 161 | - 162 | - 163 | - 164 | 165 | 166 | 167 | diff --git a/PCbuild/pyexpat.vcxproj.filters b/PCbuild/pyexpat.vcxproj.filters 168 | index fd22fc8c477..41c73b434b9 100644 169 | --- a/PCbuild/pyexpat.vcxproj.filters 170 | +++ b/PCbuild/pyexpat.vcxproj.filters 171 | @@ -11,31 +11,14 @@ 172 | {f1dbbdb5-41e5-4a88-bf8e-13da010c0ce4} 173 | 174 | 175 | - 176 | - 177 | - Header Files 178 | - 179 | - 180 | - Header Files 181 | - 182 | - 183 | 184 | 185 | Source Files 186 | 187 | - 188 | - Source Files 189 | - 190 | - 191 | - Source Files 192 | - 193 | - 194 | - Source Files 195 | - 196 | 197 | 198 | 199 | Resource Files 200 | 201 | 202 | - 203 | \ No newline at end of file 204 | + 205 | -------------------------------------------------------------------------------- /recipe/patches/0019-Remove-unused-readelf.patch: -------------------------------------------------------------------------------- 1 | From ab2df197829c0d6050994268a287d9ddeb175976 Mon Sep 17 00:00:00 2001 2 | From: Charles Bousseau 3 | Date: Thu, 25 May 2023 17:56:53 -0400 4 | Subject: [PATCH 19/24] Remove unused readelf 5 | 6 | readelf has been dropped. 7 | .. date: 2022-11-02-10-56-40 8 | .. gh-issue: 98949 9 | .. nonce: 3SRD8C 10 | .. section: Build 11 | 12 | Drop unused build dependency on ``readelf``. 13 | --- 14 | Makefile.pre.in | 1 - 15 | 1 file changed, 1 deletion(-) 16 | 17 | diff --git a/Makefile.pre.in b/Makefile.pre.in 18 | index 3bd4495f95b..bb1935d39f1 100644 19 | --- a/Makefile.pre.in 20 | +++ b/Makefile.pre.in 21 | @@ -38,7 +38,6 @@ CC= @CC@ 22 | CXX= @CXX@ 23 | LINKCC= @LINKCC@ 24 | AR= @AR@ 25 | -READELF= @READELF@ 26 | SOABI= @SOABI@ 27 | ABIFLAGS= @ABIFLAGS@ 28 | ABI_THREAD= @ABI_THREAD@ 29 | -------------------------------------------------------------------------------- /recipe/patches/0020-Don-t-checksharedmods-if-cross-compiling.patch: -------------------------------------------------------------------------------- 1 | From ebec7ee6c8abe6c92b0729432bf7f3e1fb9270b0 Mon Sep 17 00:00:00 2001 2 | From: "Uwe L. Korn" 3 | Date: Fri, 1 Sep 2023 23:32:14 +0200 4 | Subject: [PATCH 20/24] Don't checksharedmods if cross-compiling 5 | 6 | --- 7 | Makefile.pre.in | 2 +- 8 | if_runnable.sh | 10 ++++++++++ 9 | 2 files changed, 11 insertions(+), 1 deletion(-) 10 | create mode 100755 if_runnable.sh 11 | 12 | diff --git a/Makefile.pre.in b/Makefile.pre.in 13 | index bb1935d39f1..9cdf143cece 100644 14 | --- a/Makefile.pre.in 15 | +++ b/Makefile.pre.in 16 | @@ -1367,7 +1367,7 @@ sharedmods: $(SHAREDMODS) pybuilddir.txt 17 | # dependency on BUILDPYTHON ensures that the target is run last 18 | .PHONY: checksharedmods 19 | checksharedmods: sharedmods $(PYTHON_FOR_BUILD_DEPS) $(BUILDPYTHON) 20 | - @$(RUNSHARED) $(PYTHON_FOR_BUILD) $(srcdir)/Tools/build/check_extension_modules.py 21 | + @$(RUNSHARED) $(srcdir)/if_runnable.sh $(PYTHON_FOR_BUILD) $(srcdir)/Tools/build/check_extension_modules.py 22 | 23 | .PHONY: rundsymutil 24 | rundsymutil: sharedmods $(PYTHON_FOR_BUILD_DEPS) $(BUILDPYTHON) 25 | diff --git a/if_runnable.sh b/if_runnable.sh 26 | new file mode 100755 27 | index 00000000000..dcfde5b751e 28 | --- /dev/null 29 | +++ b/if_runnable.sh 30 | @@ -0,0 +1,10 @@ 31 | +#!/bin/bash 32 | + 33 | +if [[ "${target_platform}" == "${build_platform}" || "${CROSSCOMPILING_EMULATOR:-}" != "" ]]; then 34 | + if [[ "$1" == "./"* ]]; then 35 | + exec $@ 36 | + else 37 | + export ${@:1:$#-2} 38 | + exec ${@: -2} 39 | + fi 40 | +fi 41 | -------------------------------------------------------------------------------- /recipe/patches/0021-Override-configure-LIBFFI.patch: -------------------------------------------------------------------------------- 1 | From 0419886743ef08325db0b5c55cbe9900d4e869cf Mon Sep 17 00:00:00 2001 2 | From: "Uwe L. Korn" 3 | Date: Tue, 5 Sep 2023 21:51:31 +0200 4 | Subject: [PATCH 21/24] Override configure LIBFFI 5 | 6 | --- 7 | configure | 2 +- 8 | 1 file changed, 1 insertion(+), 1 deletion(-) 9 | 10 | diff --git a/configure b/configure 11 | index a4df798edca..cd326e504e7 100755 12 | --- a/configure 13 | +++ b/configure 14 | @@ -14296,7 +14296,7 @@ if test "x$ac_cv_lib_ffi_ffi_call" = xyes 15 | then : 16 | 17 | have_libffi=yes 18 | - LIBFFI_CFLAGS="-I${SDKROOT}/usr/include/ffi -DUSING_APPLE_OS_LIBFFI=1" 19 | + LIBFFI_CFLAGS="-I${PREFIX}/include -DUSING_APPLE_OS_LIBFFI=0" 20 | LIBFFI_LIBS="-lffi" 21 | 22 | fi 23 | -------------------------------------------------------------------------------- /recipe/patches/0022-Unvendor-libmpdec.patch: -------------------------------------------------------------------------------- 1 | From ea4c51716d249618360910b88dc184f249935875 Mon Sep 17 00:00:00 2001 2 | From: Isuru Fernando 3 | Date: Fri, 16 Aug 2024 21:34:43 -0500 4 | Subject: [PATCH 22/24] Unvendor libmpdec 5 | 6 | --- 7 | PCbuild/_decimal.vcxproj | 50 +++++----------------------------------- 8 | 1 file changed, 6 insertions(+), 44 deletions(-) 9 | 10 | diff --git a/PCbuild/_decimal.vcxproj b/PCbuild/_decimal.vcxproj 11 | index e9d60b4db1a..0f49d7923f5 100644 12 | --- a/PCbuild/_decimal.vcxproj 13 | +++ b/PCbuild/_decimal.vcxproj 14 | @@ -93,65 +93,27 @@ 15 | 16 | 17 | 18 | - BUILD_LIBMPDEC;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) 19 | + _CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) 20 | CONFIG_32;PPRO;MASM;%(PreprocessorDefinitions) 21 | CONFIG_32;ANSI;%(PreprocessorDefinitions) 22 | CONFIG_64;ANSI;%(PreprocessorDefinitions) 23 | CONFIG_64;MASM;%(PreprocessorDefinitions) 24 | - ..\Modules\_decimal;..\Modules\_decimal\windows;$(mpdecimalDir)\libmpdec;%(AdditionalIncludeDirectories) 25 | + ..\Modules\_decimal;$(condaDir)\include;%(AdditionalIncludeDirectories) 26 | /d1trimfile:%SRC_DIR% 27 | /d1trimfile:%SRC_DIR% 28 | /d1trimfile:%SRC_DIR% 29 | /d1trimfile:%SRC_DIR% 30 | 31 | + 32 | + $(condaDir)\lib;%(AdditionalLibraryDirectories) 33 | + mpdec.lib;%(AdditionalDependencies) 34 | + 35 | 36 | 37 | - 38 | - 39 | - 40 | - 41 | - 42 | - 43 | 44 | - 45 | - 46 | - 47 | - 48 | - 49 | - 50 | - 51 | - 52 | - 53 | - 54 | - 55 | - 56 | - 57 | 58 | 59 | 60 | - 61 | - 62 | - 63 | - 64 | - 65 | - 66 | - 67 | - 68 | - 69 | - 70 | - 71 | - 72 | - 73 | - 74 | - 75 | - 76 | - 77 | - true 78 | - true 79 | - true 80 | - ml64 /nologo /c /Zi /Fo "$(IntDir)vcdiv64.obj" "%(FullPath)" 81 | - $(IntDir)vcdiv64.obj;%(Outputs) 82 | - 83 | 84 | 85 | 86 | -------------------------------------------------------------------------------- /recipe/patches/0023-Brand-conda-forge.patch: -------------------------------------------------------------------------------- 1 | From f7651087d4ada24bbe464d1c423da5852856ba2e Mon Sep 17 00:00:00 2001 2 | From: Isuru Fernando 3 | Date: Wed, 28 Aug 2024 11:12:22 -0500 4 | Subject: [PATCH 23/24] Brand conda-forge 5 | 6 | --- 7 | Lib/platform.py | 1 + 8 | Python/getversion.c | 4 ++-- 9 | 2 files changed, 3 insertions(+), 2 deletions(-) 10 | 11 | diff --git a/Lib/platform.py b/Lib/platform.py 12 | index fd93841d034..17d59c77025 100755 13 | --- a/Lib/platform.py 14 | +++ b/Lib/platform.py 15 | @@ -1198,6 +1198,7 @@ def _sys_version(sys_version=None): 16 | cpython_sys_version_parser = re.compile( 17 | r'([\w.+]+)\s*' # "version" 18 | r'(?:experimental free-threading build\s+)?' # "free-threading-build" 19 | + r'(?:\| packaged by conda-forge \|\s+)?' # "| packaged by conda-forge |" 20 | r'\(#?([^,]+)' # "(#buildno" 21 | r'(?:,\s*([\w ]*)' # ", builddate" 22 | r'(?:,\s*([\w :]*))?)?\)\s*' # ", buildtime)" 23 | diff --git a/Python/getversion.c b/Python/getversion.c 24 | index 226b2f999a6..92e4459bdac 100644 25 | --- a/Python/getversion.c 26 | +++ b/Python/getversion.c 27 | @@ -15,9 +15,9 @@ void _Py_InitVersion(void) 28 | } 29 | initialized = 1; 30 | #ifdef Py_GIL_DISABLED 31 | - const char *buildinfo_format = "%.80s experimental free-threading build (%.80s) %.80s"; 32 | + const char *buildinfo_format = "%.80s experimental free-threading build | packaged by conda-forge | (%.80s) %.80s"; 33 | #else 34 | - const char *buildinfo_format = "%.80s (%.80s) %.80s"; 35 | + const char *buildinfo_format = "%.80s | packaged by conda-forge | (%.80s) %.80s"; 36 | #endif 37 | PyOS_snprintf(version, sizeof(version), buildinfo_format, 38 | PY_VERSION, Py_GetBuildInfo(), Py_GetCompiler()); 39 | -------------------------------------------------------------------------------- /recipe/patches/0024-Do-not-define-pid_t-as-it-might-conflict-with-the-ac.patch: -------------------------------------------------------------------------------- 1 | From 57d58fa6a8cd001be82f6e1adef9640581dbbc7f Mon Sep 17 00:00:00 2001 2 | From: Isuru Fernando 3 | Date: Sun, 12 Jan 2025 10:37:29 +0530 4 | Subject: [PATCH 24/24] Do not define pid_t as it might conflict with the 5 | actual definition 6 | 7 | --- 8 | Modules/_testcapi/long.c | 4 ++++ 9 | Modules/_testcapimodule.c | 4 ++++ 10 | Modules/_testlimitedcapi/long.c | 4 ++++ 11 | Modules/clinic/posixmodule.c.h | 4 ++++ 12 | Modules/posixmodule.c | 1 + 13 | PC/pyconfig.h.in | 2 -- 14 | 6 files changed, 17 insertions(+), 2 deletions(-) 15 | 16 | diff --git a/Modules/_testcapi/long.c b/Modules/_testcapi/long.c 17 | index 769c3909ea3..242636c7cc4 100644 18 | --- a/Modules/_testcapi/long.c 19 | +++ b/Modules/_testcapi/long.c 20 | @@ -6,6 +6,10 @@ 21 | #include "util.h" 22 | #include "clinic/long.c.h" 23 | 24 | +#ifdef _MSC_VER 25 | +typedef int pid_t; 26 | +#endif 27 | + 28 | /*[clinic input] 29 | module _testcapi 30 | [clinic start generated code]*/ 31 | diff --git a/Modules/_testcapimodule.c b/Modules/_testcapimodule.c 32 | index 97e046a4822..feb5c0b13f0 100644 33 | --- a/Modules/_testcapimodule.c 34 | +++ b/Modules/_testcapimodule.c 35 | @@ -23,6 +23,10 @@ 36 | # include // W_STOPCODE 37 | #endif 38 | 39 | +#ifdef _MSC_VER 40 | +typedef int pid_t; 41 | +#endif 42 | + 43 | #ifdef bool 44 | # error "The public headers should not include , see gh-48924" 45 | #endif 46 | diff --git a/Modules/_testlimitedcapi/long.c b/Modules/_testlimitedcapi/long.c 47 | index e2af09d0840..24715ac5182 100644 48 | --- a/Modules/_testlimitedcapi/long.c 49 | +++ b/Modules/_testlimitedcapi/long.c 50 | @@ -8,6 +8,10 @@ 51 | #include "util.h" 52 | #include "clinic/long.c.h" 53 | 54 | +#ifdef _MSC_VER 55 | +typedef int pid_t; 56 | +#endif 57 | + 58 | /*[clinic input] 59 | module _testlimitedcapi 60 | [clinic start generated code]*/ 61 | diff --git a/Modules/clinic/posixmodule.c.h b/Modules/clinic/posixmodule.c.h 62 | index 25d242dbd42..4b166677dcb 100644 63 | --- a/Modules/clinic/posixmodule.c.h 64 | +++ b/Modules/clinic/posixmodule.c.h 65 | @@ -10,6 +10,10 @@ preserve 66 | #include "pycore_long.h" // _PyLong_UnsignedInt_Converter() 67 | #include "pycore_modsupport.h" // _PyArg_UnpackKeywords() 68 | 69 | +#if (defined(MS_WINDOWS_DESKTOP) || defined(MS_WINDOWS_APP) || defined(MS_WINDOWS_SYSTEM)) 70 | +typedef int pid_t; 71 | +#endif 72 | + 73 | PyDoc_STRVAR(os_stat__doc__, 74 | "stat($module, /, path, *, dir_fd=None, follow_symlinks=True)\n" 75 | "--\n" 76 | diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c 77 | index 601145e561d..4feddc37737 100644 78 | --- a/Modules/posixmodule.c 79 | +++ b/Modules/posixmodule.c 80 | @@ -43,6 +43,7 @@ 81 | # if defined(MS_WINDOWS_DESKTOP) || defined(MS_WINDOWS_SYSTEM) 82 | # define HAVE_SYMLINK 83 | # endif /* MS_WINDOWS_DESKTOP | MS_WINDOWS_SYSTEM */ 84 | +typedef int pid_t; 85 | #endif 86 | 87 | #ifndef MS_WINDOWS 88 | diff --git a/PC/pyconfig.h.in b/PC/pyconfig.h.in 89 | index 424421f6ff1..2c1b5a5b834 100644 90 | --- a/PC/pyconfig.h.in 91 | +++ b/PC/pyconfig.h.in 92 | @@ -230,8 +230,6 @@ typedef _W64 int Py_ssize_t; 93 | #endif 94 | #endif /* MS_WIN32 && !MS_WIN64 */ 95 | 96 | -typedef int pid_t; 97 | - 98 | /* define some ANSI types that are not defined in earlier Win headers */ 99 | #if _MSC_VER >= 1200 100 | /* This file only exists in VC 6.0 or higher */ 101 | -------------------------------------------------------------------------------- /recipe/patches/README.md: -------------------------------------------------------------------------------- 1 | ### How to re-generate patches 2 | ```bash 3 | old=v3.9.6 4 | new=v3.10.0 5 | git clone git@github.com:python/cpython && cd cpython 6 | git reset --hard $old 7 | for f in ../recipe/patches/*.patch; do 8 | git am $f; 9 | done 10 | head=$(git rev-parse HEAD) 11 | git reset --hard $new 12 | git cherry-pick $old...$head # fix conflicts and make sure the editor doesn't add end of file line ending 13 | git format-patch --no-signature $new 14 | for f in *.patch; do 15 | python ../recipe/patches/make-mixed-crlf-patch.py $f; 16 | done 17 | cp 00*.patch ../recipe/patches/ 18 | ``` 19 | 20 | On windows, the last loop can be done as follows (once the patches 21 | have been copied; executed within the `recipe/patch` folder): 22 | ```bash 23 | for /f %f in ('dir /b /S .') do python make-mixed-crlf-patch.py %f 24 | ``` 25 | -------------------------------------------------------------------------------- /recipe/patches/make-mixed-crlf-patch.py: -------------------------------------------------------------------------------- 1 | import sys 2 | import re 3 | import tempfile 4 | import shutil 5 | 6 | 7 | # Reads from argv[1] line-by-line, writes to same file. The patch 8 | # header lines are given LF line endings and the rest CRLF line endings. 9 | # Does not currently deal with the prelude (up to the -- in git patches). 10 | 11 | def main(argv): 12 | filename = argv[1] 13 | lines = [] 14 | with open(filename, 'rb') as fi: 15 | try: 16 | for line in fi: 17 | line = line.decode('utf-8').strip('\n').strip('\r\n') 18 | lines.append(line) 19 | except: 20 | pass 21 | is_git_diff = False 22 | for line in lines: 23 | if line.startswith('diff --git'): 24 | is_git_diff = True 25 | in_real_patch = False if is_git_diff else True 26 | 27 | text = "\n".join(lines) 28 | 29 | if ".bat" not in text and ".vcxproj" not in text and ".props" not in text: 30 | return 31 | 32 | with open(filename, 'wb') as fo: 33 | for i, line in enumerate(lines): 34 | if not in_real_patch: 35 | fo.write((line + '\n').encode('utf-8')) 36 | if line.startswith('diff --git'): 37 | in_real_patch = True 38 | else: 39 | if line.startswith('diff ') or \ 40 | line.startswith('diff --git') or \ 41 | line.startswith('--- ') or \ 42 | line.startswith('+++ ') or \ 43 | line.startswith('@@ ') or \ 44 | line.startswith('index ') or \ 45 | (i < len(lines) - 1 and lines[i+1].startswith(r"\ No newline at end of file")): 46 | fo.write((line + '\n').encode('utf-8')) 47 | else: 48 | fo.write((line + '\r\n').encode('utf-8')) 49 | 50 | 51 | if __name__ == '__main__': 52 | main(sys.argv) 53 | -------------------------------------------------------------------------------- /recipe/recipe-license.txt: -------------------------------------------------------------------------------- 1 | This recipe is based upon the python-3.5 recipe from 2 | https://github.com/ContinuumIO/anaconda-recipes 3 | which is released under the following BSD license: 4 | 5 | (c) 2016 Continuum Analytics, Inc. / http://continuum.io 6 | All Rights Reserved 7 | 8 | Redistribution and use in source and binary forms, with or without 9 | modification, are permitted provided that the following conditions are met: 10 | * Redistributions of source code must retain the above copyright 11 | notice, this list of conditions and the following disclaimer. 12 | * Redistributions in binary form must reproduce the above copyright 13 | notice, this list of conditions and the following disclaimer in the 14 | documentation and/or other materials provided with the distribution. 15 | * Neither the name of Continuum Analytics, Inc. nor the 16 | names of its contributors may be used to endorse or promote products 17 | derived from this software without specific prior written permission. 18 | 19 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 20 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 21 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 22 | DISCLAIMED. IN NO EVENT SHALL CONTINUUM ANALYTICS BE LIABLE FOR ANY 23 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 24 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 25 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 26 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 28 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | -------------------------------------------------------------------------------- /recipe/replace-word-pairs.py: -------------------------------------------------------------------------------- 1 | import sys 2 | import re 3 | 4 | # Reads from stdin line by line, writes to stdout line by line replacing 5 | # each odd argument with the subsequent even argument. 6 | 7 | def pairs(it): 8 | it = iter(it) 9 | try: 10 | while True: 11 | yield next(it), next(it) 12 | except StopIteration: 13 | return 14 | 15 | def main(): 16 | rep_dict = dict() 17 | for fro, to in pairs(sys.argv[1:]): 18 | rep_dict[fro] = to 19 | if len(rep_dict): 20 | regex = re.compile("(%s)" % "|".join(map(re.escape, rep_dict.keys()))) 21 | for line in iter(sys.stdin.readline, ''): 22 | sys.stdout.write(regex.sub(lambda mo: rep_dict[mo.string[mo.start():mo.end()]], line)) 23 | else: 24 | for line in iter(sys.stdin.readline, ''): 25 | sys.stdout.write(line) 26 | 27 | 28 | if __name__ == '__main__': 29 | main() 30 | -------------------------------------------------------------------------------- /recipe/run_test.py: -------------------------------------------------------------------------------- 1 | import os 2 | import platform 3 | import sys 4 | import subprocess 5 | 6 | armv6l = bool(platform.machine() == 'armv6l') 7 | armv7l = bool(platform.machine() == 'armv7l') 8 | ppc64le = bool(platform.machine() == 'ppc64le') 9 | if sys.platform == 'darwin': 10 | osx105 = b'10.5.' in subprocess.check_output('sw_vers') 11 | else: 12 | osx105 = False 13 | 14 | print('sys.version:', sys.version) 15 | print('sys.platform:', sys.platform) 16 | print('tuple.__itemsize__:', tuple.__itemsize__) 17 | if sys.platform == 'win32': 18 | assert 'MSC v.19' in sys.version 19 | if hasattr(sys, "abiflags"): 20 | print('sys.abiflags', sys.abiflags) 21 | print('sys.maxunicode:', sys.maxunicode) 22 | print('platform.architecture:', platform.architecture()) 23 | print('platform.python_version:', platform.python_version()) 24 | 25 | import _bisect 26 | import _codecs_cn 27 | import _codecs_hk 28 | import _codecs_iso2022 29 | import _codecs_jp 30 | import _codecs_kr 31 | import _codecs_tw 32 | import _collections 33 | import _csv 34 | import _ctypes 35 | import _ctypes_test 36 | import _decimal 37 | import _elementtree 38 | import _functools 39 | import _hashlib 40 | import _heapq 41 | import _io 42 | import _json 43 | import _locale 44 | import _lsprof 45 | import _lzma 46 | import _multibytecodec 47 | import _multiprocessing 48 | import _random 49 | import _socket 50 | import _sqlite3 51 | import _ssl 52 | import _struct 53 | import _testcapi 54 | import array 55 | import binascii 56 | import bz2 57 | import cmath 58 | import datetime 59 | import itertools 60 | import lzma 61 | import math 62 | import mmap 63 | import operator 64 | import pyexpat 65 | import select 66 | import time 67 | import test 68 | import test.support 69 | import unicodedata 70 | import zlib 71 | from os import urandom 72 | import os 73 | 74 | t = 100 * b'Foo ' 75 | assert lzma.decompress(lzma.compress(t)) == t 76 | 77 | if sys.platform != 'win32': 78 | if not (ppc64le or armv7l): 79 | import _curses 80 | import _curses_panel 81 | import fcntl 82 | import grp 83 | import readline 84 | import resource 85 | import syslog 86 | import termios 87 | 88 | if os.getenv('PY_INTERP_DEBUG') == 'yes': 89 | if sys.platform != 'win32': 90 | assert 'd' in sys.abiflags 91 | assert 'gettotalrefcount' in dir(sys) 92 | 93 | if not (armv6l or armv7l or ppc64le or osx105): 94 | import tkinter 95 | import turtle 96 | import _tkinter 97 | print('TK_VERSION: %s' % _tkinter.TK_VERSION) 98 | print('TCL_VERSION: %s' % _tkinter.TCL_VERSION) 99 | TCLTK_VER = os.getenv('tk') 100 | assert _tkinter.TK_VERSION == _tkinter.TCL_VERSION == TCLTK_VER 101 | 102 | import ssl 103 | print('OPENSSL_VERSION:', ssl.OPENSSL_VERSION) 104 | CONDA_OPENSSL_VERSION = os.getenv('openssl') 105 | assert CONDA_OPENSSL_VERSION in ssl.OPENSSL_VERSION 106 | 107 | # See https://github.com/conda-forge/python-feedstock/issues/718 for context: 108 | assert sys.hash_info.algorithm.startswith("siphash") 109 | -------------------------------------------------------------------------------- /recipe/scripts/activate.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | set "PYTHON_JIT_CONDA_BACKUP=%PYTHON_JIT%" 3 | set "PYTHON_JIT=1" 4 | -------------------------------------------------------------------------------- /recipe/scripts/activate.sh: -------------------------------------------------------------------------------- 1 | if [ "${PYTHON_JIT+x}" ] ; then 2 | export PYTHON_JIT_CONDA_BACKUP="${PYTHON_JIT}" 3 | fi 4 | export PYTHON_JIT=1 5 | -------------------------------------------------------------------------------- /recipe/scripts/deactivate.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | set "PYTHON_JIT=%PYTHON_JIT_CONDA_BACKUP%" 3 | set "PYTHON_JIT_CONDA_BACKUP=" 4 | -------------------------------------------------------------------------------- /recipe/scripts/deactivate.sh: -------------------------------------------------------------------------------- 1 | if [ "${PYTHON_JIT_CONDA_BACKUP+x}" ] ; then 2 | export PYTHON_JIT=$PYTHON_JIT_CONDA_BACKUP 3 | unset PYTHON_JIT_CONDA_BACKUP 4 | fi 5 | -------------------------------------------------------------------------------- /recipe/sitecustomize.py: -------------------------------------------------------------------------------- 1 | import site, sys, os 2 | 3 | dirs_to_add = [] 4 | # Workaround for https://github.com/conda/conda/issues/14053 5 | # Older conda versions install noarch: python packages in wrong places. 6 | # For example python3.1 because older conda assumed python minor version 7 | # will have only one digit. noarhc pkgs for freethreading builds are supposed 8 | # to be installed into /lib/python3.13t/site-packages, but conda 9 | # installs them to /lib/python3.13/site-packages. 10 | # The workaround is to add all these wrong paths to sys.path using 11 | # site.addsitedir so that cpython and other tools like pip know about these 12 | # locations to check when importing packages and uninstalling packages. 13 | # When installing packages, pip will use the correct location 14 | # /lib/python3.13t/site-packages. 15 | if 't' in sys.abiflags: 16 | dirs_to_add.append(os.path.join(sys.prefix, 'lib', f'python3.{sys.version_info[1]}', 'site-packages')) 17 | # Workaround for https://github.com/conda/conda/issues/10969 18 | dirs_to_add.append(os.path.join(sys.prefix, 'lib', f'python3.1', 'site-packages')) 19 | # A python version independent directory that ABI3 and noarch packages can use. 20 | # This is unused at the moment, but keeping it here for experimentation. 21 | dirs_to_add.append(os.path.join(sys.prefix, 'lib', f'python', 'site-packages')) 22 | 23 | for d in dirs_to_add: 24 | if os.path.exists(d): 25 | site.addsitedir(d) 26 | -------------------------------------------------------------------------------- /recipe/tests/cmake/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # https://martinopilia.com/posts/2018/09/15/building-python-extension.html 2 | # FindPythonInterp and FindPythonLibs are deprecated since cmake 3.12 3 | # These can be replaced by find_package(Python ${PY_VER} REQUIRED) 4 | # But these are still used by other packages, so we keep them. 5 | 6 | cmake_minimum_required(VERSION 3.10) 7 | enable_language(C) 8 | project(mymath) 9 | 10 | option(PY_VER, "Python version to use") 11 | 12 | find_package(PythonInterp ${PY_VER} REQUIRED) 13 | # PATHS $ENV{CONDA_PREFIX} 14 | 15 | # This goes after, since it uses PythonInterp as hint 16 | find_package(PythonLibs ${PY_VER} REQUIRED) 17 | -------------------------------------------------------------------------------- /recipe/tests/distutils.cext/foo.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | static PyObject * 4 | greet_name(PyObject *self, PyObject *args) 5 | { 6 | const char *name; 7 | 8 | if (!PyArg_ParseTuple(args, "s", &name)) 9 | { 10 | return NULL; 11 | } 12 | 13 | printf("Hello %s!\n", name); 14 | 15 | Py_RETURN_NONE; 16 | } 17 | 18 | static PyMethodDef GreetMethods[] = { 19 | {"greet", greet_name, METH_VARARGS, "Greet an entity."}, 20 | {NULL, NULL, 0, NULL} 21 | }; 22 | 23 | static struct PyModuleDef greet = 24 | { 25 | PyModuleDef_HEAD_INIT, 26 | "greet", /* name of module */ 27 | "", /* module documentation, may be NULL */ 28 | -1, /* size of per-interpreter state of the module, or -1 if the module keeps state in global variables. */ 29 | GreetMethods 30 | }; 31 | 32 | PyMODINIT_FUNC PyInit_greet(void) 33 | { 34 | return PyModule_Create(&greet); 35 | } 36 | 37 | -------------------------------------------------------------------------------- /recipe/tests/distutils.cext/foo.py: -------------------------------------------------------------------------------- 1 | import greet 2 | 3 | def main(): 4 | greet.greet('World') 5 | 6 | if __name__ == "__main__": 7 | main() 8 | -------------------------------------------------------------------------------- /recipe/tests/distutils.cext/setup.py.do_not_run_me_on_0_releases: -------------------------------------------------------------------------------- 1 | from setuptools import setup, Extension 2 | 3 | 4 | setup( 5 | name='greet', 6 | version='1.0', 7 | description='Python Package with Hello World C Extension', 8 | ext_modules=[ 9 | Extension( 10 | 'greet', 11 | sources=['foo.c'], 12 | py_limited_api=True) 13 | ], 14 | ) 15 | -------------------------------------------------------------------------------- /recipe/tests/prefix-replacement/a.c: -------------------------------------------------------------------------------- 1 | #define PY_SSIZE_T_CLEAN 2 | #include 3 | 4 | int 5 | main(int argc, char *argv[]) 6 | { 7 | wchar_t *program = Py_DecodeLocale(argv[0], NULL); 8 | if (program == NULL) { 9 | fprintf(stderr, "Fatal error: cannot decode argv[0]\n"); 10 | exit(1); 11 | } 12 | // Removed in Python 3.13 and needs to be replaced with https://docs.python.org/3.13/c-api/init_config.html#c.PyConfig.program_name 13 | // Py_SetProgramName(program); /* optional but recommended */ 14 | Py_Initialize(); 15 | PyRun_SimpleString("from time import time,ctime\n" 16 | "print('Today is', ctime(time()))\n"); 17 | if (Py_FinalizeEx() < 0) { 18 | exit(120); 19 | } 20 | PyMem_RawFree(program); 21 | return 0; 22 | } 23 | 24 | -------------------------------------------------------------------------------- /recipe/tests/prefix-replacement/build-and-test.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -ex 4 | 5 | if [[ "$PKG_NAME" == "libpython-static" ]]; then 6 | # see bpo44182 for why -L${CONDA_PREFIX}/lib is added 7 | ${CC} a.c $(python3-config --cflags) $(python3-config --embed --ldflags) -L${CONDA_PREFIX}/lib -o ${CONDA_PREFIX}/bin/embedded-python-static 8 | if [[ "$target_platform" == linux-* ]]; then 9 | if ${READELF} -d ${CONDA_PREFIX}/bin/embedded-python-static | rg libpython; then 10 | echo "ERROR :: Embedded python linked to shared python library. It is expected to link to the static library." 11 | fi 12 | elif [[ "$target_platform" == osx-* ]]; then 13 | if ${OTOOL} -l ${CONDA_PREFIX}/bin/embedded-python-static | rg libpython; then 14 | echo "ERROR :: Embedded python linked to shared python library. It is expected to link to the static library." 15 | fi 16 | fi 17 | ${CONDA_PREFIX}/bin/embedded-python-static 18 | 19 | # I thought this would prefer the shared library for Python. I was wrong: 20 | # EMBED_LDFLAGS=$(python3-config --ldflags) 21 | # re='^(.*)(-lpython[^ ]*)(.*)$' 22 | # if [[ ${EMBED_LDFLAGS} =~ $re ]]; then 23 | # EMBED_LDFLAGS="${BASH_REMATCH[1]} ${BASH_REMATCH[3]} -Wl,-Bdynamic ${BASH_REMATCH[2]}" 24 | # fi 25 | # ${CC} a.c $(python3-config --cflags) ${EMBED_LDFLAGS} -o ${CONDA_PREFIX}/bin/embedded-python-shared 26 | 27 | # Brute-force way of linking to the shared library, sorry! 28 | rm -rf ${CONDA_PREFIX}/lib/libpython*.a 29 | fi 30 | 31 | ${CC} a.c $(python3-config --cflags) \ 32 | $(python3-config --embed --ldflags) \ 33 | -L${CONDA_PREFIX}/lib -Wl,-rpath,${CONDA_PREFIX}/lib \ 34 | -o ${CONDA_PREFIX}/bin/embedded-python-shared 35 | 36 | if [[ "$target_platform" == linux-* ]]; then 37 | if ! ${READELF} -d ${CONDA_PREFIX}/bin/embedded-python-shared | rg libpython; then 38 | echo "ERROR :: Embedded python linked to static python library. We tried to force it to use the shared library." 39 | fi 40 | elif [[ "$target_platform" == osx-* ]]; then 41 | if ! ${OTOOL} -l ${CONDA_PREFIX}/bin/embedded-python-shared | rg libpython; then 42 | echo "ERROR :: Embedded python linked to static python library. We tried to force it to use the shared library." 43 | fi 44 | fi 45 | ${CONDA_PREFIX}/bin/embedded-python-shared 46 | 47 | set +x 48 | -------------------------------------------------------------------------------- /recipe/yum_requirements.txt: -------------------------------------------------------------------------------- 1 | #tk_needs_libx11_but_avoids_a_runtime_requirement_of_libx11_to_reduce_the_dependencies_of_python 2 | libX11 3 | #libxcb_is_a_dependency_of_libx11_but_deps_are_wrong_on_our_cdt 4 | libxcb 5 | libXau 6 | --------------------------------------------------------------------------------