From 2bef27badf1f0630486322a4d9dca2af555795ed Mon Sep 17 00:00:00 2001 From: regro-cf-autotick-bot Date: Thu, 13 Aug 2020 19:51:22 +0000 Subject: [PATCH 01/29] migration: OSXArm --- conda-forge.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/conda-forge.yml b/conda-forge.yml index d5f3eaa16..48e766aea 100644 --- a/conda-forge.yml +++ b/conda-forge.yml @@ -1,5 +1,7 @@ +build_platform: {osx_arm64: osx_64} compiler_stack: comp7 +conda_forge_output_validation: true max_py_ver: '38' max_r_ver: '35' provider: {linux_aarch64: native, linux_ppc64le: native, osx: azure, win: azure} -conda_forge_output_validation: true +test_on_native_only: true From be06056c16ddbd23192298a05fbdc1273dbee2f5 Mon Sep 17 00:00:00 2001 From: regro-cf-autotick-bot Date: Thu, 13 Aug 2020 19:51:48 +0000 Subject: [PATCH 02/29] MNT: Re-rendered with conda-build 3.19.2, conda-smithy 3.7.9, and conda-forge-pinning 2020.08.13.04.25.14 --- .azure-pipelines/azure-pipelines-osx.yml | 11 +++- ...6.____cpythontarget_platformosx-arm64.yaml | 58 +++++++++++++++++++ ...7.____cpythontarget_platformosx-arm64.yaml | 58 +++++++++++++++++++ ...8.____cpythontarget_platformosx-arm64.yaml | 58 +++++++++++++++++++ .scripts/build_steps.sh | 6 +- .scripts/run_osx_build.sh | 7 ++- .travis.yml | 5 +- README.md | 21 +++++++ 8 files changed, 217 insertions(+), 7 deletions(-) create mode 100644 .ci_support/osx_arm64_python3.6.____cpythontarget_platformosx-arm64.yaml create mode 100644 .ci_support/osx_arm64_python3.7.____cpythontarget_platformosx-arm64.yaml create mode 100644 .ci_support/osx_arm64_python3.8.____cpythontarget_platformosx-arm64.yaml diff --git a/.azure-pipelines/azure-pipelines-osx.yml b/.azure-pipelines/azure-pipelines-osx.yml index ba6706c1a..452d268e2 100755 --- a/.azure-pipelines/azure-pipelines-osx.yml +++ b/.azure-pipelines/azure-pipelines-osx.yml @@ -5,7 +5,7 @@ jobs: - job: osx pool: - vmImage: macOS-10.14 + vmImage: macOS-10.15 strategy: matrix: osx_64_python3.6.____cpythontarget_platformosx-64: @@ -17,6 +17,15 @@ jobs: osx_64_python3.8.____cpythontarget_platformosx-64: CONFIG: osx_64_python3.8.____cpythontarget_platformosx-64 UPLOAD_PACKAGES: 'True' + osx_arm64_python3.6.____cpythontarget_platformosx-arm64: + CONFIG: osx_arm64_python3.6.____cpythontarget_platformosx-arm64 + UPLOAD_PACKAGES: 'True' + osx_arm64_python3.7.____cpythontarget_platformosx-arm64: + CONFIG: osx_arm64_python3.7.____cpythontarget_platformosx-arm64 + UPLOAD_PACKAGES: 'True' + osx_arm64_python3.8.____cpythontarget_platformosx-arm64: + CONFIG: osx_arm64_python3.8.____cpythontarget_platformosx-arm64 + UPLOAD_PACKAGES: 'True' maxParallel: 8 timeoutInMinutes: 360 diff --git a/.ci_support/osx_arm64_python3.6.____cpythontarget_platformosx-arm64.yaml b/.ci_support/osx_arm64_python3.6.____cpythontarget_platformosx-arm64.yaml new file mode 100644 index 000000000..be99567d9 --- /dev/null +++ b/.ci_support/osx_arm64_python3.6.____cpythontarget_platformosx-arm64.yaml @@ -0,0 +1,58 @@ +MACOSX_DEPLOYMENT_TARGET: +- '11.0' +bzip2: +- '1' +c_compiler: +- clang +c_compiler_version: +- '11' +channel_sources: +- conda-forge/label/llvm_rc,conda-forge,https://conda-web.anaconda.org/conda-forge +channel_targets: +- conda-forge main +cxx_compiler: +- clangxx +cxx_compiler_version: +- '11' +libffi: +- '3.2' +macos_machine: +- arm64-apple-darwin20.0.0 +macos_min_version: +- '11.0' +openssl: +- 1.1.1 +pin_run_as_build: + bzip2: + max_pin: x + libffi: + max_pin: x.x + openssl: + max_pin: x.x.x + python: + min_pin: x.x + max_pin: x.x + readline: + max_pin: x + sqlite: + max_pin: x + tk: + max_pin: x.x + xz: + max_pin: x.x + zlib: + max_pin: x.x +python: +- 3.6.* *_cpython +readline: +- '8.0' +sqlite: +- '3' +target_platform: +- osx-arm64 +tk: +- '8.6' +xz: +- '5.2' +zlib: +- '1.2' diff --git a/.ci_support/osx_arm64_python3.7.____cpythontarget_platformosx-arm64.yaml b/.ci_support/osx_arm64_python3.7.____cpythontarget_platformosx-arm64.yaml new file mode 100644 index 000000000..6ae482d2c --- /dev/null +++ b/.ci_support/osx_arm64_python3.7.____cpythontarget_platformosx-arm64.yaml @@ -0,0 +1,58 @@ +MACOSX_DEPLOYMENT_TARGET: +- '11.0' +bzip2: +- '1' +c_compiler: +- clang +c_compiler_version: +- '11' +channel_sources: +- conda-forge/label/llvm_rc,conda-forge,https://conda-web.anaconda.org/conda-forge +channel_targets: +- conda-forge main +cxx_compiler: +- clangxx +cxx_compiler_version: +- '11' +libffi: +- '3.2' +macos_machine: +- arm64-apple-darwin20.0.0 +macos_min_version: +- '11.0' +openssl: +- 1.1.1 +pin_run_as_build: + bzip2: + max_pin: x + libffi: + max_pin: x.x + openssl: + max_pin: x.x.x + python: + min_pin: x.x + max_pin: x.x + readline: + max_pin: x + sqlite: + max_pin: x + tk: + max_pin: x.x + xz: + max_pin: x.x + zlib: + max_pin: x.x +python: +- 3.7.* *_cpython +readline: +- '8.0' +sqlite: +- '3' +target_platform: +- osx-arm64 +tk: +- '8.6' +xz: +- '5.2' +zlib: +- '1.2' diff --git a/.ci_support/osx_arm64_python3.8.____cpythontarget_platformosx-arm64.yaml b/.ci_support/osx_arm64_python3.8.____cpythontarget_platformosx-arm64.yaml new file mode 100644 index 000000000..c18911f18 --- /dev/null +++ b/.ci_support/osx_arm64_python3.8.____cpythontarget_platformosx-arm64.yaml @@ -0,0 +1,58 @@ +MACOSX_DEPLOYMENT_TARGET: +- '11.0' +bzip2: +- '1' +c_compiler: +- clang +c_compiler_version: +- '11' +channel_sources: +- conda-forge/label/llvm_rc,conda-forge,https://conda-web.anaconda.org/conda-forge +channel_targets: +- conda-forge main +cxx_compiler: +- clangxx +cxx_compiler_version: +- '11' +libffi: +- '3.2' +macos_machine: +- arm64-apple-darwin20.0.0 +macos_min_version: +- '11.0' +openssl: +- 1.1.1 +pin_run_as_build: + bzip2: + max_pin: x + libffi: + max_pin: x.x + openssl: + max_pin: x.x.x + python: + min_pin: x.x + max_pin: x.x + readline: + max_pin: x + sqlite: + max_pin: x + tk: + max_pin: x.x + xz: + max_pin: x.x + zlib: + max_pin: x.x +python: +- 3.8.* *_cpython +readline: +- '8.0' +sqlite: +- '3' +target_platform: +- osx-arm64 +tk: +- '8.6' +xz: +- '5.2' +zlib: +- '1.2' diff --git a/.scripts/build_steps.sh b/.scripts/build_steps.sh index 21e63046b..b06ffc167 100755 --- a/.scripts/build_steps.sh +++ b/.scripts/build_steps.sh @@ -37,8 +37,12 @@ source run_conda_forge_build_setup # make the build number clobber make_build_number "${FEEDSTOCK_ROOT}" "${RECIPE_ROOT}" "${CONFIG_FILE}" +if [[ "${HOST_PLATFORM}" != "${BUILD_PLATFORM}" ]]; then + EXTRA_CB_OPTIONS="${EXTRA_CB_OPTIONS:-} --no-test" +fi + conda build "${RECIPE_ROOT}" -m "${CI_SUPPORT}/${CONFIG}.yaml" \ - --suppress-variables \ + --suppress-variables ${EXTRA_CB_OPTIONS:-} \ --clobber-file "${CI_SUPPORT}/clobber_${CONFIG}.yaml" validate_recipe_outputs "${FEEDSTOCK_NAME}" diff --git a/.scripts/run_osx_build.sh b/.scripts/run_osx_build.sh index d7e3c0651..d64afd097 100755 --- a/.scripts/run_osx_build.sh +++ b/.scripts/run_osx_build.sh @@ -47,7 +47,12 @@ set -e echo -e "\n\nMaking the build clobber file and running the build." make_build_number ./ ./recipe ./.ci_support/${CONFIG}.yaml -conda build ./recipe -m ./.ci_support/${CONFIG}.yaml --suppress-variables --clobber-file ./.ci_support/clobber_${CONFIG}.yaml + +if [[ "${HOST_PLATFORM}" != "${BUILD_PLATFORM}" ]]; then + EXTRA_CB_OPTIONS="${EXTRA_CB_OPTIONS:-} --no-test" +fi + +conda build ./recipe -m ./.ci_support/${CONFIG}.yaml --suppress-variables --clobber-file ./.ci_support/clobber_${CONFIG}.yaml ${EXTRA_CB_OPTIONS:-} validate_recipe_outputs "${FEEDSTOCK_NAME}" if [[ "${UPLOAD_PACKAGES}" != "False" ]]; then diff --git a/.travis.yml b/.travis.yml index 1ded8a78e..773be5796 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,10 +3,7 @@ language: generic -env: - global: - # The BINSTAR_TOKEN secure variable. This is defined canonically in conda-forge.yml. - - secure: "XlN4awda3oHgy9VyeOYp5uHidR0l9bdZ8Y/RdVKs19WkUHPY0qZIALURC1cWaKdDbDrkSfUq7xiutl/248yR59fLUBdzLOBx+41pmoJ/PhhmZ/x+IvG2iX7RFcPQhuySi3UfZuymtvPCJ1ezXsyl/cFDHCOexaIXPQgiye6vm/QPFUSxyZ9ymvK4RcwdghteHR4wQpm6Lbr2eblarj+bGrymrq15vkUMvHpI8jJRHfYE9ItbHZ/uMlXfbltAPT1uHM96vQliaAPa544fVxZTLBNu8v/kVD0dfMo7A1BBiwvQj/6d+NAOqhVzXkRMkGdaQYnqq3hVOmLnJ8LjEGF0o+q2+7ENnQbdVZdyrnbwSzxLDS32LgisMGa4s/qSWwcBHeZJxTW7YRLOnMKKkDYBd5J9y7sFjIAAfRgTc2wfwvcqQfvLT17MXIwFOcN8VPulGOg9HKrfDDGsCMvPliqiE1hy96Y3aoc8BcVHINMdoE2QuCBKGDsYmSK2IHglJT1crdyVA8kpu9k6oif1dpLjGpa+wxI1hjGTHE0ookiLnN2rTj36vRibu2GC3jUQGPccDQHY/wzd4CfSitmSnudvGKk8PSf/WklirsTLXtgp53J7w+lXu62Aq7PoFBVhZl6/bEjbs7iihlBVHbuEMeW/EwMsWVABQBCAOhF2b40jyEs=" + matrix: include: diff --git a/README.md b/README.md index efb93dabd..526ae99b7 100644 --- a/README.md +++ b/README.md @@ -132,6 +132,27 @@ Current build status variant + + osx_arm64_python3.6.____cpythontarget_platformosx-arm64 + + + variant + + + + osx_arm64_python3.7.____cpythontarget_platformosx-arm64 + + + variant + + + + osx_arm64_python3.8.____cpythontarget_platformosx-arm64 + + + variant + + win_64_target_platformwin-64 From 1aa13bdc4c31c90d36e70b019e4f227a36f6e3ad Mon Sep 17 00:00:00 2001 From: Isuru Fernando Date: Thu, 13 Aug 2020 15:01:43 -0500 Subject: [PATCH 03/29] Update conda_build_config.yaml --- recipe/conda_build_config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipe/conda_build_config.yaml b/recipe/conda_build_config.yaml index aaf5c05fe..25a28eacb 100644 --- a/recipe/conda_build_config.yaml +++ b/recipe/conda_build_config.yaml @@ -1,5 +1,5 @@ -python: # [win] - - 3.8 # [win] +python: + - 3.8 c_compiler: # [win] - vs2017 # [win] cxx_compiler: # [win] From 0e2ff577aa9ca0065d50c1776860d39ad8ff92bf Mon Sep 17 00:00:00 2001 From: conda-forge-linter Date: Thu, 13 Aug 2020 20:03:34 +0000 Subject: [PATCH 04/29] MNT: Re-rendered with conda-build 3.19.2, conda-smithy 3.7.9, and conda-forge-pinning 2020.08.13.04.25.14 --- .azure-pipelines/azure-pipelines-linux.yml | 12 +-- .azure-pipelines/azure-pipelines-osx.yml | 20 +---- ....7.____cpythontarget_platformlinux-64.yaml | 58 ------------ ....8.____cpythontarget_platformlinux-64.yaml | 58 ------------ ... => linux_64_target_platformlinux-64.yaml} | 2 +- ...__cpythontarget_platformlinux-aarch64.yaml | 64 ------------- ...__cpythontarget_platformlinux-aarch64.yaml | 64 ------------- ...aarch64_target_platformlinux-aarch64.yaml} | 2 +- ...__cpythontarget_platformlinux-ppc64le.yaml | 54 ----------- ...__cpythontarget_platformlinux-ppc64le.yaml | 54 ----------- ...ppc64le_target_platformlinux-ppc64le.yaml} | 2 +- ...n3.6.____cpythontarget_platformosx-64.yaml | 58 ------------ ...n3.8.____cpythontarget_platformosx-64.yaml | 58 ------------ ...yaml => osx_64_target_platformosx-64.yaml} | 2 +- ...6.____cpythontarget_platformosx-arm64.yaml | 58 ------------ ...8.____cpythontarget_platformosx-arm64.yaml | 58 ------------ ...> osx_arm64_target_platformosx-arm64.yaml} | 2 +- .drone.yml | 66 +------------- .travis.yml | 10 +-- README.md | 90 +++---------------- 20 files changed, 24 insertions(+), 768 deletions(-) delete mode 100644 .ci_support/linux_64_python3.7.____cpythontarget_platformlinux-64.yaml delete mode 100644 .ci_support/linux_64_python3.8.____cpythontarget_platformlinux-64.yaml rename .ci_support/{linux_64_python3.6.____cpythontarget_platformlinux-64.yaml => linux_64_target_platformlinux-64.yaml} (97%) delete mode 100644 .ci_support/linux_aarch64_python3.6.____cpythontarget_platformlinux-aarch64.yaml delete mode 100644 .ci_support/linux_aarch64_python3.8.____cpythontarget_platformlinux-aarch64.yaml rename .ci_support/{linux_aarch64_python3.7.____cpythontarget_platformlinux-aarch64.yaml => linux_aarch64_target_platformlinux-aarch64.yaml} (97%) delete mode 100644 .ci_support/linux_ppc64le_python3.6.____cpythontarget_platformlinux-ppc64le.yaml delete mode 100644 .ci_support/linux_ppc64le_python3.8.____cpythontarget_platformlinux-ppc64le.yaml rename .ci_support/{linux_ppc64le_python3.7.____cpythontarget_platformlinux-ppc64le.yaml => linux_ppc64le_target_platformlinux-ppc64le.yaml} (97%) delete mode 100644 .ci_support/osx_64_python3.6.____cpythontarget_platformosx-64.yaml delete mode 100644 .ci_support/osx_64_python3.8.____cpythontarget_platformosx-64.yaml rename .ci_support/{osx_64_python3.7.____cpythontarget_platformosx-64.yaml => osx_64_target_platformosx-64.yaml} (97%) delete mode 100644 .ci_support/osx_arm64_python3.6.____cpythontarget_platformosx-arm64.yaml delete mode 100644 .ci_support/osx_arm64_python3.8.____cpythontarget_platformosx-arm64.yaml rename .ci_support/{osx_arm64_python3.7.____cpythontarget_platformosx-arm64.yaml => osx_arm64_target_platformosx-arm64.yaml} (97%) diff --git a/.azure-pipelines/azure-pipelines-linux.yml b/.azure-pipelines/azure-pipelines-linux.yml index 95c0c5994..3f72c4cb6 100755 --- a/.azure-pipelines/azure-pipelines-linux.yml +++ b/.azure-pipelines/azure-pipelines-linux.yml @@ -8,16 +8,8 @@ jobs: vmImage: ubuntu-16.04 strategy: matrix: - linux_64_python3.6.____cpythontarget_platformlinux-64: - CONFIG: linux_64_python3.6.____cpythontarget_platformlinux-64 - UPLOAD_PACKAGES: 'True' - DOCKER_IMAGE: condaforge/linux-anvil-comp7 - linux_64_python3.7.____cpythontarget_platformlinux-64: - CONFIG: linux_64_python3.7.____cpythontarget_platformlinux-64 - UPLOAD_PACKAGES: 'True' - DOCKER_IMAGE: condaforge/linux-anvil-comp7 - linux_64_python3.8.____cpythontarget_platformlinux-64: - CONFIG: linux_64_python3.8.____cpythontarget_platformlinux-64 + linux_64_target_platformlinux-64: + CONFIG: linux_64_target_platformlinux-64 UPLOAD_PACKAGES: 'True' DOCKER_IMAGE: condaforge/linux-anvil-comp7 maxParallel: 8 diff --git a/.azure-pipelines/azure-pipelines-osx.yml b/.azure-pipelines/azure-pipelines-osx.yml index 452d268e2..2be27d43f 100755 --- a/.azure-pipelines/azure-pipelines-osx.yml +++ b/.azure-pipelines/azure-pipelines-osx.yml @@ -8,23 +8,11 @@ jobs: vmImage: macOS-10.15 strategy: matrix: - osx_64_python3.6.____cpythontarget_platformosx-64: - CONFIG: osx_64_python3.6.____cpythontarget_platformosx-64 + osx_64_target_platformosx-64: + CONFIG: osx_64_target_platformosx-64 UPLOAD_PACKAGES: 'True' - osx_64_python3.7.____cpythontarget_platformosx-64: - CONFIG: osx_64_python3.7.____cpythontarget_platformosx-64 - UPLOAD_PACKAGES: 'True' - osx_64_python3.8.____cpythontarget_platformosx-64: - CONFIG: osx_64_python3.8.____cpythontarget_platformosx-64 - UPLOAD_PACKAGES: 'True' - osx_arm64_python3.6.____cpythontarget_platformosx-arm64: - CONFIG: osx_arm64_python3.6.____cpythontarget_platformosx-arm64 - UPLOAD_PACKAGES: 'True' - osx_arm64_python3.7.____cpythontarget_platformosx-arm64: - CONFIG: osx_arm64_python3.7.____cpythontarget_platformosx-arm64 - UPLOAD_PACKAGES: 'True' - osx_arm64_python3.8.____cpythontarget_platformosx-arm64: - CONFIG: osx_arm64_python3.8.____cpythontarget_platformosx-arm64 + osx_arm64_target_platformosx-arm64: + CONFIG: osx_arm64_target_platformosx-arm64 UPLOAD_PACKAGES: 'True' maxParallel: 8 timeoutInMinutes: 360 diff --git a/.ci_support/linux_64_python3.7.____cpythontarget_platformlinux-64.yaml b/.ci_support/linux_64_python3.7.____cpythontarget_platformlinux-64.yaml deleted file mode 100644 index 61475dac5..000000000 --- a/.ci_support/linux_64_python3.7.____cpythontarget_platformlinux-64.yaml +++ /dev/null @@ -1,58 +0,0 @@ -bzip2: -- '1' -c_compiler: -- gcc -c_compiler_version: -- '7' -channel_sources: -- conda-forge,defaults -channel_targets: -- conda-forge main -cxx_compiler: -- gxx -cxx_compiler_version: -- '7' -docker_image: -- condaforge/linux-anvil-comp7 -libffi: -- '3.2' -ncurses: -- '6.2' -openssl: -- 1.1.1 -pin_run_as_build: - bzip2: - max_pin: x - libffi: - max_pin: x.x - ncurses: - max_pin: x.x - openssl: - max_pin: x.x.x - python: - min_pin: x.x - max_pin: x.x - readline: - max_pin: x - sqlite: - max_pin: x - tk: - max_pin: x.x - xz: - max_pin: x.x - zlib: - max_pin: x.x -python: -- 3.7.* *_cpython -readline: -- '8.0' -sqlite: -- '3' -target_platform: -- linux-64 -tk: -- '8.6' -xz: -- '5.2' -zlib: -- '1.2' diff --git a/.ci_support/linux_64_python3.8.____cpythontarget_platformlinux-64.yaml b/.ci_support/linux_64_python3.8.____cpythontarget_platformlinux-64.yaml deleted file mode 100644 index f381ddd0e..000000000 --- a/.ci_support/linux_64_python3.8.____cpythontarget_platformlinux-64.yaml +++ /dev/null @@ -1,58 +0,0 @@ -bzip2: -- '1' -c_compiler: -- gcc -c_compiler_version: -- '7' -channel_sources: -- conda-forge,defaults -channel_targets: -- conda-forge main -cxx_compiler: -- gxx -cxx_compiler_version: -- '7' -docker_image: -- condaforge/linux-anvil-comp7 -libffi: -- '3.2' -ncurses: -- '6.2' -openssl: -- 1.1.1 -pin_run_as_build: - bzip2: - max_pin: x - libffi: - max_pin: x.x - ncurses: - max_pin: x.x - openssl: - max_pin: x.x.x - python: - min_pin: x.x - max_pin: x.x - readline: - max_pin: x - sqlite: - max_pin: x - tk: - max_pin: x.x - xz: - max_pin: x.x - zlib: - max_pin: x.x -python: -- 3.8.* *_cpython -readline: -- '8.0' -sqlite: -- '3' -target_platform: -- linux-64 -tk: -- '8.6' -xz: -- '5.2' -zlib: -- '1.2' diff --git a/.ci_support/linux_64_python3.6.____cpythontarget_platformlinux-64.yaml b/.ci_support/linux_64_target_platformlinux-64.yaml similarity index 97% rename from .ci_support/linux_64_python3.6.____cpythontarget_platformlinux-64.yaml rename to .ci_support/linux_64_target_platformlinux-64.yaml index 6e2cde9c3..de9068a25 100644 --- a/.ci_support/linux_64_python3.6.____cpythontarget_platformlinux-64.yaml +++ b/.ci_support/linux_64_target_platformlinux-64.yaml @@ -43,7 +43,7 @@ pin_run_as_build: zlib: max_pin: x.x python: -- 3.6.* *_cpython +- '3.8' readline: - '8.0' sqlite: diff --git a/.ci_support/linux_aarch64_python3.6.____cpythontarget_platformlinux-aarch64.yaml b/.ci_support/linux_aarch64_python3.6.____cpythontarget_platformlinux-aarch64.yaml deleted file mode 100644 index 0547c69db..000000000 --- a/.ci_support/linux_aarch64_python3.6.____cpythontarget_platformlinux-aarch64.yaml +++ /dev/null @@ -1,64 +0,0 @@ -BUILD: -- aarch64-conda_cos7-linux-gnu -bzip2: -- '1' -c_compiler: -- gcc -c_compiler_version: -- '7' -cdt_arch: -- aarch64 -cdt_name: -- cos7 -channel_sources: -- conda-forge -channel_targets: -- conda-forge main -cxx_compiler: -- gxx -cxx_compiler_version: -- '7' -docker_image: -- condaforge/linux-anvil-aarch64 -libffi: -- '3.2' -ncurses: -- '6.2' -openssl: -- 1.1.1 -pin_run_as_build: - bzip2: - max_pin: x - libffi: - max_pin: x.x - ncurses: - max_pin: x.x - openssl: - max_pin: x.x.x - python: - min_pin: x.x - max_pin: x.x - readline: - max_pin: x - sqlite: - max_pin: x - tk: - max_pin: x.x - xz: - max_pin: x.x - zlib: - max_pin: x.x -python: -- 3.6.* *_cpython -readline: -- '8.0' -sqlite: -- '3' -target_platform: -- linux-aarch64 -tk: -- '8.6' -xz: -- '5.2' -zlib: -- '1.2' diff --git a/.ci_support/linux_aarch64_python3.8.____cpythontarget_platformlinux-aarch64.yaml b/.ci_support/linux_aarch64_python3.8.____cpythontarget_platformlinux-aarch64.yaml deleted file mode 100644 index 7298fce7a..000000000 --- a/.ci_support/linux_aarch64_python3.8.____cpythontarget_platformlinux-aarch64.yaml +++ /dev/null @@ -1,64 +0,0 @@ -BUILD: -- aarch64-conda_cos7-linux-gnu -bzip2: -- '1' -c_compiler: -- gcc -c_compiler_version: -- '7' -cdt_arch: -- aarch64 -cdt_name: -- cos7 -channel_sources: -- conda-forge -channel_targets: -- conda-forge main -cxx_compiler: -- gxx -cxx_compiler_version: -- '7' -docker_image: -- condaforge/linux-anvil-aarch64 -libffi: -- '3.2' -ncurses: -- '6.2' -openssl: -- 1.1.1 -pin_run_as_build: - bzip2: - max_pin: x - libffi: - max_pin: x.x - ncurses: - max_pin: x.x - openssl: - max_pin: x.x.x - python: - min_pin: x.x - max_pin: x.x - readline: - max_pin: x - sqlite: - max_pin: x - tk: - max_pin: x.x - xz: - max_pin: x.x - zlib: - max_pin: x.x -python: -- 3.8.* *_cpython -readline: -- '8.0' -sqlite: -- '3' -target_platform: -- linux-aarch64 -tk: -- '8.6' -xz: -- '5.2' -zlib: -- '1.2' diff --git a/.ci_support/linux_aarch64_python3.7.____cpythontarget_platformlinux-aarch64.yaml b/.ci_support/linux_aarch64_target_platformlinux-aarch64.yaml similarity index 97% rename from .ci_support/linux_aarch64_python3.7.____cpythontarget_platformlinux-aarch64.yaml rename to .ci_support/linux_aarch64_target_platformlinux-aarch64.yaml index c46bbecbd..d4e299f41 100644 --- a/.ci_support/linux_aarch64_python3.7.____cpythontarget_platformlinux-aarch64.yaml +++ b/.ci_support/linux_aarch64_target_platformlinux-aarch64.yaml @@ -49,7 +49,7 @@ pin_run_as_build: zlib: max_pin: x.x python: -- 3.7.* *_cpython +- '3.8' readline: - '8.0' sqlite: diff --git a/.ci_support/linux_ppc64le_python3.6.____cpythontarget_platformlinux-ppc64le.yaml b/.ci_support/linux_ppc64le_python3.6.____cpythontarget_platformlinux-ppc64le.yaml deleted file mode 100644 index 7d90d0fa1..000000000 --- a/.ci_support/linux_ppc64le_python3.6.____cpythontarget_platformlinux-ppc64le.yaml +++ /dev/null @@ -1,54 +0,0 @@ -bzip2: -- '1' -c_compiler: -- gcc -c_compiler_version: -- '8' -channel_sources: -- conda-forge,defaults -channel_targets: -- conda-forge main -cxx_compiler: -- gxx -cxx_compiler_version: -- '8' -docker_image: -- condaforge/linux-anvil-ppc64le -libffi: -- '3.2' -ncurses: -- '6.2' -openssl: -- 1.1.1 -pin_run_as_build: - bzip2: - max_pin: x - libffi: - max_pin: x.x - ncurses: - max_pin: x.x - openssl: - max_pin: x.x.x - python: - min_pin: x.x - max_pin: x.x - readline: - max_pin: x - sqlite: - max_pin: x - xz: - max_pin: x.x - zlib: - max_pin: x.x -python: -- 3.6.* *_cpython -readline: -- '8.0' -sqlite: -- '3' -target_platform: -- linux-ppc64le -xz: -- '5.2' -zlib: -- '1.2' diff --git a/.ci_support/linux_ppc64le_python3.8.____cpythontarget_platformlinux-ppc64le.yaml b/.ci_support/linux_ppc64le_python3.8.____cpythontarget_platformlinux-ppc64le.yaml deleted file mode 100644 index ea2a51669..000000000 --- a/.ci_support/linux_ppc64le_python3.8.____cpythontarget_platformlinux-ppc64le.yaml +++ /dev/null @@ -1,54 +0,0 @@ -bzip2: -- '1' -c_compiler: -- gcc -c_compiler_version: -- '8' -channel_sources: -- conda-forge,defaults -channel_targets: -- conda-forge main -cxx_compiler: -- gxx -cxx_compiler_version: -- '8' -docker_image: -- condaforge/linux-anvil-ppc64le -libffi: -- '3.2' -ncurses: -- '6.2' -openssl: -- 1.1.1 -pin_run_as_build: - bzip2: - max_pin: x - libffi: - max_pin: x.x - ncurses: - max_pin: x.x - openssl: - max_pin: x.x.x - python: - min_pin: x.x - max_pin: x.x - readline: - max_pin: x - sqlite: - max_pin: x - xz: - max_pin: x.x - zlib: - max_pin: x.x -python: -- 3.8.* *_cpython -readline: -- '8.0' -sqlite: -- '3' -target_platform: -- linux-ppc64le -xz: -- '5.2' -zlib: -- '1.2' diff --git a/.ci_support/linux_ppc64le_python3.7.____cpythontarget_platformlinux-ppc64le.yaml b/.ci_support/linux_ppc64le_target_platformlinux-ppc64le.yaml similarity index 97% rename from .ci_support/linux_ppc64le_python3.7.____cpythontarget_platformlinux-ppc64le.yaml rename to .ci_support/linux_ppc64le_target_platformlinux-ppc64le.yaml index 00123c5a4..3d1ce2e1d 100644 --- a/.ci_support/linux_ppc64le_python3.7.____cpythontarget_platformlinux-ppc64le.yaml +++ b/.ci_support/linux_ppc64le_target_platformlinux-ppc64le.yaml @@ -41,7 +41,7 @@ pin_run_as_build: zlib: max_pin: x.x python: -- 3.7.* *_cpython +- '3.8' readline: - '8.0' sqlite: diff --git a/.ci_support/osx_64_python3.6.____cpythontarget_platformosx-64.yaml b/.ci_support/osx_64_python3.6.____cpythontarget_platformosx-64.yaml deleted file mode 100644 index 3d4645d10..000000000 --- a/.ci_support/osx_64_python3.6.____cpythontarget_platformosx-64.yaml +++ /dev/null @@ -1,58 +0,0 @@ -MACOSX_DEPLOYMENT_TARGET: -- '10.9' -bzip2: -- '1' -c_compiler: -- clang -c_compiler_version: -- '10' -channel_sources: -- conda-forge,defaults -channel_targets: -- conda-forge main -cxx_compiler: -- clangxx -cxx_compiler_version: -- '10' -libffi: -- '3.2' -macos_machine: -- x86_64-apple-darwin13.4.0 -macos_min_version: -- '10.9' -openssl: -- 1.1.1 -pin_run_as_build: - bzip2: - max_pin: x - libffi: - max_pin: x.x - openssl: - max_pin: x.x.x - python: - min_pin: x.x - max_pin: x.x - readline: - max_pin: x - sqlite: - max_pin: x - tk: - max_pin: x.x - xz: - max_pin: x.x - zlib: - max_pin: x.x -python: -- 3.6.* *_cpython -readline: -- '8.0' -sqlite: -- '3' -target_platform: -- osx-64 -tk: -- '8.6' -xz: -- '5.2' -zlib: -- '1.2' diff --git a/.ci_support/osx_64_python3.8.____cpythontarget_platformosx-64.yaml b/.ci_support/osx_64_python3.8.____cpythontarget_platformosx-64.yaml deleted file mode 100644 index 99dc9d69d..000000000 --- a/.ci_support/osx_64_python3.8.____cpythontarget_platformosx-64.yaml +++ /dev/null @@ -1,58 +0,0 @@ -MACOSX_DEPLOYMENT_TARGET: -- '10.9' -bzip2: -- '1' -c_compiler: -- clang -c_compiler_version: -- '10' -channel_sources: -- conda-forge,defaults -channel_targets: -- conda-forge main -cxx_compiler: -- clangxx -cxx_compiler_version: -- '10' -libffi: -- '3.2' -macos_machine: -- x86_64-apple-darwin13.4.0 -macos_min_version: -- '10.9' -openssl: -- 1.1.1 -pin_run_as_build: - bzip2: - max_pin: x - libffi: - max_pin: x.x - openssl: - max_pin: x.x.x - python: - min_pin: x.x - max_pin: x.x - readline: - max_pin: x - sqlite: - max_pin: x - tk: - max_pin: x.x - xz: - max_pin: x.x - zlib: - max_pin: x.x -python: -- 3.8.* *_cpython -readline: -- '8.0' -sqlite: -- '3' -target_platform: -- osx-64 -tk: -- '8.6' -xz: -- '5.2' -zlib: -- '1.2' diff --git a/.ci_support/osx_64_python3.7.____cpythontarget_platformosx-64.yaml b/.ci_support/osx_64_target_platformosx-64.yaml similarity index 97% rename from .ci_support/osx_64_python3.7.____cpythontarget_platformosx-64.yaml rename to .ci_support/osx_64_target_platformosx-64.yaml index 8ad50d758..3f3ac48e4 100644 --- a/.ci_support/osx_64_python3.7.____cpythontarget_platformosx-64.yaml +++ b/.ci_support/osx_64_target_platformosx-64.yaml @@ -43,7 +43,7 @@ pin_run_as_build: zlib: max_pin: x.x python: -- 3.7.* *_cpython +- '3.8' readline: - '8.0' sqlite: diff --git a/.ci_support/osx_arm64_python3.6.____cpythontarget_platformosx-arm64.yaml b/.ci_support/osx_arm64_python3.6.____cpythontarget_platformosx-arm64.yaml deleted file mode 100644 index be99567d9..000000000 --- a/.ci_support/osx_arm64_python3.6.____cpythontarget_platformosx-arm64.yaml +++ /dev/null @@ -1,58 +0,0 @@ -MACOSX_DEPLOYMENT_TARGET: -- '11.0' -bzip2: -- '1' -c_compiler: -- clang -c_compiler_version: -- '11' -channel_sources: -- conda-forge/label/llvm_rc,conda-forge,https://conda-web.anaconda.org/conda-forge -channel_targets: -- conda-forge main -cxx_compiler: -- clangxx -cxx_compiler_version: -- '11' -libffi: -- '3.2' -macos_machine: -- arm64-apple-darwin20.0.0 -macos_min_version: -- '11.0' -openssl: -- 1.1.1 -pin_run_as_build: - bzip2: - max_pin: x - libffi: - max_pin: x.x - openssl: - max_pin: x.x.x - python: - min_pin: x.x - max_pin: x.x - readline: - max_pin: x - sqlite: - max_pin: x - tk: - max_pin: x.x - xz: - max_pin: x.x - zlib: - max_pin: x.x -python: -- 3.6.* *_cpython -readline: -- '8.0' -sqlite: -- '3' -target_platform: -- osx-arm64 -tk: -- '8.6' -xz: -- '5.2' -zlib: -- '1.2' diff --git a/.ci_support/osx_arm64_python3.8.____cpythontarget_platformosx-arm64.yaml b/.ci_support/osx_arm64_python3.8.____cpythontarget_platformosx-arm64.yaml deleted file mode 100644 index c18911f18..000000000 --- a/.ci_support/osx_arm64_python3.8.____cpythontarget_platformosx-arm64.yaml +++ /dev/null @@ -1,58 +0,0 @@ -MACOSX_DEPLOYMENT_TARGET: -- '11.0' -bzip2: -- '1' -c_compiler: -- clang -c_compiler_version: -- '11' -channel_sources: -- conda-forge/label/llvm_rc,conda-forge,https://conda-web.anaconda.org/conda-forge -channel_targets: -- conda-forge main -cxx_compiler: -- clangxx -cxx_compiler_version: -- '11' -libffi: -- '3.2' -macos_machine: -- arm64-apple-darwin20.0.0 -macos_min_version: -- '11.0' -openssl: -- 1.1.1 -pin_run_as_build: - bzip2: - max_pin: x - libffi: - max_pin: x.x - openssl: - max_pin: x.x.x - python: - min_pin: x.x - max_pin: x.x - readline: - max_pin: x - sqlite: - max_pin: x - tk: - max_pin: x.x - xz: - max_pin: x.x - zlib: - max_pin: x.x -python: -- 3.8.* *_cpython -readline: -- '8.0' -sqlite: -- '3' -target_platform: -- osx-arm64 -tk: -- '8.6' -xz: -- '5.2' -zlib: -- '1.2' diff --git a/.ci_support/osx_arm64_python3.7.____cpythontarget_platformosx-arm64.yaml b/.ci_support/osx_arm64_target_platformosx-arm64.yaml similarity index 97% rename from .ci_support/osx_arm64_python3.7.____cpythontarget_platformosx-arm64.yaml rename to .ci_support/osx_arm64_target_platformosx-arm64.yaml index 6ae482d2c..655fd1ab4 100644 --- a/.ci_support/osx_arm64_python3.7.____cpythontarget_platformosx-arm64.yaml +++ b/.ci_support/osx_arm64_target_platformosx-arm64.yaml @@ -43,7 +43,7 @@ pin_run_as_build: zlib: max_pin: x.x python: -- 3.7.* *_cpython +- '3.8' readline: - '8.0' sqlite: diff --git a/.drone.yml b/.drone.yml index 06f076f17..076e30c48 100644 --- a/.drone.yml +++ b/.drone.yml @@ -1,6 +1,6 @@ --- kind: pipeline -name: linux_aarch64_python3.6.____cpython_h83c16aa69a +name: linux_aarch64_target_platformlinux-aarch64 platform: os: linux @@ -10,69 +10,7 @@ steps: - name: Install and build image: condaforge/linux-anvil-aarch64 environment: - CONFIG: linux_aarch64_python3.6.____cpythontarget_platformlinux-aarch64 - UPLOAD_PACKAGES: True - PLATFORM: linux-aarch64 - BINSTAR_TOKEN: - from_secret: BINSTAR_TOKEN - FEEDSTOCK_TOKEN: - from_secret: FEEDSTOCK_TOKEN - STAGING_BINSTAR_TOKEN: - from_secret: STAGING_BINSTAR_TOKEN - commands: - - export FEEDSTOCK_ROOT="$DRONE_WORKSPACE" - - export RECIPE_ROOT="$FEEDSTOCK_ROOT/recipe" - - export CI=drone - - export GIT_BRANCH="$DRONE_BRANCH" - - export FEEDSTOCK_NAME=$(basename ${DRONE_REPO_NAME}) - - sed -i '$ichown -R conda:conda "$FEEDSTOCK_ROOT"' /opt/docker/bin/entrypoint - - /opt/docker/bin/entrypoint $FEEDSTOCK_ROOT/.scripts/build_steps.sh - - echo "Done building" - ---- -kind: pipeline -name: linux_aarch64_python3.7.____cpython_h07a3c734fe - -platform: - os: linux - arch: arm64 - -steps: -- name: Install and build - image: condaforge/linux-anvil-aarch64 - environment: - CONFIG: linux_aarch64_python3.7.____cpythontarget_platformlinux-aarch64 - UPLOAD_PACKAGES: True - PLATFORM: linux-aarch64 - BINSTAR_TOKEN: - from_secret: BINSTAR_TOKEN - FEEDSTOCK_TOKEN: - from_secret: FEEDSTOCK_TOKEN - STAGING_BINSTAR_TOKEN: - from_secret: STAGING_BINSTAR_TOKEN - commands: - - export FEEDSTOCK_ROOT="$DRONE_WORKSPACE" - - export RECIPE_ROOT="$FEEDSTOCK_ROOT/recipe" - - export CI=drone - - export GIT_BRANCH="$DRONE_BRANCH" - - export FEEDSTOCK_NAME=$(basename ${DRONE_REPO_NAME}) - - sed -i '$ichown -R conda:conda "$FEEDSTOCK_ROOT"' /opt/docker/bin/entrypoint - - /opt/docker/bin/entrypoint $FEEDSTOCK_ROOT/.scripts/build_steps.sh - - echo "Done building" - ---- -kind: pipeline -name: linux_aarch64_python3.8.____cpython_h73fdca77b2 - -platform: - os: linux - arch: arm64 - -steps: -- name: Install and build - image: condaforge/linux-anvil-aarch64 - environment: - CONFIG: linux_aarch64_python3.8.____cpythontarget_platformlinux-aarch64 + CONFIG: linux_aarch64_target_platformlinux-aarch64 UPLOAD_PACKAGES: True PLATFORM: linux-aarch64 BINSTAR_TOKEN: diff --git a/.travis.yml b/.travis.yml index 773be5796..147350bff 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,15 +7,7 @@ language: generic matrix: include: - - env: CONFIG=linux_ppc64le_python3.6.____cpythontarget_platformlinux-ppc64le UPLOAD_PACKAGES=True PLATFORM=linux-ppc64le DOCKER_IMAGE=condaforge/linux-anvil-ppc64le - os: linux - arch: ppc64le - - - env: CONFIG=linux_ppc64le_python3.7.____cpythontarget_platformlinux-ppc64le UPLOAD_PACKAGES=True PLATFORM=linux-ppc64le DOCKER_IMAGE=condaforge/linux-anvil-ppc64le - os: linux - arch: ppc64le - - - env: CONFIG=linux_ppc64le_python3.8.____cpythontarget_platformlinux-ppc64le UPLOAD_PACKAGES=True PLATFORM=linux-ppc64le DOCKER_IMAGE=condaforge/linux-anvil-ppc64le + - env: CONFIG=linux_ppc64le_target_platformlinux-ppc64le UPLOAD_PACKAGES=True PLATFORM=linux-ppc64le DOCKER_IMAGE=condaforge/linux-anvil-ppc64le os: linux arch: ppc64le diff --git a/README.md b/README.md index 526ae99b7..8217c3b6d 100644 --- a/README.md +++ b/README.md @@ -49,108 +49,38 @@ Current build status - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - From 40a5e6a194668a5b0743f8ece70697af533cd8b8 Mon Sep 17 00:00:00 2001 From: Isuru Fernando Date: Thu, 13 Aug 2020 17:57:16 -0500 Subject: [PATCH 05/29] osx arm64 support --- recipe/build.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipe/build.sh b/recipe/build.sh index f25b1a512..be7be1db2 100644 --- a/recipe/build.sh +++ b/recipe/build.sh @@ -76,7 +76,7 @@ find "${PREFIX}/lib" -name "libbz2*${SHLIB_EXT}*" | xargs rm -fv {} AR=$(basename "${AR}") # CC must contain the string 'gcc' or else distutils thinks it is on macOS and uses '-R' to set rpaths. -if [[ ${target_platform} == osx-64 ]]; then +if [[ ${target_platform} == osx-* ]]; then CC=$(basename "${CC}") else CC=$(basename "${GCC}") @@ -127,7 +127,7 @@ fi export CPPFLAGS CFLAGS CXXFLAGS LDFLAGS -if [[ ${target_platform} == osx-64 ]]; then +if [[ ${target_platform} == osx-* ]]; then sed -i -e "s/@OSX_ARCH@/$ARCH/g" Lib/distutils/unixccompiler.py fi From ec1807bf2d4ad79f879965a93afeb507df05c9da Mon Sep 17 00:00:00 2001 From: Isuru Fernando Date: Thu, 13 Aug 2020 18:39:57 -0500 Subject: [PATCH 06/29] Use CC_FOR_BUILD --- recipe/build.sh | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/recipe/build.sh b/recipe/build.sh index be7be1db2..268e9aaa4 100644 --- a/recipe/build.sh +++ b/recipe/build.sh @@ -131,7 +131,7 @@ if [[ ${target_platform} == osx-* ]]; then sed -i -e "s/@OSX_ARCH@/$ARCH/g" Lib/distutils/unixccompiler.py fi -if [[ "${BUILD}" != "${HOST}" ]] && [[ -n "${BUILD}" ]] && [[ -n "${HOST}" ]]; then +if [[ "${CONDA_BUILD_CROSS_COMPILATION}" == "1" ]]; then # Build the exact same Python for the build machine. It would be nice (and might be # possible already?) to be able to make this just an 'exact' pinned build dependency # of a split-package? @@ -139,18 +139,18 @@ if [[ "${BUILD}" != "${HOST}" ]] && [[ -n "${BUILD}" ]] && [[ -n "${HOST}" ]]; t mkdir build-python-build pushd build-python-build (unset CPPFLAGS LDFLAGS; - export CC=/usr/bin/gcc \ - CXX=/usr/bin/g++ \ - CPP=/usr/bin/cpp \ + export CC=${CC_FOR_BUILD} \ + CXX=${CXX_FOR_BUILD} \ + CPP="${CC_FOR_BUILD} -E" \ CFLAGS="-O2" \ - AR=/usr/bin/ar \ - RANLIB=/usr/bin/ranlib \ - LD=/usr/bin/ld && \ + AR="$(${CC_FOR_BUILD} --print-prog-name=ar)" \ + RANLIB="$(${CC_FOR_BUILD} --print-prog-name=ranlib)" \ + LD="$(${CC_FOR_BUILD} --print-prog-name=ld)" && \ ${SRC_DIR}/configure --build=${BUILD} \ --host=${BUILD} \ --prefix=${BUILD_PYTHON_PREFIX} \ --with-ensurepip=no && \ - make && \ + make -j${CPU_COUNT} && \ make install) export PATH=${BUILD_PYTHON_PREFIX}/bin:${PATH} ln -s ${BUILD_PYTHON_PREFIX}/bin/python${VER} ${BUILD_PYTHON_PREFIX}/bin/python From ee59120edd0275637fadd363ea153a41fd3e9ab9 Mon Sep 17 00:00:00 2001 From: Isuru Fernando Date: Thu, 13 Aug 2020 18:54:02 -0500 Subject: [PATCH 07/29] Get an up-to-date config.sub --- recipe/build.sh | 3 +++ recipe/meta.yaml | 1 + 2 files changed, 4 insertions(+) diff --git a/recipe/build.sh b/recipe/build.sh index 268e9aaa4..e27f6c5e4 100644 --- a/recipe/build.sh +++ b/recipe/build.sh @@ -1,6 +1,9 @@ #!/bin/bash set -ex +# Get an updated config.sub and config.guess +cp $BUILD_PREFIX/share/libtool/build-aux/config.* . + # The LTO/PGO information was sourced from @pitrou and the Debian rules file in: # http://http.debian.net/debian/pool/main/p/python3.6/python3.6_3.6.2-2.debian.tar.xz # https://packages.debian.org/source/sid/python3.6 diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 54c7b2338..7336945c7 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -130,6 +130,7 @@ requirements: - patch # [not win] - m2-patch # [win] - posix # [win] + - libtool # [unix] - ld_impl_{{ target_platform }} >=2.34 # [linux] - binutils_impl_{{ target_platform }} >=2.34 # [linux] host: From 68dfd7e300379f1ccfa73c8baa5a67130fcbe17c Mon Sep 17 00:00:00 2001 From: Isuru Fernando Date: Thu, 13 Aug 2020 19:42:15 -0500 Subject: [PATCH 08/29] Set MACHDEP --- recipe/build.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/recipe/build.sh b/recipe/build.sh index e27f6c5e4..0a0528cf8 100644 --- a/recipe/build.sh +++ b/recipe/build.sh @@ -95,6 +95,16 @@ if [[ ${HOST} =~ .*darwin.* ]] && [[ -n ${CONDA_BUILD_SYSROOT} ]]; then CPPFLAGS="-isysroot ${CONDA_BUILD_SYSROOT} "${CPPFLAGS} fi +if [[ ${target_platform} == osx-* ]]; then + export MACHDEP=darwin + export ac_sys_system=Darwin + export ac_sys_release= +elif [[ ${target_platform} == linux-* ]]; then + export MACHDEP=linux + export ac_sys_system=Linux + export ac_sys_release= +fi + # Debian uses -O3 then resets it at the end to -O2 in _sysconfigdata.py if [[ ${_OPTIMIZED} = yes ]]; then CPPFLAGS=$(echo "${CPPFLAGS}" | sed "s/-O2/-O3/g") From de384a0ed6c7c3cd83887a29d58730ce15673d7b Mon Sep 17 00:00:00 2001 From: Isuru Fernando Date: Thu, 13 Aug 2020 19:43:34 -0500 Subject: [PATCH 09/29] Move after build python is built --- recipe/build.sh | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/recipe/build.sh b/recipe/build.sh index 0a0528cf8..5915716b6 100644 --- a/recipe/build.sh +++ b/recipe/build.sh @@ -95,16 +95,6 @@ if [[ ${HOST} =~ .*darwin.* ]] && [[ -n ${CONDA_BUILD_SYSROOT} ]]; then CPPFLAGS="-isysroot ${CONDA_BUILD_SYSROOT} "${CPPFLAGS} fi -if [[ ${target_platform} == osx-* ]]; then - export MACHDEP=darwin - export ac_sys_system=Darwin - export ac_sys_release= -elif [[ ${target_platform} == linux-* ]]; then - export MACHDEP=linux - export ac_sys_system=Linux - export ac_sys_release= -fi - # Debian uses -O3 then resets it at the end to -O2 in _sysconfigdata.py if [[ ${_OPTIMIZED} = yes ]]; then CPPFLAGS=$(echo "${CPPFLAGS}" | sed "s/-O2/-O3/g") @@ -190,6 +180,16 @@ if [[ -n ${HOST} ]]; then fi fi +if [[ ${target_platform} == osx-* ]]; then + export MACHDEP=darwin + export ac_sys_system=Darwin + export ac_sys_release= +elif [[ ${target_platform} == linux-* ]]; then + export MACHDEP=linux + export ac_sys_system=Linux + export ac_sys_release= +fi + # Not used at present but we should run 'make test' and finish up TESTOPTS (see debians rules). declare -a TEST_EXCLUDES TEST_EXCLUDES+=(test_ensurepip test_venv) From 867917ad06c311145e0f2b693bc219a06129c0e0 Mon Sep 17 00:00:00 2001 From: Isuru Fernando Date: Fri, 14 Aug 2020 03:20:29 +0000 Subject: [PATCH 10/29] Fixes for cross compiling for darwin --- recipe/build.sh | 18 +- recipe/meta.yaml | 1 + .../patches/0027-cross-compile-darwin.patch | 45 + ..._sysconfigdata_arm64_apple_darwin20_0_0.py | 801 ++++++++++++++++++ 4 files changed, 863 insertions(+), 2 deletions(-) create mode 100644 recipe/patches/0027-cross-compile-darwin.patch create mode 100644 recipe/sysconfigdata/_sysconfigdata_arm64_apple_darwin20_0_0.py diff --git a/recipe/build.sh b/recipe/build.sh index 5915716b6..1e2926f56 100644 --- a/recipe/build.sh +++ b/recipe/build.sh @@ -180,10 +180,24 @@ if [[ -n ${HOST} ]]; then fi fi -if [[ ${target_platform} == osx-* ]]; then +if [[ ${target_platform} == osx-64 ]]; then export MACHDEP=darwin export ac_sys_system=Darwin - export ac_sys_release= + export ac_sys_release=13.4.0 + export MACOSX_DEFAULT_ARCH=x86_64 + # TODO: check with LLVM 12 if the following hack is needed. + # https://reviews.llvm.org/D76461 may have fixed the need for the following hack. + echo '#!/bin/bash' > $BUILD_PREFIX/bin/$HOST-llvm-ar + echo "$BUILD_PREFIX/bin/llvm-ar --format=darwin" '"$@"' >> $BUILD_PREFIX/bin/$HOST-llvm-ar + chmod +x $BUILD_PREFIX/bin/$HOST-llvm-ar +elif [[ ${target_platform} == osx-arm64 ]]; then + export MACHDEP=darwin + export ac_sys_system=Darwin + export ac_sys_release=20.0.0 + export MACOSX_DEFAULT_ARCH=arm64 + echo '#!/bin/bash' > $BUILD_PREFIX/bin/$HOST-llvm-ar + echo "$BUILD_PREFIX/bin/llvm-ar --format=darwin" '"$@"' >> $BUILD_PREFIX/bin/$HOST-llvm-ar + chmod +x $BUILD_PREFIX/bin/$HOST-llvm-ar elif [[ ${target_platform} == linux-* ]]; then export MACHDEP=linux export ac_sys_system=Linux diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 7336945c7..c49340d8b 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -44,6 +44,7 @@ source: # Python 3.8 is pretty broken without this. - patches/0022-Add-CondaEcosystemModifyDllSearchPath.patch - patches/0026-Revert-part-of-https-bugs.python.org-issue33895-http.patch + - patches/0027-cross-compile-darwin.patch # TODO :: Depend on our own packages for these: - url: https://github.com/python/cpython-source-deps/archive/xz-5.2.2.zip # [win] diff --git a/recipe/patches/0027-cross-compile-darwin.patch b/recipe/patches/0027-cross-compile-darwin.patch new file mode 100644 index 000000000..c2ddc0088 --- /dev/null +++ b/recipe/patches/0027-cross-compile-darwin.patch @@ -0,0 +1,45 @@ +--- a/configure 2020-08-14 02:59:05.841967550 +0000 ++++ b/configure 2020-08-14 03:02:01.839782466 +0000 +@@ -3312,6 +3312,8 @@ + { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$MACHDEP\"" >&5 + $as_echo "\"$MACHDEP\"" >&6; } + ++if test -z "${_PYTHON_HOST_PLATFORM}" ++then + if test "$cross_compiling" = yes; then + case "$host" in + *-*-linux*) +@@ -3336,6 +3338,7 @@ + esac + _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}" + fi ++fi + + # Some systems cannot stand _XOPEN_SOURCE being defined at all; they + # disable features if it is defined, without any means to access these +@@ -6172,7 +6175,7 @@ + if test "$cross_compiling" = yes; then + case "$READELF" in + readelf|:) +- as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5 ++ #as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5 + ;; + esac + fi +@@ -9244,7 +9247,7 @@ + conftest.$ac_objext conftest.beam conftest.$ac_ext + fi + +- ++ if test -z "${MACOSX_DEFAULT_ARCH}"; then + if test "${ac_osx_32bit}" = "yes"; then + case `/usr/bin/arch` in + i386) +@@ -9271,6 +9274,7 @@ + esac + + fi ++ fi + + LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}" + LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)' diff --git a/recipe/sysconfigdata/_sysconfigdata_arm64_apple_darwin20_0_0.py b/recipe/sysconfigdata/_sysconfigdata_arm64_apple_darwin20_0_0.py new file mode 100644 index 000000000..88adff811 --- /dev/null +++ b/recipe/sysconfigdata/_sysconfigdata_arm64_apple_darwin20_0_0.py @@ -0,0 +1,801 @@ +# system configuration generated and used by the sysconfig module +build_time_vars = {'ABIFLAGS': '@ABIFLAGS@', + 'AC_APPLE_UNIVERSAL_BUILD': 0, + 'AIX_GENUINE_CPLUSPLUS': 0, + 'ANDROID_API_LEVEL': 0, + 'AR': 'arm64-apple-darwin20.0.0-ar', + 'ARFLAGS': 'rcs', + 'BASECFLAGS': '-fno-strict-aliasing -Wsign-compare -Wunreachable-code', + 'BASECPPFLAGS': '-IObjects -IInclude -IPython', + 'BASEMODLIBS': '', + 'BINDIR': '/opt/anaconda1anaconda2anaconda3/bin', + 'BINLIBDEST': '/opt/anaconda1anaconda2anaconda3/lib/python@PYVER@', + 'BLDLIBRARY': 'libpython@PYVER@@ABIFLAGS@.a', + 'BLDSHARED': 'arm64-apple-darwin20.0.0-clang -bundle -undefined ' + 'dynamic_lookup -Wl,-pie -Wl,-headerpad_max_install_names ' + '-Wl,-dead_strip_dylibs ' + '-Wl,-rpath,/opt/anaconda1anaconda2anaconda3/lib ' + '-L/opt/anaconda1anaconda2anaconda3/lib ' + '-flto -Wl,-export_dynamic -Wl,-pie ' + '-Wl,-headerpad_max_install_names -Wl,-dead_strip_dylibs ' + '-Wl,-rpath,/opt/anaconda1anaconda2anaconda3/lib ' + '-L/opt/anaconda1anaconda2anaconda3/lib', + 'BUILDEXE': '.exe', + 'BUILDPYTHON': 'python.exe', + 'BUILD_GNU_TYPE': 'arm64-apple-darwin20.0.0', + 'BYTESTR_DEPS': '\\', + 'CC': 'arm64-apple-darwin20.0.0-clang', + 'CCSHARED': '', + 'CFLAGS': '-fno-strict-aliasing -Wsign-compare -Wunreachable-code -DNDEBUG ' + '-fwrapv -O3 -Wall -Wstrict-prototypes ' + '-ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O3 ' + '-pipe ' + '-fdebug-prefix-map=${SRC_DIR}=/usr/local/src/conda/${PKG_NAME}-${PKG_VERSION} ' + '-fdebug-prefix-map=/opt/anaconda1anaconda2anaconda3=/usr/local/src/conda-prefix ' + '-flto -Wl,-export_dynamic ' + '-ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O3 ', + 'CFLAGSFORSHARED': '', + 'CFLAGS_ALIASING': '-fno-strict-aliasing', + 'CONFIGFILES': 'configure configure.ac acconfig.h pyconfig.h.in ' + 'Makefile.pre.in', + 'CONFIGURE_CFLAGS': '-ftree-vectorize ' + '-fPIC -fPIE -fstack-protector-strong -O3 -pipe ' + '-fdebug-prefix-map=${SRC_DIR}=/usr/local/src/conda/${PKG_NAME}-${PKG_VERSION} ' + '-fdebug-prefix-map=/opt/anaconda1anaconda2anaconda3=/usr/local/src/conda-prefix ' + '-flto -Wl,-export_dynamic', + 'CONFIGURE_CFLAGS_NODIST': '-std=c99 -Werror=implicit-function-declaration', + 'CONFIGURE_CPPFLAGS': '-D_FORTIFY_SOURCE=2 -mmacosx-version-min=11.0 ' + '-I/opt/anaconda1anaconda2anaconda3/include', + 'CONFIGURE_LDFLAGS': '-Wl,-pie -Wl,-headerpad_max_install_names ' + '-Wl,-dead_strip_dylibs ' + '-Wl,-rpath,/opt/anaconda1anaconda2anaconda3/lib ' + '-L/opt/anaconda1anaconda2anaconda3/lib ' + '-flto -Wl,-export_dynamic', + 'CONFIG_ARGS': "'--prefix=/opt/anaconda1anaconda2anaconda3' " + "'--build=arm64-apple-darwin20.0.0' " + "'--host=arm64-apple-darwin20.0.0' '--enable-ipv6' " + "'--with-ensurepip=no' '--with-computed-gotos' " + "'--with-system-ffi' '--enable-loadable-sqlite-extensions' " + "'--with-tcltk-includes=-I/opt/anaconda1anaconda2anaconda3/include' " + "'--with-tcltk-libs=-L/opt/anaconda1anaconda2anaconda3/lib " + "-ltcl@TCLTK_VER@ -ltk@TCLTK_VER@' '--enable-optimizations' '--with-lto' " + "'--disable-shared' 'build_alias=arm64-apple-darwin20.0.0' " + "'host_alias=arm64-apple-darwin20.0.0' " + "'CC=arm64-apple-darwin20.0.0-clang' 'CFLAGS=" + '-ftree-vectorize -fPIC -fPIE ' + '-fstack-protector-strong -O3 -pipe ' + '-fdebug-prefix-map=${SRC_DIR}=/usr/local/src/conda/${PKG_NAME}-${PKG_VERSION} ' + '-fdebug-prefix-map=/opt/anaconda1anaconda2anaconda3=/usr/local/src/conda-prefix ' + "-flto' 'LDFLAGS=-Wl,-pie -Wl,-headerpad_max_install_names " + '-Wl,-dead_strip_dylibs ' + '-Wl,-rpath,/opt/anaconda1anaconda2anaconda3/lib ' + "-L/opt/anaconda1anaconda2anaconda3/lib' " + "'CPPFLAGS=-D_FORTIFY_SOURCE=2 -mmacosx-version-min=11.0 " + "-I/opt/anaconda1anaconda2anaconda3/include' " + "'PKG_CONFIG_PATH=/opt/anaconda1anaconda2anaconda3/lib/pkgconfig'", + 'CONFINCLUDEDIR': '/opt/anaconda1anaconda2anaconda3/include', + 'CONFINCLUDEPY': '/opt/anaconda1anaconda2anaconda3/include/python@PYVER@@ABIFLAGS@', + 'COREPYTHONPATH': '', + 'COVERAGE_INFO': '${SRC_DIR}/build-static/coverage.info', + 'COVERAGE_REPORT': '${SRC_DIR}/build-static/lcov-report', + 'COVERAGE_REPORT_OPTIONS': '--no-branch-coverage --title "CPython lcov ' + 'report"', + 'CPPFLAGS': '-IObjects -IInclude -IPython -I. ' + '-I${SRC_DIR}/Include ' + '-D_FORTIFY_SOURCE=2 -mmacosx-version-min=11.0 ' + '-I/opt/anaconda1anaconda2anaconda3/include ' + '-D_FORTIFY_SOURCE=2 -mmacosx-version-min=11.0 ' + '-I/opt/anaconda1anaconda2anaconda3/include', + 'CXX': 'arm64-apple-darwin20.0.0-clang++', + 'DESTDIRS': '/opt/anaconda1anaconda2anaconda3 ' + '/opt/anaconda1anaconda2anaconda3/lib ' + '/opt/anaconda1anaconda2anaconda3/lib/python@PYVER@ ' + '/opt/anaconda1anaconda2anaconda3/lib/python@PYVER@/lib-dynload', + 'DESTLIB': '/opt/anaconda1anaconda2anaconda3/lib/python@PYVER@', + 'DESTPATH': '', + 'DESTSHARED': '/opt/anaconda1anaconda2anaconda3/lib/python@PYVER@/lib-dynload', + 'DFLAGS': '', + 'DIRMODE': 755, + 'DIST': 'README.rst ChangeLog configure configure.ac acconfig.h pyconfig.h.in ' + 'Makefile.pre.in Include Lib Misc Ext-dummy', + 'DISTDIRS': 'Include Lib Misc Ext-dummy', + 'DISTFILES': 'README.rst ChangeLog configure configure.ac acconfig.h ' + 'pyconfig.h.in Makefile.pre.in', + 'DLINCLDIR': '.', + 'DLLLIBRARY': '', + 'DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754': 0, + 'DOUBLE_IS_BIG_ENDIAN_IEEE754': 0, + 'DOUBLE_IS_LITTLE_ENDIAN_IEEE754': 1, + 'DTRACE': '', + 'DTRACE_DEPS': '\\', + 'DTRACE_HEADERS': '', + 'DTRACE_OBJS': '', + 'DYNLOADFILE': 'dynload_shlib.o', + 'ENABLE_IPV6': 1, + 'ENSUREPIP': 'no', + 'EXE': '', + 'EXEMODE': 755, + 'EXTRATESTOPTS': '', + 'EXT_SUFFIX': '.cpython-@PYVERNODOTS@@ABIFLAGS@-darwin.so', + 'FILEMODE': 644, + 'FLOCK_NEEDS_LIBBSD': 0, + 'GETPGRP_HAVE_ARG': 0, + 'GETTIMEOFDAY_NO_TZ': 0, + 'GITBRANCH': '', + 'GITTAG': '', + 'GITVERSION': '', + 'GNULD': 'no', + 'HAVE_ACCEPT4': 0, + 'HAVE_ACOSH': 1, + 'HAVE_ADDRINFO': 1, + 'HAVE_ALARM': 1, + 'HAVE_ALIGNED_REQUIRED': 0, + 'HAVE_ALLOCA_H': 1, + 'HAVE_ALTZONE': 0, + 'HAVE_ASINH': 1, + 'HAVE_ASM_TYPES_H': 0, + 'HAVE_ATANH': 1, + 'HAVE_BIND_TEXTDOMAIN_CODESET': 0, + 'HAVE_BLUETOOTH_BLUETOOTH_H': 0, + 'HAVE_BLUETOOTH_H': 0, + 'HAVE_BROKEN_MBSTOWCS': 0, + 'HAVE_BROKEN_NICE': 0, + 'HAVE_BROKEN_PIPE_BUF': 0, + 'HAVE_BROKEN_POLL': 0, + 'HAVE_BROKEN_POSIX_SEMAPHORES': 0, + 'HAVE_BROKEN_PTHREAD_SIGMASK': 0, + 'HAVE_BROKEN_SEM_GETVALUE': 1, + 'HAVE_BROKEN_UNSETENV': 0, + 'HAVE_BUILTIN_ATOMIC': 1, + 'HAVE_CHFLAGS': 1, + 'HAVE_CHOWN': 1, + 'HAVE_CHROOT': 1, + 'HAVE_CLOCK': 1, + 'HAVE_CLOCK_GETRES': 0, + 'HAVE_CLOCK_GETTIME': 0, + 'HAVE_CLOCK_SETTIME': 0, + 'HAVE_COMPUTED_GOTOS': 1, + 'HAVE_CONFSTR': 1, + 'HAVE_CONIO_H': 0, + 'HAVE_COPYSIGN': 1, + 'HAVE_CRYPT_H': 0, + 'HAVE_CTERMID': 1, + 'HAVE_CTERMID_R': 1, + 'HAVE_CURSES_FILTER': 1, + 'HAVE_CURSES_H': 1, + 'HAVE_CURSES_HAS_KEY': 1, + 'HAVE_CURSES_IMMEDOK': 1, + 'HAVE_CURSES_IS_PAD': 1, + 'HAVE_CURSES_IS_TERM_RESIZED': 1, + 'HAVE_CURSES_RESIZETERM': 1, + 'HAVE_CURSES_RESIZE_TERM': 1, + 'HAVE_CURSES_SYNCOK': 1, + 'HAVE_CURSES_TYPEAHEAD': 1, + 'HAVE_CURSES_USE_ENV': 1, + 'HAVE_CURSES_WCHGAT': 1, + 'HAVE_DECL_ISFINITE': 1, + 'HAVE_DECL_ISINF': 1, + 'HAVE_DECL_ISNAN': 1, + 'HAVE_DECL_RTLD_DEEPBIND': 0, + 'HAVE_DECL_RTLD_GLOBAL': 1, + 'HAVE_DECL_RTLD_LAZY': 1, + 'HAVE_DECL_RTLD_LOCAL': 1, + 'HAVE_DECL_RTLD_MEMBER': 0, + 'HAVE_DECL_RTLD_NODELETE': 1, + 'HAVE_DECL_RTLD_NOLOAD': 1, + 'HAVE_DECL_RTLD_NOW': 1, + 'HAVE_DECL_TZNAME': 0, + 'HAVE_DEVICE_MACROS': 1, + 'HAVE_DEV_PTC': 0, + 'HAVE_DEV_PTMX': 1, + 'HAVE_DIRECT_H': 0, + 'HAVE_DIRENT_D_TYPE': 1, + 'HAVE_DIRENT_H': 1, + 'HAVE_DIRFD': 1, + 'HAVE_DLFCN_H': 1, + 'HAVE_DLOPEN': 1, + 'HAVE_DUP2': 1, + 'HAVE_DUP3': 0, + 'HAVE_DYNAMIC_LOADING': 1, + 'HAVE_ENDIAN_H': 0, + 'HAVE_EPOLL': 0, + 'HAVE_EPOLL_CREATE1': 0, + 'HAVE_ERF': 1, + 'HAVE_ERFC': 1, + 'HAVE_ERRNO_H': 1, + 'HAVE_EXECV': 1, + 'HAVE_EXPM1': 1, + 'HAVE_FACCESSAT': 0, + 'HAVE_FCHDIR': 1, + 'HAVE_FCHMOD': 1, + 'HAVE_FCHMODAT': 0, + 'HAVE_FCHOWN': 1, + 'HAVE_FCHOWNAT': 0, + 'HAVE_FCNTL_H': 1, + 'HAVE_FDATASYNC': 0, + 'HAVE_FDOPENDIR': 0, + 'HAVE_FEXECVE': 0, + 'HAVE_FINITE': 1, + 'HAVE_FLOCK': 1, + 'HAVE_FORK': 1, + 'HAVE_FORKPTY': 1, + 'HAVE_FPATHCONF': 1, + 'HAVE_FSEEK64': 0, + 'HAVE_FSEEKO': 1, + 'HAVE_FSTATAT': 0, + 'HAVE_FSTATVFS': 1, + 'HAVE_FSYNC': 1, + 'HAVE_FTELL64': 0, + 'HAVE_FTELLO': 1, + 'HAVE_FTIME': 1, + 'HAVE_FTRUNCATE': 1, + 'HAVE_FUTIMENS': 0, + 'HAVE_FUTIMES': 1, + 'HAVE_FUTIMESAT': 0, + 'HAVE_GAI_STRERROR': 1, + 'HAVE_GAMMA': 1, + 'HAVE_GCC_ASM_FOR_MC68881': 0, + 'HAVE_GCC_ASM_FOR_X64': 0, + 'HAVE_GCC_ASM_FOR_X87': 0, + 'HAVE_GCC_UINT128_T': 1, + 'HAVE_GETADDRINFO': 1, + 'HAVE_GETC_UNLOCKED': 1, + 'HAVE_GETENTROPY': 0, + 'HAVE_GETGROUPLIST': 1, + 'HAVE_GETGROUPS': 1, + 'HAVE_GETHOSTBYNAME': 1, + 'HAVE_GETHOSTBYNAME_R': 0, + 'HAVE_GETHOSTBYNAME_R_3_ARG': 0, + 'HAVE_GETHOSTBYNAME_R_5_ARG': 0, + 'HAVE_GETHOSTBYNAME_R_6_ARG': 0, + 'HAVE_GETITIMER': 1, + 'HAVE_GETLOADAVG': 1, + 'HAVE_GETLOGIN': 1, + 'HAVE_GETNAMEINFO': 1, + 'HAVE_GETPAGESIZE': 1, + 'HAVE_GETPEERNAME': 1, + 'HAVE_GETPGID': 1, + 'HAVE_GETPGRP': 1, + 'HAVE_GETPID': 1, + 'HAVE_GETPRIORITY': 1, + 'HAVE_GETPWENT': 1, + 'HAVE_GETRANDOM': 0, + 'HAVE_GETRANDOM_SYSCALL': 0, + 'HAVE_GETRESGID': 0, + 'HAVE_GETRESUID': 0, + 'HAVE_GETSID': 1, + 'HAVE_GETSPENT': 0, + 'HAVE_GETSPNAM': 0, + 'HAVE_GETTIMEOFDAY': 1, + 'HAVE_GETWD': 1, + 'HAVE_GLIBC_MEMMOVE_BUG': 0, + 'HAVE_GRP_H': 1, + 'HAVE_HSTRERROR': 1, + 'HAVE_HTOLE64': 0, + 'HAVE_HYPOT': 1, + 'HAVE_IEEEFP_H': 0, + 'HAVE_IF_NAMEINDEX': 1, + 'HAVE_INET_ATON': 1, + 'HAVE_INET_PTON': 1, + 'HAVE_INITGROUPS': 1, + 'HAVE_INTTYPES_H': 1, + 'HAVE_IO_H': 0, + 'HAVE_IPA_PURE_CONST_BUG': 0, + 'HAVE_KILL': 1, + 'HAVE_KILLPG': 1, + 'HAVE_KQUEUE': 1, + 'HAVE_LANGINFO_H': 1, + 'HAVE_LARGEFILE_SUPPORT': 0, + 'HAVE_LCHFLAGS': 1, + 'HAVE_LCHMOD': 1, + 'HAVE_LCHOWN': 1, + 'HAVE_LGAMMA': 1, + 'HAVE_LIBDL': 1, + 'HAVE_LIBDLD': 0, + 'HAVE_LIBIEEE': 0, + 'HAVE_LIBINTL_H': 0, + 'HAVE_LIBREADLINE': 1, + 'HAVE_LIBRESOLV': 0, + 'HAVE_LIBSENDFILE': 0, + 'HAVE_LIBUTIL_H': 0, + 'HAVE_LINK': 1, + 'HAVE_LINKAT': 0, + 'HAVE_LINUX_CAN_BCM_H': 0, + 'HAVE_LINUX_CAN_H': 0, + 'HAVE_LINUX_CAN_RAW_FD_FRAMES': 0, + 'HAVE_LINUX_CAN_RAW_H': 0, + 'HAVE_LINUX_NETLINK_H': 0, + 'HAVE_LINUX_RANDOM_H': 0, + 'HAVE_LINUX_TIPC_H': 0, + 'HAVE_LINUX_VM_SOCKETS_H': 0, + 'HAVE_LOCKF': 1, + 'HAVE_LOG1P': 1, + 'HAVE_LOG2': 1, + 'HAVE_LONG_DOUBLE': 1, + 'HAVE_LSTAT': 1, + 'HAVE_LUTIMES': 1, + 'HAVE_MAKEDEV': 1, + 'HAVE_MBRTOWC': 1, + 'HAVE_MEMORY_H': 1, + 'HAVE_MEMRCHR': 0, + 'HAVE_MKDIRAT': 0, + 'HAVE_MKFIFO': 1, + 'HAVE_MKFIFOAT': 0, + 'HAVE_MKNOD': 1, + 'HAVE_MKNODAT': 0, + 'HAVE_MKTIME': 1, + 'HAVE_MMAP': 1, + 'HAVE_MREMAP': 0, + 'HAVE_NCURSES_H': 1, + 'HAVE_NDIR_H': 0, + 'HAVE_NETPACKET_PACKET_H': 0, + 'HAVE_NET_IF_H': 1, + 'HAVE_NICE': 1, + 'HAVE_OPENAT': 0, + 'HAVE_OPENPTY': 1, + 'HAVE_PATHCONF': 1, + 'HAVE_PAUSE': 1, + 'HAVE_PIPE2': 0, + 'HAVE_PLOCK': 0, + 'HAVE_POLL': 1, + 'HAVE_POLL_H': 1, + 'HAVE_POSIX_FADVISE': 0, + 'HAVE_POSIX_FALLOCATE': 0, + 'HAVE_POSIX_SPAWN': 1, + 'HAVE_PREAD': 1, + 'HAVE_PREADV': 0, + 'HAVE_PREADV2': 0, + 'HAVE_PRLIMIT': 0, + 'HAVE_PROCESS_H': 0, + 'HAVE_PROTOTYPES': 1, + 'HAVE_PTHREAD_DESTRUCTOR': 0, + 'HAVE_PTHREAD_GETCPUCLOCKID': 0, + 'HAVE_PTHREAD_H': 1, + 'HAVE_PTHREAD_INIT': 0, + 'HAVE_PTHREAD_KILL': 1, + 'HAVE_PTHREAD_SIGMASK': 1, + 'HAVE_PTY_H': 0, + 'HAVE_PUTENV': 1, + 'HAVE_PWRITE': 1, + 'HAVE_PWRITEV': 0, + 'HAVE_PWRITEV2': 0, + 'HAVE_READLINK': 1, + 'HAVE_READLINKAT': 0, + 'HAVE_READV': 1, + 'HAVE_REALPATH': 1, + 'HAVE_RENAMEAT': 0, + 'HAVE_RL_APPEND_HISTORY': 1, + 'HAVE_RL_CATCH_SIGNAL': 1, + 'HAVE_RL_COMPLETION_APPEND_CHARACTER': 1, + 'HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK': 1, + 'HAVE_RL_COMPLETION_MATCHES': 1, + 'HAVE_RL_COMPLETION_SUPPRESS_APPEND': 1, + 'HAVE_RL_PRE_INPUT_HOOK': 1, + 'HAVE_RL_RESIZE_TERMINAL': 1, + 'HAVE_ROUND': 1, + 'HAVE_SCHED_GET_PRIORITY_MAX': 1, + 'HAVE_SCHED_H': 1, + 'HAVE_SCHED_RR_GET_INTERVAL': 0, + 'HAVE_SCHED_SETAFFINITY': 0, + 'HAVE_SCHED_SETPARAM': 0, + 'HAVE_SCHED_SETSCHEDULER': 0, + 'HAVE_SEM_GETVALUE': 1, + 'HAVE_SEM_OPEN': 1, + 'HAVE_SEM_TIMEDWAIT': 0, + 'HAVE_SEM_UNLINK': 1, + 'HAVE_SENDFILE': 1, + 'HAVE_SETEGID': 1, + 'HAVE_SETEUID': 1, + 'HAVE_SETGID': 1, + 'HAVE_SETGROUPS': 1, + 'HAVE_SETHOSTNAME': 1, + 'HAVE_SETITIMER': 1, + 'HAVE_SETLOCALE': 1, + 'HAVE_SETPGID': 1, + 'HAVE_SETPGRP': 1, + 'HAVE_SETPRIORITY': 1, + 'HAVE_SETREGID': 1, + 'HAVE_SETRESGID': 0, + 'HAVE_SETRESUID': 0, + 'HAVE_SETREUID': 1, + 'HAVE_SETSID': 1, + 'HAVE_SETUID': 1, + 'HAVE_SETVBUF': 1, + 'HAVE_SHADOW_H': 0, + 'HAVE_SIGACTION': 1, + 'HAVE_SIGALTSTACK': 1, + 'HAVE_SIGINFO_T_SI_BAND': 1, + 'HAVE_SIGINTERRUPT': 1, + 'HAVE_SIGNAL_H': 1, + 'HAVE_SIGPENDING': 1, + 'HAVE_SIGRELSE': 1, + 'HAVE_SIGTIMEDWAIT': 0, + 'HAVE_SIGWAIT': 1, + 'HAVE_SIGWAITINFO': 0, + 'HAVE_SNPRINTF': 1, + 'HAVE_SOCKADDR_ALG': 0, + 'HAVE_SOCKADDR_SA_LEN': 1, + 'HAVE_SOCKADDR_STORAGE': 1, + 'HAVE_SOCKETPAIR': 1, + 'HAVE_SPAWN_H': 1, + 'HAVE_SSIZE_T': 1, + 'HAVE_STATVFS': 1, + 'HAVE_STAT_TV_NSEC': 0, + 'HAVE_STAT_TV_NSEC2': 1, + 'HAVE_STDARG_PROTOTYPES': 1, + 'HAVE_STDINT_H': 1, + 'HAVE_STDLIB_H': 1, + 'HAVE_STD_ATOMIC': 0, + 'HAVE_STRDUP': 1, + 'HAVE_STRFTIME': 1, + 'HAVE_STRINGS_H': 1, + 'HAVE_STRING_H': 1, + 'HAVE_STRLCPY': 1, + 'HAVE_STROPTS_H': 0, + 'HAVE_STRUCT_PASSWD_PW_GECOS': 1, + 'HAVE_STRUCT_PASSWD_PW_PASSWD': 1, + 'HAVE_STRUCT_STAT_ST_BIRTHTIME': 1, + 'HAVE_STRUCT_STAT_ST_BLKSIZE': 1, + 'HAVE_STRUCT_STAT_ST_BLOCKS': 1, + 'HAVE_STRUCT_STAT_ST_FLAGS': 1, + 'HAVE_STRUCT_STAT_ST_GEN': 1, + 'HAVE_STRUCT_STAT_ST_RDEV': 1, + 'HAVE_STRUCT_TM_TM_ZONE': 1, + 'HAVE_SYMLINK': 1, + 'HAVE_SYMLINKAT': 0, + 'HAVE_SYNC': 1, + 'HAVE_SYSCONF': 1, + 'HAVE_SYSEXITS_H': 1, + 'HAVE_SYS_AUDIOIO_H': 0, + 'HAVE_SYS_BSDTTY_H': 0, + 'HAVE_SYS_DEVPOLL_H': 0, + 'HAVE_SYS_DIR_H': 0, + 'HAVE_SYS_ENDIAN_H': 0, + 'HAVE_SYS_EPOLL_H': 0, + 'HAVE_SYS_EVENT_H': 1, + 'HAVE_SYS_FILE_H': 1, + 'HAVE_SYS_IOCTL_H': 1, + 'HAVE_SYS_KERN_CONTROL_H': 1, + 'HAVE_SYS_LOADAVG_H': 0, + 'HAVE_SYS_LOCK_H': 1, + 'HAVE_SYS_MKDEV_H': 0, + 'HAVE_SYS_MODEM_H': 0, + 'HAVE_SYS_NDIR_H': 0, + 'HAVE_SYS_PARAM_H': 1, + 'HAVE_SYS_POLL_H': 1, + 'HAVE_SYS_RANDOM_H': 1, + 'HAVE_SYS_RESOURCE_H': 1, + 'HAVE_SYS_SELECT_H': 1, + 'HAVE_SYS_SENDFILE_H': 0, + 'HAVE_SYS_SOCKET_H': 1, + 'HAVE_SYS_STATVFS_H': 1, + 'HAVE_SYS_STAT_H': 1, + 'HAVE_SYS_SYSCALL_H': 1, + 'HAVE_SYS_SYSMACROS_H': 0, + 'HAVE_SYS_SYS_DOMAIN_H': 1, + 'HAVE_SYS_TERMIO_H': 0, + 'HAVE_SYS_TIMES_H': 1, + 'HAVE_SYS_TIME_H': 1, + 'HAVE_SYS_TYPES_H': 1, + 'HAVE_SYS_UIO_H': 1, + 'HAVE_SYS_UN_H': 1, + 'HAVE_SYS_UTSNAME_H': 1, + 'HAVE_SYS_WAIT_H': 1, + 'HAVE_SYS_XATTR_H': 1, + 'HAVE_TCGETPGRP': 1, + 'HAVE_TCSETPGRP': 1, + 'HAVE_TEMPNAM': 1, + 'HAVE_TERMIOS_H': 1, + 'HAVE_TERM_H': 1, + 'HAVE_TGAMMA': 1, + 'HAVE_TIMEGM': 1, + 'HAVE_TIMES': 1, + 'HAVE_TMPFILE': 1, + 'HAVE_TMPNAM': 1, + 'HAVE_TMPNAM_R': 0, + 'HAVE_TM_ZONE': 1, + 'HAVE_TRUNCATE': 1, + 'HAVE_TZNAME': 0, + 'HAVE_UCS4_TCL': 0, + 'HAVE_UNAME': 1, + 'HAVE_UNISTD_H': 1, + 'HAVE_UNLINKAT': 0, + 'HAVE_UNSETENV': 1, + 'HAVE_USABLE_WCHAR_T': 0, + 'HAVE_UTIL_H': 1, + 'HAVE_UTIMENSAT': 0, + 'HAVE_UTIMES': 1, + 'HAVE_UTIME_H': 1, + 'HAVE_UUID_CREATE': 0, + 'HAVE_UUID_GENERATE_TIME_SAFE': 0, + 'HAVE_UUID_H': 0, + 'HAVE_UUID_UUID_H': 1, + 'HAVE_WAIT3': 1, + 'HAVE_WAIT4': 1, + 'HAVE_WAITID': 1, + 'HAVE_WAITPID': 1, + 'HAVE_WCHAR_H': 1, + 'HAVE_WCSCOLL': 1, + 'HAVE_WCSFTIME': 1, + 'HAVE_WCSXFRM': 1, + 'HAVE_WMEMCMP': 1, + 'HAVE_WORKING_TZSET': 1, + 'HAVE_WRITEV': 1, + 'HAVE_X509_VERIFY_PARAM_SET1_HOST': 1, + 'HAVE_ZLIB_COPY': 1, + 'HAVE__GETPTY': 0, + 'HOST_GNU_TYPE': 'arm64-apple-darwin20.0.0', + 'INCLDIRSTOMAKE': '/opt/anaconda1anaconda2anaconda3/include ' + '/opt/anaconda1anaconda2anaconda3/include ' + '/opt/anaconda1anaconda2anaconda3/include/python@PYVER@@ABIFLAGS@ ' + '/opt/anaconda1anaconda2anaconda3/include/python@PYVER@@ABIFLAGS@', + 'INCLUDEDIR': '/opt/anaconda1anaconda2anaconda3/include', + 'INCLUDEPY': '/opt/anaconda1anaconda2anaconda3/include/python@PYVER@@ABIFLAGS@', + 'INSTALL': '/usr/bin/install -c', + 'INSTALL_DATA': '/usr/bin/install -c -m 644', + 'INSTALL_PROGRAM': '/usr/bin/install -c', + 'INSTALL_SCRIPT': '/usr/bin/install -c', + 'INSTALL_SHARED': '/usr/bin/install -c -m 555', + 'INSTSONAME': 'libpython@PYVER@@ABIFLAGS@.a', + 'IO_H': 'Modules/_io/_iomodule.h', + 'IO_OBJS': '\\', + 'LDCXXSHARED': 'arm64-apple-darwin20.0.0-clang++ -bundle -undefined ' + 'dynamic_lookup', + 'LDFLAGS': '-Wl,-pie -Wl,-headerpad_max_install_names -Wl,-dead_strip_dylibs ' + '-Wl,-rpath,/opt/anaconda1anaconda2anaconda3/lib ' + '-L/opt/anaconda1anaconda2anaconda3/lib ' + '-flto -Wl,-export_dynamic -Wl,-pie ' + '-Wl,-headerpad_max_install_names -Wl,-dead_strip_dylibs ' + '-Wl,-rpath,/opt/anaconda1anaconda2anaconda3/lib ' + '-L/opt/anaconda1anaconda2anaconda3/lib', + 'LDLAST': '', + 'LDLIBRARY': 'libpython@PYVER@@ABIFLAGS@.a', + 'LDLIBRARYDIR': '', + 'LDSHARED': 'arm64-apple-darwin20.0.0-clang -bundle -undefined ' + 'dynamic_lookup -Wl,-pie -Wl,-headerpad_max_install_names ' + '-Wl,-dead_strip_dylibs ' + '-Wl,-rpath,/opt/anaconda1anaconda2anaconda3/lib ' + '-L/opt/anaconda1anaconda2anaconda3/lib ' + '-flto -Wl,-export_dynamic -Wl,-pie ' + '-Wl,-headerpad_max_install_names -Wl,-dead_strip_dylibs ' + '-Wl,-rpath,/opt/anaconda1anaconda2anaconda3/lib ' + '-L/opt/anaconda1anaconda2anaconda3/lib', + 'LDVERSION': '@PYVER@@ABIFLAGS@', + 'LIBC': '', + 'LIBDEST': '/opt/anaconda1anaconda2anaconda3/lib/python@PYVER@', + 'LIBDIR': '/opt/anaconda1anaconda2anaconda3/lib', + 'LIBFFI_INCLUDEDIR': '/opt/anaconda1anaconda2anaconda3/include', + 'LIBM': '', + 'LIBOBJDIR': 'Python/', + 'LIBOBJS': '', + 'LIBPC': '/opt/anaconda1anaconda2anaconda3/lib/pkgconfig', + 'LIBPL': '/opt/anaconda1anaconda2anaconda3/lib/python@PYVER@/config-@PYVER@@ABIFLAGS@-darwin', + 'LIBRARY': 'libpython@PYVER@@ABIFLAGS@.a', + 'LIBRARY_OBJS': '\\', + 'LIBRARY_OBJS_OMIT_FROZEN': '\\', + 'LIBS': '-ldl -framework CoreFoundation', + 'LIBSUBDIRS': 'tkinter tkinter/test tkinter/test/test_tkinter \\', + 'LINKCC': 'arm64-apple-darwin20.0.0-clang', + 'LINKFORSHARED': '-Wl,-stack_size,1000000 -framework CoreFoundation', + 'LIPO_32BIT_FLAGS': '', + 'LLVM_PROF_ERR': 'no', + 'LLVM_PROF_FILE': 'LLVM_PROFILE_FILE="code-%p.profclangr"', + 'LLVM_PROF_MERGER': '/opt/conda/conda-bld/python_1524823838194/_build_env/bin/llvm-profdata ' + 'merge -output=code.profclangd *.profclangr', + 'LN': 'ln', + 'LOCALMODLIBS': '', + 'LOG1P_DROPS_ZERO_SIGN': 0, + 'MACHDEP': 'darwin', + 'MACHDEP_OBJS': '', + 'MACHDESTLIB': '/opt/anaconda1anaconda2anaconda3/lib/python@PYVER@', + 'MACOSX_DEPLOYMENT_TARGET': '11.0', + 'MAINCC': 'arm64-apple-darwin20.0.0-clang', + 'MAJOR_IN_MKDEV': 0, + 'MAJOR_IN_SYSMACROS': 0, + 'MAKESETUP': '${SRC_DIR}/Modules/makesetup', + 'MANDIR': '/opt/anaconda1anaconda2anaconda3/share/man', + 'MKDIR_P': '${SRC_DIR}/install-sh -c -d', + 'MODBUILT_NAMES': 'posix errno pwd _sre _codecs _weakref _functools ' + '_operator _collections _abc itertools atexit _signal ' + '_stat time _thread _locale _io zipimport ' + 'faulthandler _tracemalloc _symtable xxsubtype', + 'MODDISABLED_NAMES': '', + 'MODLIBS': '', + 'MODOBJS': 'Modules/posixmodule.o Modules/errnomodule.o ' + 'Modules/pwdmodule.o Modules/_sre.o Modules/_codecsmodule.o ' + 'Modules/_weakref.o Modules/_functoolsmodule.o ' + 'Modules/_operator.o Modules/_collectionsmodule.o ' + 'Modules/_abc.o Modules/itertoolsmodule.o ' + 'Modules/atexitmodule.o Modules/signalmodule.o Modules/_stat.o ' + 'Modules/timemodule.o Modules/_threadmodule.o ' + 'Modules/_localemodule.o Modules/_iomodule.o Modules/iobase.o ' + 'Modules/fileio.o Modules/bytesio.o Modules/bufferedio.o ' + 'Modules/textio.o Modules/stringio.o Modules/zipimport.o ' + 'Modules/faulthandler.o Modules/_tracemalloc.o ' + 'Modules/hashtable.o Modules/symtablemodule.o ' + 'Modules/xxsubtype.o', + 'MODULE_OBJS': '\\', + 'MULTIARCH': 'darwin', + 'MULTIARCH_CPPFLAGS': '-DMULTIARCH=\\"darwin\\"', + 'MVWDELCH_IS_EXPRESSION': 1, + 'NO_AS_NEEDED': '', + 'OBJECT_OBJS': '\\', + 'OPENSSL_INCLUDES': '-I/opt/anaconda1anaconda2anaconda3/include', + 'OPENSSL_LDFLAGS': '-L/opt/anaconda1anaconda2anaconda3/lib', + 'OPENSSL_LIBS': '-lssl -lcrypto', + 'OPT': '-DNDEBUG -fwrapv -O3 -Wall -Wstrict-prototypes', + 'OTHER_LIBTOOL_OPT': '', + 'PACKAGE_BUGREPORT': 0, + 'PACKAGE_NAME': 0, + 'PACKAGE_STRING': 0, + 'PACKAGE_TARNAME': 0, + 'PACKAGE_URL': 0, + 'PACKAGE_VERSION': 0, + 'PARSER_HEADERS': '\\', + 'PARSER_OBJS': '\\ Parser/myreadline.o Parser/parsetok.o Parser/tokenizer.o', + 'PGEN': 'Parser/pgen', + 'PGENOBJS': '\\ \\', + 'PGOBJS': '\\', + 'PGO_PROF_GEN_FLAG': '-fprofile-instr-generate', + 'PGO_PROF_USE_FLAG': '-fprofile-instr-use=code.profclangd', + 'POBJS': '\\', + 'POSIX_SEMAPHORES_NOT_ENABLED': 0, + 'PROFILE_TASK': '-m test.regrtest --pgo', + 'PTHREAD_KEY_T_IS_COMPATIBLE_WITH_INT': 0, + 'PTHREAD_SYSTEM_SCHED_SUPPORTED': 1, + 'PURIFY': '', + 'PY3LIBRARY': '', + 'PYLONG_BITS_IN_DIGIT': 0, + 'PYTHON': 'python', + 'PYTHONFRAMEWORK': '', + 'PYTHONFRAMEWORKDIR': 'no-framework', + 'PYTHONFRAMEWORKINSTALLDIR': '', + 'PYTHONFRAMEWORKPREFIX': '', + 'PYTHONPATH': '', + 'PYTHON_FOR_BUILD': './python.exe -E', + 'PYTHON_FOR_REGEN': 'python3', + 'PYTHON_HEADERS': '\\', + 'PYTHON_OBJS': '\\', + 'PY_BUILD_ENVIRON': '', + 'PY_CFLAGS': '-fno-strict-aliasing -Wsign-compare -Wunreachable-code -DNDEBUG ' + '-fwrapv -O3 -Wall -Wstrict-prototypes ' + '-ftree-vectorize -fPIC -fPIE ' + '-fstack-protector-strong -O3 -pipe ' + '-fdebug-prefix-map=${SRC_DIR}=/usr/local/src/conda/${PKG_NAME}-${PKG_VERSION} ' + '-fdebug-prefix-map=/opt/anaconda1anaconda2anaconda3=/usr/local/src/conda-prefix ' + '-flto -flto -Wl,-export_dynamic ' + '-ftree-vectorize -fPIC -fPIE -fstack-protector-strong ' + '-O3 -pipe ' + '-fdebug-prefix-map=${SRC_DIR}=/usr/local/src/conda/${PKG_NAME}-${PKG_VERSION} ' + '-fdebug-prefix-map=/opt/anaconda1anaconda2anaconda3=/usr/local/src/conda-prefix ' + '-flto', + 'PY_CFLAGS_NODIST': '-std=c99 -Werror=implicit-function-declaration ' + '-ftree-vectorize ' + '-fPIC -fPIE -fstack-protector-strong -O3 -pipe ' + '-fdebug-prefix-map=${SRC_DIR}=/usr/local/src/conda/${PKG_NAME}-${PKG_VERSION} ' + '-fdebug-prefix-map=/opt/anaconda1anaconda2anaconda3=/usr/local/src/conda-prefix ' + '-flto -fprofile-instr-use=code.profclangd', + 'PY_COERCE_C_LOCALE': 1, + 'PY_CORE_CFLAGS': '-fno-strict-aliasing -Wsign-compare -Wunreachable-code ' + '-DNDEBUG -fwrapv -O3 -Wall -Wstrict-prototypes ' + '-ftree-vectorize -fPIC ' + '-fPIE -fstack-protector-strong -O3 -pipe ' + '-fdebug-prefix-map=${SRC_DIR}=/usr/local/src/conda/${PKG_NAME}-${PKG_VERSION} ' + '-fdebug-prefix-map=/opt/anaconda1anaconda2anaconda3=/usr/local/src/conda-prefix ' + '-flto -flto -Wl,-export_dynamic ' + '-ftree-vectorize -fPIC -fPIE ' + '-fstack-protector-strong -O3 -pipe ' + '-fdebug-prefix-map=${SRC_DIR}=/usr/local/src/conda/${PKG_NAME}-${PKG_VERSION} ' + '-fdebug-prefix-map=/opt/anaconda1anaconda2anaconda3=/usr/local/src/conda-prefix ' + '-flto -std=c99 -Werror=implicit-function-declaration ' + '-ftree-vectorize -fPIC ' + '-fPIE -fstack-protector-strong -O3 -pipe ' + '-fdebug-prefix-map=${SRC_DIR}=/usr/local/src/conda/${PKG_NAME}-${PKG_VERSION} ' + '-fdebug-prefix-map=/opt/anaconda1anaconda2anaconda3=/usr/local/src/conda-prefix ' + '-flto -fprofile-instr-use=code.profclangd -IObjects ' + '-IInclude -IPython -I. ' + '-I${SRC_DIR}/Include ' + '-D_FORTIFY_SOURCE=2 -mmacosx-version-min=11.0 ' + '-I/opt/anaconda1anaconda2anaconda3/include ' + '-D_FORTIFY_SOURCE=2 -mmacosx-version-min=11.0 ' + '-I/opt/anaconda1anaconda2anaconda3/include ' + '-DPy_BUILD_CORE', + 'PY_CPPFLAGS': '-IObjects -IInclude -IPython -I. ' + '-I${SRC_DIR}/Include ' + '-D_FORTIFY_SOURCE=2 -mmacosx-version-min=11.0 ' + '-I/opt/anaconda1anaconda2anaconda3/include ' + '-D_FORTIFY_SOURCE=2 -mmacosx-version-min=11.0 ' + '-I/opt/anaconda1anaconda2anaconda3/include', + 'PY_FORMAT_SIZE_T': '"z"', + 'PY_LDFLAGS': '-Wl,-pie -Wl,-headerpad_max_install_names ' + '-Wl,-dead_strip_dylibs ' + '-Wl,-rpath,/opt/anaconda1anaconda2anaconda3/lib ' + '-L/opt/anaconda1anaconda2anaconda3/lib ' + '-flto -Wl,-export_dynamic -Wl,-pie ' + '-Wl,-headerpad_max_install_names -Wl,-dead_strip_dylibs ' + '-Wl,-rpath,/opt/anaconda1anaconda2anaconda3/lib ' + '-L/opt/anaconda1anaconda2anaconda3/lib', + 'PY_SSL_DEFAULT_CIPHERS': 1, + 'PY_SSL_DEFAULT_CIPHER_STRING': 0, + 'PY_WARN_ON_C_LOCALE': 1, + 'Py_DEBUG': 0, + 'Py_ENABLE_SHARED': 0, + 'Py_HASH_ALGORITHM': 0, + 'QUICKTESTOPTS': '-x test_subprocess test_io test_lib2to3 \\', + 'READELF': ':', + 'RESSRCDIR': 'Mac/Resources/framework', + 'RETSIGTYPE': 'void', + 'RUNSHARED': '', + 'SCRIPTDIR': '/opt/anaconda1anaconda2anaconda3/lib', + 'SETPGRP_HAVE_ARG': 0, + 'SGI_ABI': '@SGI_ABI@', + 'SHELL': '/bin/sh', + 'SHLIBS': '-ldl -framework CoreFoundation', + 'SHLIB_SUFFIX': '.so', + 'SIGNED_RIGHT_SHIFT_ZERO_FILLS': 0, + 'SITEPATH': '', + 'SIZEOF_DOUBLE': 8, + 'SIZEOF_FLOAT': 4, + 'SIZEOF_FPOS_T': 8, + 'SIZEOF_INT': 4, + 'SIZEOF_LONG': 8, + 'SIZEOF_LONG_DOUBLE': 16, + 'SIZEOF_LONG_LONG': 8, + 'SIZEOF_OFF_T': 8, + 'SIZEOF_PID_T': 4, + 'SIZEOF_PTHREAD_KEY_T': 8, + 'SIZEOF_PTHREAD_T': 8, + 'SIZEOF_SHORT': 2, + 'SIZEOF_SIZE_T': 8, + 'SIZEOF_TIME_T': 8, + 'SIZEOF_UINTPTR_T': 8, + 'SIZEOF_VOID_P': 8, + 'SIZEOF_WCHAR_T': 4, + 'SIZEOF__BOOL': 1, + 'SOABI': 'cpython-@PYVERNODOTS@@ABIFLAGS@-darwin', + 'SRCDIRS': 'Parser Objects Python Modules Programs', + 'SRC_GDB_HOOKS': '${SRC_DIR}/Tools/gdb/libpython.py', + 'STDC_HEADERS': 1, + 'STRICT_SYSV_CURSES': "/* Don't use ncurses extensions */", + 'STRIPFLAG': '-s', + 'SUBDIRS': '', + 'SUBDIRSTOO': 'Include Lib Misc', + 'SYSLIBS': '', + 'SYS_SELECT_WITH_SYS_TIME': 1, + 'TANH_PRESERVES_ZERO_SIGN': 1, + 'TCLTK_INCLUDES': '-I/opt/anaconda1anaconda2anaconda3/include', + 'TCLTK_LIBS': '-L/opt/anaconda1anaconda2anaconda3/lib ' + '-ltcl@TCLTK_VER@ -ltk@TCLTK_VER@', + 'TESTOPTS': '', + 'TESTPATH': '', + 'TESTPYTHON': './python.exe', + 'TESTPYTHONOPTS': '', + 'TESTRUNNER': './python.exe ' + '${SRC_DIR}/Tools/scripts/run_tests.py', + 'TESTTIMEOUT': 1200, + 'TIMEMODULE_LIB': 0, + 'TIME_WITH_SYS_TIME': 1, + 'TM_IN_SYS_TIME': 0, + 'UNICODE_DEPS': '\\', + 'UNIVERSALSDK': '', + 'UPDATE_FILE': 'python3 ' + '${SRC_DIR}/Tools/scripts/update_file.py', + 'USE_COMPUTED_GOTOS': 1, + 'VERSION': '@PYVER@', + 'VPATH': '${SRC_DIR}', + 'WINDOW_HAS_FLAGS': 1, + 'WITH_DOC_STRINGS': 1, + 'WITH_DTRACE': 0, + 'WITH_DYLD': 1, + 'WITH_LIBINTL': 0, + 'WITH_NEXT_FRAMEWORK': 0, + 'WITH_PYMALLOC': 1, + 'WITH_VALGRIND': 0, + 'X87_DOUBLE_ROUNDING': 0, + 'XMLLIBSUBDIRS': 'xml xml/dom xml/etree xml/parsers xml/sax', + 'abs_builddir': '${SRC_DIR}/build-static', + 'abs_srcdir': '${SRC_DIR}', + 'datarootdir': '/opt/anaconda1anaconda2anaconda3/share', + 'exec_prefix': '/opt/anaconda1anaconda2anaconda3', + 'prefix': '/opt/anaconda1anaconda2anaconda3', + 'srcdir': '${SRC_DIR}'} From 98c12112ba4c7202693c20d0a85fcb987cfb449f Mon Sep 17 00:00:00 2001 From: Isuru Fernando Date: Fri, 14 Aug 2020 03:40:35 +0000 Subject: [PATCH 11/29] Keep LTO and disable PGO --- recipe/build.sh | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/recipe/build.sh b/recipe/build.sh index 1e2926f56..83c9eccee 100644 --- a/recipe/build.sh +++ b/recipe/build.sh @@ -237,16 +237,18 @@ _common_configure_args+=("--with-tcltk-libs=-L${PREFIX}/lib -ltcl8.6 -ltk8.6") # Add more optimization flags for the static Python interpreter: declare -a PROFILE_TASK=() if [[ ${_OPTIMIZED} == yes ]]; then - _common_configure_args+=(--enable-optimizations) _common_configure_args+=(--with-lto) - _MAKE_TARGET=profile-opt - # To speed up build times during testing (1): - if [[ ${QUICK_BUILD} == yes ]]; then - # TODO :: It seems this is just profiling everything, on Windows, only 40 odd tests are - # run while on Unix, all 400+ are run, making this slower and less well curated - _PROFILE_TASK+=(PROFILE_TASK="-m test --pgo") - else - _PROFILE_TASK+=(PROFILE_TASK="-m test --pgo-extended") + if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + _common_configure_args+=(--enable-optimizations) + _MAKE_TARGET=profile-opt + # To speed up build times during testing (1): + if [[ ${QUICK_BUILD} == yes ]]; then + # TODO :: It seems this is just profiling everything, on Windows, only 40 odd tests are + # run while on Unix, all 400+ are run, making this slower and less well curated + _PROFILE_TASK+=(PROFILE_TASK="-m test --pgo") + else + _PROFILE_TASK+=(PROFILE_TASK="-m test --pgo-extended") + fi fi if [[ ${CC} =~ .*gcc.* ]]; then LTO_CFLAGS+=(-fuse-linker-plugin) From e4234a51974182494d5d7777d655682f23de71f1 Mon Sep 17 00:00:00 2001 From: Isuru Fernando Date: Fri, 14 Aug 2020 04:19:31 +0000 Subject: [PATCH 12/29] Add some upstream patches --- recipe/meta.yaml | 3 + recipe/patches/gh21114.patch | 40 +++++ recipe/patches/gh21228.patch | 47 ++++++ recipe/patches/gh21241.patch | 304 +++++++++++++++++++++++++++++++++++ 4 files changed, 394 insertions(+) create mode 100644 recipe/patches/gh21114.patch create mode 100644 recipe/patches/gh21228.patch create mode 100644 recipe/patches/gh21241.patch diff --git a/recipe/meta.yaml b/recipe/meta.yaml index c49340d8b..5b4b98f03 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -45,6 +45,9 @@ source: - patches/0022-Add-CondaEcosystemModifyDllSearchPath.patch - patches/0026-Revert-part-of-https-bugs.python.org-issue33895-http.patch - patches/0027-cross-compile-darwin.patch + - patches/gh21114.patch + - patches/gh21241.patch + - patches/gh21228.patch # TODO :: Depend on our own packages for these: - url: https://github.com/python/cpython-source-deps/archive/xz-5.2.2.zip # [win] diff --git a/recipe/patches/gh21114.patch b/recipe/patches/gh21114.patch new file mode 100644 index 000000000..d0e918827 --- /dev/null +++ b/recipe/patches/gh21114.patch @@ -0,0 +1,40 @@ +From 2add6fb11b0eddf459c2e79ec86376a8adb00cfc Mon Sep 17 00:00:00 2001 +From: Ronald Oussoren +Date: Wed, 24 Jun 2020 14:22:16 +0200 +Subject: [PATCH] BPO-41101: Support "arm64" in Mac/Tools/pythonw + +--- + Mac/Tools/pythonw.c | 6 ++++++ + .../next/macOS/2020-06-24-14-21-17.bpo-41101.z9hCsP.rst | 2 ++ + 2 files changed, 8 insertions(+) + create mode 100644 Misc/NEWS.d/next/macOS/2020-06-24-14-21-17.bpo-41101.z9hCsP.rst + +diff --git a/Mac/Tools/pythonw.c b/Mac/Tools/pythonw.c +index 1d2db383f943c..21e79665442b6 100644 +--- a/Mac/Tools/pythonw.c ++++ b/Mac/Tools/pythonw.c +@@ -119,10 +119,16 @@ setup_spawnattr(posix_spawnattr_t* spawnattr) + + #elif defined(__ppc__) + cpu_types[0] = CPU_TYPE_POWERPC; ++ + #elif defined(__i386__) + cpu_types[0] = CPU_TYPE_X86; ++ ++#elif defined(__arm64__) ++ cpu_types[0] = CPU_TYPE_ARM64; ++ + #else + # error "Unknown CPU" ++ + #endif + + if (posix_spawnattr_setbinpref_np(spawnattr, count, +diff --git a/Misc/NEWS.d/next/macOS/2020-06-24-14-21-17.bpo-41101.z9hCsP.rst b/Misc/NEWS.d/next/macOS/2020-06-24-14-21-17.bpo-41101.z9hCsP.rst +new file mode 100644 +index 0000000000000..f66863db00c06 +--- /dev/null ++++ b/Misc/NEWS.d/next/macOS/2020-06-24-14-21-17.bpo-41101.z9hCsP.rst +@@ -0,0 +1,2 @@ ++Support the new "arm64" architecture for macOS in the pythonw executable in ++framework builds. diff --git a/recipe/patches/gh21228.patch b/recipe/patches/gh21228.patch new file mode 100644 index 000000000..7e7f469ac --- /dev/null +++ b/recipe/patches/gh21228.patch @@ -0,0 +1,47 @@ +From 79d170ebfa523f4a4f104d8041ad880215c5d5fa Mon Sep 17 00:00:00 2001 +From: Lawrence D'Anna +Date: Mon, 29 Jun 2020 16:05:44 -0700 +Subject: [PATCH 1/2] fix _decimal for arm64 Mac OS + +add __arm64__ to the allowable Mac OS arches in mpdecimal.h +--- + Modules/_decimal/libmpdec/mpdecimal.h | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/Modules/_decimal/libmpdec/mpdecimal.h b/Modules/_decimal/libmpdec/mpdecimal.h +index 108b76efa8594..35ce429f60124 100644 +--- a/Modules/_decimal/libmpdec/mpdecimal.h ++++ b/Modules/_decimal/libmpdec/mpdecimal.h +@@ -127,6 +127,9 @@ const char *mpd_version(void); + #elif defined(__x86_64__) + #define CONFIG_64 + #define ASM ++ #elif defined(__arm64__) ++ #define CONFIG_64 ++ #define ANSI + #else + #error "unknown architecture for universal build." + #endif + +From af7520590e6c72d3bb2b2438e5eb2b947d7a7372 Mon Sep 17 00:00:00 2001 +From: "blurb-it[bot]" <43283697+blurb-it[bot]@users.noreply.github.com> +Date: Tue, 30 Jun 2020 04:44:30 +0000 +Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=93=9C=F0=9F=A4=96=20Added=20by=20blu?= + =?UTF-8?q?rb=5Fit.?= +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +--- + .../Core and Builtins/2020-06-30-04-44-29.bpo-41100.PJwA6F.rst | 1 + + 1 file changed, 1 insertion(+) + create mode 100644 Misc/NEWS.d/next/Core and Builtins/2020-06-30-04-44-29.bpo-41100.PJwA6F.rst + +diff --git a/Misc/NEWS.d/next/Core and Builtins/2020-06-30-04-44-29.bpo-41100.PJwA6F.rst b/Misc/NEWS.d/next/Core and Builtins/2020-06-30-04-44-29.bpo-41100.PJwA6F.rst +new file mode 100644 +index 0000000000000..d6176d69f0eb0 +--- /dev/null ++++ b/Misc/NEWS.d/next/Core and Builtins/2020-06-30-04-44-29.bpo-41100.PJwA6F.rst +@@ -0,0 +1 @@ ++add arm64 to the allowable Mac OS arches in mpdecimal.h +\ No newline at end of file diff --git a/recipe/patches/gh21241.patch b/recipe/patches/gh21241.patch new file mode 100644 index 000000000..fe467194d --- /dev/null +++ b/recipe/patches/gh21241.patch @@ -0,0 +1,304 @@ +From 311f8c301d8b6d3aef7156631f487eccc73c6ef7 Mon Sep 17 00:00:00 2001 +From: Lawrence D'Anna +Date: Tue, 30 Jun 2020 10:37:20 -0700 +Subject: [PATCH 1/3] ctypes: check _dyld_shared_cache_contains_path in + find_library + +System libraries in Mac OS 11 may be present only in the shared cache, +with the actual mach-o file not present in the corresponding location +on the filesystem. ctypes.util.find_library should check the +shared cache in order to behave consistently across Mac OS 10.15 +and earlier and Mac OS 11.0 and later. +--- + Lib/ctypes/macholib/dyld.py | 12 ++++++ + .../2020-06-30-18-24-28.bpo-41100._QkcD_.rst | 1 + + Modules/_ctypes/callproc.c | 38 +++++++++++++++++++ + 3 files changed, 51 insertions(+) + create mode 100644 Misc/NEWS.d/next/Core and Builtins/2020-06-30-18-24-28.bpo-41100._QkcD_.rst + +diff --git a/Lib/ctypes/macholib/dyld.py b/Lib/ctypes/macholib/dyld.py +index 9d86b058765a3..0cc04648db75d 100644 +--- a/Lib/ctypes/macholib/dyld.py ++++ b/Lib/ctypes/macholib/dyld.py +@@ -7,6 +7,12 @@ + from ctypes.macholib.dylib import dylib_info + from itertools import * + ++try: ++ from _ctypes import _dyld_shared_cache_contains_path ++except ImportError: ++ def _dyld_shared_cache_contains_path(*args): ++ raise NotImplementedError ++ + __all__ = [ + 'dyld_find', 'framework_find', + 'framework_info', 'dylib_info', +@@ -124,6 +130,12 @@ def dyld_find(name, executable_path=None, env=None): + ), env): + if os.path.isfile(path): + return path ++ try: ++ if _dyld_shared_cache_contains_path(path): ++ return path ++ except NotImplementedError: ++ pass ++ + raise ValueError("dylib %s could not be found" % (name,)) + + def framework_find(fn, executable_path=None, env=None): +diff --git a/Misc/NEWS.d/next/Core and Builtins/2020-06-30-18-24-28.bpo-41100._QkcD_.rst b/Misc/NEWS.d/next/Core and Builtins/2020-06-30-18-24-28.bpo-41100._QkcD_.rst +new file mode 100644 +index 0000000000000..dbb732432c079 +--- /dev/null ++++ b/Misc/NEWS.d/next/Core and Builtins/2020-06-30-18-24-28.bpo-41100._QkcD_.rst +@@ -0,0 +1 @@ ++ctypes: Mac OS 11: check for system libraries in the shared cache +\ No newline at end of file +diff --git a/Modules/_ctypes/callproc.c b/Modules/_ctypes/callproc.c +index 6030cc3d43670..572498715f500 100644 +--- a/Modules/_ctypes/callproc.c ++++ b/Modules/_ctypes/callproc.c +@@ -64,6 +64,10 @@ + #include "ctypes_dlfcn.h" + #endif + ++#ifdef __APPLE__ ++extern bool _dyld_shared_cache_contains_path(const char* path) __attribute__((weak_import)); ++#endif ++ + #ifdef MS_WIN32 + #include + #endif +@@ -1398,6 +1402,37 @@ copy_com_pointer(PyObject *self, PyObject *args) + } + #else + ++#ifdef __APPLE__ ++static PyObject *py_dyld_shared_cache_contains_path(PyObject *self, PyObject *args) ++{ ++ PyObject *name, *name2; ++ char *name_str; ++ ++ if (_dyld_shared_cache_contains_path == NULL) { ++ PyErr_SetString(PyExc_NotImplementedError, "_dyld_shared_cache_contains_path symbol is missing"); ++ return NULL; ++ } ++ ++ if (!PyArg_ParseTuple(args, "O", &name)) ++ return NULL; ++ ++ if (name == Py_None) ++ Py_RETURN_FALSE; ++ ++ if (PyUnicode_FSConverter(name, &name2) == 0) ++ return NULL; ++ if (PyBytes_Check(name2)) ++ name_str = PyBytes_AS_STRING(name2); ++ else ++ name_str = PyByteArray_AS_STRING(name2); ++ ++ if(_dyld_shared_cache_contains_path(name_str)) ++ Py_RETURN_TRUE; ++ else ++ Py_RETURN_FALSE; ++} ++#endif ++ + static PyObject *py_dl_open(PyObject *self, PyObject *args) + { + PyObject *name, *name2; +@@ -1908,6 +1943,9 @@ PyMethodDef _ctypes_module_methods[] = { + "dlopen(name, flag={RTLD_GLOBAL|RTLD_LOCAL}) open a shared library"}, + {"dlclose", py_dl_close, METH_VARARGS, "dlclose a library"}, + {"dlsym", py_dl_sym, METH_VARARGS, "find symbol in shared library"}, ++#endif ++#ifdef __APPLE__ ++ {"_dyld_shared_cache_contains_path", py_dyld_shared_cache_contains_path, METH_VARARGS, "check if path is in the shared cache"}, + #endif + {"alignment", align_func, METH_O, alignment_doc}, + {"sizeof", sizeof_func, METH_O, sizeof_doc}, + +From 6b2988773a53b91d655a6843ea4522f6de0dbbad Mon Sep 17 00:00:00 2001 +From: Lawrence D'Anna +Date: Fri, 17 Jul 2020 16:24:07 -0700 +Subject: [PATCH 2/3] fix test_macholib for Mac OS 11 + +--- + Lib/ctypes/test/test_macholib.py | 15 ++++++++++----- + 1 file changed, 10 insertions(+), 5 deletions(-) + +diff --git a/Lib/ctypes/test/test_macholib.py b/Lib/ctypes/test/test_macholib.py +index 6b3526951acfa..ed04479abd091 100644 +--- a/Lib/ctypes/test/test_macholib.py ++++ b/Lib/ctypes/test/test_macholib.py +@@ -46,18 +46,23 @@ class MachOTest(unittest.TestCase): + @unittest.skipUnless(sys.platform == "darwin", 'OSX-specific test') + def test_find(self): + +- self.assertEqual(find_lib('pthread'), +- '/usr/lib/libSystem.B.dylib') ++ # On Mac OS 11, system dylibs are only present in the shared cache, ++ # so symlinks like libpthread.dylib -> libSystem.B.dylib will not ++ # be resolved by dyld_find ++ ++ self.assertIn(find_lib('pthread'), ++ ('/usr/lib/libSystem.B.dylib', '/usr/lib/libpthread.dylib')) + + result = find_lib('z') + # Issue #21093: dyld default search path includes $HOME/lib and + # /usr/local/lib before /usr/lib, which caused test failures if + # a local copy of libz exists in one of them. Now ignore the head + # of the path. +- self.assertRegex(result, r".*/lib/libz\..*.*\.dylib") ++ self.assertRegex(result, r".*/lib/libz.*\.dylib") + +- self.assertEqual(find_lib('IOKit'), +- '/System/Library/Frameworks/IOKit.framework/Versions/A/IOKit') ++ self.assertIn(find_lib('IOKit'), ++ ('/System/Library/Frameworks/IOKit.framework/Versions/A/IOKit', ++ '/System/Library/Frameworks/IOKit.framework/IOKit')) + + if __name__ == "__main__": + unittest.main() + +From b76ec34daf6e5023b6afb0c6f52ec5e1e5c14884 Mon Sep 17 00:00:00 2001 +From: Lawrence D'Anna +Date: Wed, 5 Aug 2020 15:20:36 -0700 +Subject: [PATCH 3/3] Xcode 12 Beta 4 declares _dyld_shared_cache_contains_path + +--- + Modules/_ctypes/callproc.c | 49 +++++++++++++++++++------------------- + configure | 9 +++++++ + configure.ac | 4 ++++ + pyconfig.h.in | 3 +++ + 4 files changed, 40 insertions(+), 25 deletions(-) + +diff --git a/Modules/_ctypes/callproc.c b/Modules/_ctypes/callproc.c +index 572498715f500..f8007505ed310 100644 +--- a/Modules/_ctypes/callproc.c ++++ b/Modules/_ctypes/callproc.c +@@ -64,8 +64,8 @@ + #include "ctypes_dlfcn.h" + #endif + +-#ifdef __APPLE__ +-extern bool _dyld_shared_cache_contains_path(const char* path) __attribute__((weak_import)); ++#if __APPLE__ && HAVE_DYLD_SHARED_CACHE_CONTAINS_PATH ++#include + #endif + + #ifdef MS_WIN32 +@@ -1402,34 +1402,33 @@ copy_com_pointer(PyObject *self, PyObject *args) + } + #else + +-#ifdef __APPLE__ ++#if __APPLE__ && HAVE_DYLD_SHARED_CACHE_CONTAINS_PATH + static PyObject *py_dyld_shared_cache_contains_path(PyObject *self, PyObject *args) + { +- PyObject *name, *name2; +- char *name_str; +- +- if (_dyld_shared_cache_contains_path == NULL) { +- PyErr_SetString(PyExc_NotImplementedError, "_dyld_shared_cache_contains_path symbol is missing"); +- return NULL; +- } ++ if (__builtin_available(macos 11, ios 14, watchos 7, tvos 14, *)) { ++ PyObject *name, *name2; ++ char *name_str; ++ if (!PyArg_ParseTuple(args, "O", &name)) ++ return NULL; + +- if (!PyArg_ParseTuple(args, "O", &name)) +- return NULL; ++ if (name == Py_None) ++ Py_RETURN_FALSE; + +- if (name == Py_None) +- Py_RETURN_FALSE; ++ if (PyUnicode_FSConverter(name, &name2) == 0) ++ return NULL; ++ if (PyBytes_Check(name2)) ++ name_str = PyBytes_AS_STRING(name2); ++ else ++ name_str = PyByteArray_AS_STRING(name2); + +- if (PyUnicode_FSConverter(name, &name2) == 0) ++ if(_dyld_shared_cache_contains_path(name_str)) ++ Py_RETURN_TRUE; ++ else ++ Py_RETURN_FALSE; ++ } else { ++ PyErr_SetString(PyExc_NotImplementedError, "_dyld_shared_cache_contains_path symbol is missing"); + return NULL; +- if (PyBytes_Check(name2)) +- name_str = PyBytes_AS_STRING(name2); +- else +- name_str = PyByteArray_AS_STRING(name2); +- +- if(_dyld_shared_cache_contains_path(name_str)) +- Py_RETURN_TRUE; +- else +- Py_RETURN_FALSE; ++ } + } + #endif + +@@ -1944,7 +1943,7 @@ PyMethodDef _ctypes_module_methods[] = { + {"dlclose", py_dl_close, METH_VARARGS, "dlclose a library"}, + {"dlsym", py_dl_sym, METH_VARARGS, "find symbol in shared library"}, + #endif +-#ifdef __APPLE__ ++#if __APPLE__ && HAVE_DYLD_SHARED_CACHE_CONTAINS_PATH + {"_dyld_shared_cache_contains_path", py_dyld_shared_cache_contains_path, METH_VARARGS, "check if path is in the shared cache"}, + #endif + {"alignment", align_func, METH_O, alignment_doc}, +diff --git a/configure b/configure +index 5024860ca4395..0ecd1a1d66c79 100755 +--- a/configure ++++ b/configure +@@ -11601,6 +11601,15 @@ fi + done + + ++ac_fn_c_check_decl "$LINENO" "_dyld_shared_cache_contains_path" "ac_cv_have_decl__dyld_shared_cache_contains_path" "#include ++" ++if test "x$ac_cv_have_decl__dyld_shared_cache_contains_path" = xyes; then : ++ ++$as_echo "#define HAVE_DYLD_SHARED_CACHE_CONTAINS_PATH 1" >>confdefs.h ++ ++fi ++ ++ + # DYNLOADFILE specifies which dynload_*.o file we will use for dynamic + # loading of modules. + +diff --git a/configure.ac b/configure.ac +index 5a3e340aa3e72..bf7250d0085f6 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -3603,6 +3603,10 @@ DLINCLDIR=. + # platforms, such as AIX, have dlopen(), but don't want to use it. + AC_CHECK_FUNCS(dlopen) + ++AC_CHECK_DECL(_dyld_shared_cache_contains_path, ++ AC_DEFINE(HAVE_DYLD_SHARED_CACHE_CONTAINS_PATH, 1, Define if you have the '_dyld_shared_cache_contains_path' function), ++ [], [#include ]) ++ + # DYNLOADFILE specifies which dynload_*.o file we will use for dynamic + # loading of modules. + AC_SUBST(DYNLOADFILE) +diff --git a/pyconfig.h.in b/pyconfig.h.in +index bc906a869b623..53ce2738dabb6 100644 +--- a/pyconfig.h.in ++++ b/pyconfig.h.in +@@ -284,6 +284,9 @@ + /* Define to 1 if you have the `dup3' function. */ + #undef HAVE_DUP3 + ++/* Define if you have the '_dyld_shared_cache_contains_path' function */ ++#undef HAVE_DYLD_SHARED_CACHE_CONTAINS_PATH ++ + /* Defined when any dynamic module loading is enabled. */ + #undef HAVE_DYNAMIC_LOADING + From 91424e098d40e9b8a19f75dc4029f3dc2a7a50a2 Mon Sep 17 00:00:00 2001 From: Isuru Fernando Date: Fri, 14 Aug 2020 12:18:45 -0500 Subject: [PATCH 13/29] Skip compiling pyc --- recipe/meta.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 5b4b98f03..ff1e9f576 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -90,6 +90,8 @@ build: # We delete the shared libraries. ignore_run_exports: # [unix] - bzip2 # [unix] + # TODO: once conda-build defines build_platform, change this condition. + skip_compile_pyc: True # [osx and arm64] # Disabled until new conda-build release detect_binary_files_with_prefix: True # detect_binary_files_with_prefix: False From ea6c3aca43e2160f235b35c408c18f48804b4f0b Mon Sep 17 00:00:00 2001 From: Isuru Fernando Date: Fri, 14 Aug 2020 12:49:17 -0500 Subject: [PATCH 14/29] pyc compile all at the end --- recipe/build.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/recipe/build.sh b/recipe/build.sh index 83c9eccee..cd00f4286 100644 --- a/recipe/build.sh +++ b/recipe/build.sh @@ -432,3 +432,5 @@ fi # There are some strange distutils files around. Delete them rm -rf ${PREFIX}/lib/python${VER}/distutils/command/*.exe + +python -c "import compileall,sys;compileall.compile_dir(sys.prefix)" From d73f965a1f7574305de0d6a62476fc05f4fa775b Mon Sep 17 00:00:00 2001 From: Isuru Fernando Date: Fri, 14 Aug 2020 15:01:22 -0500 Subject: [PATCH 15/29] Update meta.yaml --- recipe/meta.yaml | 2 -- 1 file changed, 2 deletions(-) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index ff1e9f576..5b4b98f03 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -90,8 +90,6 @@ build: # We delete the shared libraries. ignore_run_exports: # [unix] - bzip2 # [unix] - # TODO: once conda-build defines build_platform, change this condition. - skip_compile_pyc: True # [osx and arm64] # Disabled until new conda-build release detect_binary_files_with_prefix: True # detect_binary_files_with_prefix: False From d84006a6f6a9c183955c55e28f9a1e6343c2c490 Mon Sep 17 00:00:00 2001 From: Isuru Fernando Date: Fri, 14 Aug 2020 15:32:40 -0500 Subject: [PATCH 16/29] Skip all files that have syntax errors --- recipe/build.sh | 2 +- recipe/meta.yaml | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/recipe/build.sh b/recipe/build.sh index cd00f4286..11e67d913 100644 --- a/recipe/build.sh +++ b/recipe/build.sh @@ -433,4 +433,4 @@ fi # There are some strange distutils files around. Delete them rm -rf ${PREFIX}/lib/python${VER}/distutils/command/*.exe -python -c "import compileall,sys;compileall.compile_dir(sys.prefix)" +python -c "import compileall,os;compileall.compile_dir(os.environ['PREFIX'])" diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 5b4b98f03..8240687b4 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -103,6 +103,24 @@ build: # - lib/libpython3.dylib # [osx] # match python.org compiler standard skip: True # [win and int(float(vc)) < 14] + skip_compile_pyc: + - lib/python3.8/lib2to3/tests/data/bom.py + - lib/python3.8/lib2to3/tests/data/crlf.py + - lib/python3.8/lib2to3/tests/data/different_encoding.py + - lib/python3.8/lib2to3/tests/data/false_encoding.py + - lib/python3.8/lib2to3/tests/data/py2_test_grammar.py + - lib/python3.8/test/bad_coding.py + - lib/python3.8/test/bad_coding2.py + - lib/python3.8/test/badsyntax_3131.py + - lib/python3.8/test/badsyntax_future10.py + - lib/python3.8/test/badsyntax_future3.py + - lib/python3.8/test/badsyntax_future4.py + - lib/python3.8/test/badsyntax_future5.py + - lib/python3.8/test/badsyntax_future6.py + - lib/python3.8/test/badsyntax_future7.py + - lib/python3.8/test/badsyntax_future8.py + - lib/python3.8/test/badsyntax_future9.py + - lib/python3.8/test/badsyntax_pep3120.py # Would like to be able to append to the calculated build string here, ping @msarahan, is this possible? string: h{{ PKG_HASH }}_{{ PKG_BUILDNUM }}{{ linkage_nature }}{{ debug }}_cpython run_exports: From 36722b8e879b279725aad83d125022859916c06f Mon Sep 17 00:00:00 2001 From: Isuru Fernando Date: Wed, 19 Aug 2020 14:35:15 -0500 Subject: [PATCH 17/29] Add gh21564.patch --- recipe/meta.yaml | 1 + recipe/patches/gh21564.patch | 939 +++++++++++++++++++++++++++++++++++ 2 files changed, 940 insertions(+) create mode 100644 recipe/patches/gh21564.patch diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 8240687b4..e2ea38990 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -48,6 +48,7 @@ source: - patches/gh21114.patch - patches/gh21241.patch - patches/gh21228.patch + - patches/gh21564.patch # TODO :: Depend on our own packages for these: - url: https://github.com/python/cpython-source-deps/archive/xz-5.2.2.zip # [win] diff --git a/recipe/patches/gh21564.patch b/recipe/patches/gh21564.patch new file mode 100644 index 000000000..e0c0c8ead --- /dev/null +++ b/recipe/patches/gh21564.patch @@ -0,0 +1,939 @@ +commit 14e426fd4f205e491b4c61a6d4ca6253704fc5eb +Author: Jonathan Helmus +Date: Fri Aug 7 15:43:14 2020 -0500 + + port PR 21564 to 3.8.5 + + Apply changes from https://github.com/python/cpython/pull/21564 + to the Python 3.8.5 source code + +diff --git a/Lib/_osx_support.py b/Lib/_osx_support.py +index e9efce7d7e..8ed1eeac85 100644 +--- a/Lib/_osx_support.py ++++ b/Lib/_osx_support.py +@@ -481,6 +481,8 @@ def get_platform_osx(_config_vars, osname, release, machine): + + if len(archs) == 1: + machine = archs[0] ++ elif archs == ('arm64', 'x86_64'): ++ machine = 'universal2' + elif archs == ('i386', 'ppc'): + machine = 'fat' + elif archs == ('i386', 'x86_64'): +diff --git a/Lib/ctypes/macholib/dyld.py b/Lib/ctypes/macholib/dyld.py +index 9ab447c0a1..2a8c7f009b 100644 +--- a/Lib/ctypes/macholib/dyld.py ++++ b/Lib/ctypes/macholib/dyld.py +@@ -6,6 +6,11 @@ import os + from ctypes.macholib.framework import framework_info + from ctypes.macholib.dylib import dylib_info + from itertools import * ++try: ++ from _ctypes import _dyld_shared_cache_contains_path ++except ImportError: ++ def _dyld_shared_cache_contains_path(*args): ++ raise NotImplementedError + + __all__ = [ + 'dyld_find', 'framework_find', +@@ -126,8 +131,15 @@ def dyld_find(name, executable_path=None, env=None): + dyld_executable_path_search(name, executable_path), + dyld_default_search(name, env), + ), env): ++ + if os.path.isfile(path): + return path ++ try: ++ if _dyld_shared_cache_contains_path(path): ++ return path ++ except NotImplementedError: ++ pass ++ + raise ValueError("dylib %s could not be found" % (name,)) + + def framework_find(fn, executable_path=None, env=None): +diff --git a/Lib/ctypes/test/test_macholib.py b/Lib/ctypes/test/test_macholib.py +index 6b3526951a..a1bac26a7d 100644 +--- a/Lib/ctypes/test/test_macholib.py ++++ b/Lib/ctypes/test/test_macholib.py +@@ -45,19 +45,22 @@ def find_lib(name): + class MachOTest(unittest.TestCase): + @unittest.skipUnless(sys.platform == "darwin", 'OSX-specific test') + def test_find(self): +- +- self.assertEqual(find_lib('pthread'), +- '/usr/lib/libSystem.B.dylib') ++ # On Mac OS 11, system dylibs are only present in the shared cache, ++ # so symlinks like libpthread.dylib -> libSystem.B.dylib will not ++ # be resolved by dyld_find ++ self.assertIn(find_lib('pthread'), ++ ('/usr/lib/libSystem.B.dylib', '/usr/lib/libpthread.dylib')) + + result = find_lib('z') + # Issue #21093: dyld default search path includes $HOME/lib and + # /usr/local/lib before /usr/lib, which caused test failures if + # a local copy of libz exists in one of them. Now ignore the head + # of the path. +- self.assertRegex(result, r".*/lib/libz\..*.*\.dylib") ++ self.assertRegex(result, r".*/lib/libz.*\.dylib") + +- self.assertEqual(find_lib('IOKit'), +- '/System/Library/Frameworks/IOKit.framework/Versions/A/IOKit') ++ self.assertIn(find_lib('IOKit'), ++ ('/System/Library/Frameworks/IOKit.framework/Versions/A/IOKit', ++ '/System/Library/Frameworks/IOKit.framework/IOKit')) + + if __name__ == "__main__": + unittest.main() +diff --git a/Lib/distutils/tests/test_build_ext.py b/Lib/distutils/tests/test_build_ext.py +index 5e47e0773a..5a32e03980 100644 +--- a/Lib/distutils/tests/test_build_ext.py ++++ b/Lib/distutils/tests/test_build_ext.py +@@ -492,7 +492,7 @@ class BuildExtTestCase(TempdirManager, + # format the target value as defined in the Apple + # Availability Macros. We can't use the macro names since + # at least one value we test with will not exist yet. +- if target[1] < 10: ++ if target[:2] < (10, 10): + # for 10.1 through 10.9.x -> "10n0" + target = '%02d%01d0' % target + else: +diff --git a/Lib/test/test_bytes.py b/Lib/test/test_bytes.py +index bbd45c7529..35e97863c0 100644 +--- a/Lib/test/test_bytes.py ++++ b/Lib/test/test_bytes.py +@@ -963,6 +963,7 @@ class BytesTest(BaseBytesTest, unittest.TestCase): + c_char_p) + + PyBytes_FromFormat = pythonapi.PyBytes_FromFormat ++ PyBytes_FromFormat.argtypes = (c_char_p,) + PyBytes_FromFormat.restype = py_object + + # basic tests +diff --git a/Lib/test/test_platform.py b/Lib/test/test_platform.py +index 3084663a8f..b998f10a39 100644 +--- a/Lib/test/test_platform.py ++++ b/Lib/test/test_platform.py +@@ -217,7 +217,7 @@ class PlatformTest(unittest.TestCase): + self.assertEqual(res[1], ('', '', '')) + + if sys.byteorder == 'little': +- self.assertIn(res[2], ('i386', 'x86_64')) ++ self.assertIn(res[2], ('i386', 'x86_64', 'arm64')) + else: + self.assertEqual(res[2], 'PowerPC') + +diff --git a/Lib/test/test_unicode.py b/Lib/test/test_unicode.py +index 1d6aabdbbc..d97180d298 100644 +--- a/Lib/test/test_unicode.py ++++ b/Lib/test/test_unicode.py +@@ -2454,11 +2454,13 @@ class CAPITest(unittest.TestCase): + def test_from_format(self): + support.import_module('ctypes') + from ctypes import ( ++ c_char_p, + pythonapi, py_object, sizeof, + c_int, c_long, c_longlong, c_ssize_t, + c_uint, c_ulong, c_ulonglong, c_size_t, c_void_p) + name = "PyUnicode_FromFormat" + _PyUnicode_FromFormat = getattr(pythonapi, name) ++ _PyUnicode_FromFormat.argtypes = (c_char_p,) + _PyUnicode_FromFormat.restype = py_object + + def PyUnicode_FromFormat(format, *args): +diff --git a/Mac/BuildScript/build-installer.py b/Mac/BuildScript/build-installer.py +index a58b922ce3..56fc20390c 100755 +--- a/Mac/BuildScript/build-installer.py ++++ b/Mac/BuildScript/build-installer.py +@@ -116,7 +116,8 @@ WORKDIR = "/tmp/_py" + DEPSRC = os.path.join(WORKDIR, 'third-party') + DEPSRC = os.path.expanduser('~/Universal/other-sources') + +-universal_opts_map = { '32-bit': ('i386', 'ppc',), ++universal_opts_map = { 'universal2': ('arm64', 'x86_64'), ++ '32-bit': ('i386', 'ppc',), + '64-bit': ('x86_64', 'ppc64',), + 'intel': ('i386', 'x86_64'), + 'intel-32': ('i386',), +@@ -124,6 +125,7 @@ universal_opts_map = { '32-bit': ('i386', 'ppc',), + '3-way': ('ppc', 'i386', 'x86_64'), + 'all': ('i386', 'ppc', 'x86_64', 'ppc64',) } + default_target_map = { ++ 'universal2': '10.9', + '64-bit': '10.5', + '3-way': '10.5', + 'intel': '10.5', +@@ -148,6 +150,10 @@ SRCDIR = os.path.dirname( + # $MACOSX_DEPLOYMENT_TARGET -> minimum OS X level + DEPTARGET = '10.5' + ++# If true only builds the 3th-party dependencies ++# in $WORKDIR ++DEPS_ONLY=False ++ + def getDeptargetTuple(): + return tuple([int(n) for n in DEPTARGET.split('.')[0:2]]) + +@@ -190,6 +196,27 @@ EXPECTED_SHARED_LIBS = {} + def internalTk(): + return getDeptargetTuple() >= (10, 6) + ++ ++def tweak_tcl_build(basedir, archList): ++ with open("Makefile", "r") as fp: ++ contents = fp.readlines() ++ ++ # For reasons I don't understand the tcl configure script ++ # decides that some stdlib symbols aren't present, before ++ # deciding that strtod is broken. ++ new_contents = [] ++ for line in contents: ++ if line.startswith("COMPAT_OBJS"): ++ # note: the space before strtod.o is intentional, ++ # the detection of a broken strtod results in ++ # "fixstrod.o" on this line. ++ for nm in ("strstr.o", "strtoul.o", " strtod.o"): ++ line = line.replace(nm, "") ++ new_contents.append(line) ++ ++ with open("Makefile", "w") as fp: ++ fp.writelines(new_contents) ++ + # List of names of third party software built with this installer. + # The names will be inserted into the rtf version of the License. + THIRD_PARTY_LIBS = [] +@@ -215,6 +242,9 @@ def library_recipes(): + buildrecipe=build_universal_openssl, + configure=None, + install=None, ++ patches=[ ++ "openssl-mac-arm64.patch", ++ ], + ), + ]) + +@@ -231,6 +261,7 @@ def library_recipes(): + '--libdir=/Library/Frameworks/Python.framework/Versions/%s/lib'%(getVersion(),), + ], + useLDFlags=False, ++ buildrecipe=tweak_tcl_build, + install='make TCL_LIBRARY=%(TCL_LIBRARY)s && make install TCL_LIBRARY=%(TCL_LIBRARY)s DESTDIR=%(DESTDIR)s'%{ + "DESTDIR": shellQuote(os.path.join(WORKDIR, 'libraries')), + "TCL_LIBRARY": shellQuote('/Library/Frameworks/Python.framework/Versions/%s/lib/tcl8.6'%(getVersion())), +@@ -596,7 +627,7 @@ def checkEnvironment(): + ev, os.environ[ev])) + del os.environ[ev] + +- base_path = '/bin:/sbin:/usr/bin:/usr/sbin' ++ base_path = '/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin' + if 'SDK_TOOLS_BIN' in os.environ: + base_path = os.environ['SDK_TOOLS_BIN'] + ':' + base_path + # Xcode 2.5 on OS X 10.4 does not include SetFile in its usr/bin; +@@ -618,6 +649,7 @@ def parseOptions(args=None): + global UNIVERSALOPTS, UNIVERSALARCHS, ARCHLIST, CC, CXX + global FW_VERSION_PREFIX + global FW_SSL_DIRECTORY ++ global DEPS_ONLY + + if args is None: + args = sys.argv[1:] +@@ -625,7 +657,7 @@ def parseOptions(args=None): + try: + options, args = getopt.getopt(args, '?hb', + [ 'build-dir=', 'third-party=', 'sdk-path=' , 'src-dir=', +- 'dep-target=', 'universal-archs=', 'help' ]) ++ 'dep-target=', 'universal-archs=', 'deps-only', 'help' ]) + except getopt.GetoptError: + print(sys.exc_info()[1]) + sys.exit(1) +@@ -646,6 +678,9 @@ def parseOptions(args=None): + elif k in ('--third-party',): + DEPSRC=v + ++ elif k in ('--deps-only',): ++ DEPS_ONLY=True ++ + elif k in ('--sdk-path',): + print(" WARNING: --sdk-path is no longer supported") + +@@ -691,6 +726,8 @@ def parseOptions(args=None): + print(" -- Building a Python %s framework at patch level %s" + % (getVersion(), getFullVersion())) + print("") ++ if DEPS_ONLY: ++ print("Stopping after building third-party libraries") + + def extractArchive(builddir, archiveName): + """ +@@ -801,6 +838,7 @@ def build_universal_openssl(basedir, archList): + arch_opts = { + "i386": ["darwin-i386-cc"], + "x86_64": ["darwin64-x86_64-cc", "enable-ec_nistp_64_gcc_128"], ++ "arm64": ["darwin64-arm64-cc" ], + "ppc": ["darwin-ppc-cc"], + "ppc64": ["darwin64-ppc-cc"], + } +@@ -1656,6 +1694,9 @@ def main(): + # Then build third-party libraries such as sleepycat DB4. + buildLibraries() + ++ if DEPS_ONLY: ++ sys.exit(1) ++ + # Now build python itself + buildPython() + +diff --git a/Mac/BuildScript/openssl-mac-arm64.patch b/Mac/BuildScript/openssl-mac-arm64.patch +new file mode 100644 +index 0000000000..11267fb118 +--- /dev/null ++++ b/Mac/BuildScript/openssl-mac-arm64.patch +@@ -0,0 +1,41 @@ ++diff -ur openssl-1.1.1g-orig/Configurations/10-main.conf openssl-1.1.1g/Configurations/10-main.conf ++--- openssl-1.1.1g-orig/Configurations/10-main.conf 2020-04-21 14:22:39.000000000 +0200 +++++ openssl-1.1.1g/Configurations/10-main.conf 2020-07-26 12:21:32.000000000 +0200 ++@@ -1557,6 +1557,14 @@ ++ bn_ops => "SIXTY_FOUR_BIT_LONG", ++ perlasm_scheme => "macosx", ++ }, +++ "darwin64-arm64-cc" => { +++ inherit_from => [ "darwin-common", asm("aarch64_asm") ], +++ CFLAGS => add("-Wall"), +++ cflags => add("-arch arm64"), +++ lib_cppflags => add("-DL_ENDIAN"), +++ bn_ops => "SIXTY_FOUR_BIT_LONG", +++ perlasm_scheme => "ios64", +++ }, ++ ++ ##### GNU Hurd ++ "hurd-x86" => { ++diff -ur openssl-1.1.1g-orig/config openssl-1.1.1g/config ++--- openssl-1.1.1g-orig/config 2020-04-21 14:22:39.000000000 +0200 +++++ openssl-1.1.1g/config 2020-07-26 12:21:59.000000000 +0200 ++@@ -255,6 +255,9 @@ ++ ;; ++ x86_64) ++ echo "x86_64-apple-darwin${VERSION}" +++ ;; +++ arm64) +++ echo "arm64-apple-darwin${VERSION}" ++ ;; ++ *) ++ echo "i686-apple-darwin${VERSION}" ++@@ -497,6 +500,9 @@ ++ else ++ OUT="darwin64-x86_64-cc" ++ fi ;; +++ x86_64-apple-darwin*) +++ OUT="darwin64-arm64-cc" +++ ;; ++ armv6+7-*-iphoneos) ++ __CNF_CFLAGS="$__CNF_CFLAGS -arch armv6 -arch armv7" ++ __CNF_CXXFLAGS="$__CNF_CXXFLAGS -arch armv6 -arch armv7" +diff --git a/Mac/Tools/pythonw.c b/Mac/Tools/pythonw.c +index c8bd3ba8d6..78813e818e 100644 +--- a/Mac/Tools/pythonw.c ++++ b/Mac/Tools/pythonw.c +@@ -95,9 +95,6 @@ setup_spawnattr(posix_spawnattr_t* spawnattr) + size_t count; + cpu_type_t cpu_types[1]; + short flags = 0; +-#ifdef __LP64__ +- int ch; +-#endif + + if ((errno = posix_spawnattr_init(spawnattr)) != 0) { + err(2, "posix_spawnattr_int"); +@@ -119,10 +116,16 @@ setup_spawnattr(posix_spawnattr_t* spawnattr) + + #elif defined(__ppc__) + cpu_types[0] = CPU_TYPE_POWERPC; ++ + #elif defined(__i386__) + cpu_types[0] = CPU_TYPE_X86; ++ ++#elif defined(__arm64__) ++ cpu_types[0] = CPU_TYPE_ARM64; ++ + #else + # error "Unknown CPU" ++ + #endif + + if (posix_spawnattr_setbinpref_np(spawnattr, count, +@@ -220,7 +223,8 @@ main(int argc, char **argv) { + /* We're weak-linking to posix-spawnv to ensure that + * an executable build on 10.5 can work on 10.4. + */ +- if (posix_spawn != NULL) { ++ ++ if (&posix_spawn != NULL) { + posix_spawnattr_t spawnattr = NULL; + + setup_spawnattr(&spawnattr); +diff --git a/Modules/_ctypes/callbacks.c b/Modules/_ctypes/callbacks.c +index 2a364d6c80..15230ba9bb 100644 +--- a/Modules/_ctypes/callbacks.c ++++ b/Modules/_ctypes/callbacks.c +@@ -1,6 +1,8 @@ + #include "Python.h" + #include "frameobject.h" + ++#include ++ + #include + #ifdef MS_WIN32 + #include +@@ -18,7 +20,7 @@ CThunkObject_dealloc(PyObject *myself) + Py_XDECREF(self->callable); + Py_XDECREF(self->restype); + if (self->pcl_write) +- ffi_closure_free(self->pcl_write); ++ Py_ffi_closure_free(self->pcl_write); + PyObject_GC_Del(self); + } + +@@ -361,8 +363,7 @@ CThunkObject *_ctypes_alloc_callback(PyObject *callable, + + assert(CThunk_CheckExact((PyObject *)p)); + +- p->pcl_write = ffi_closure_alloc(sizeof(ffi_closure), +- &p->pcl_exec); ++ p->pcl_write = Py_ffi_closure_alloc(sizeof(ffi_closure), &p->pcl_exec); + if (p->pcl_write == NULL) { + PyErr_NoMemory(); + goto error; +@@ -408,13 +409,35 @@ CThunkObject *_ctypes_alloc_callback(PyObject *callable, + "ffi_prep_cif failed with %d", result); + goto error; + } +-#if defined(X86_DARWIN) || defined(POWERPC_DARWIN) +- result = ffi_prep_closure(p->pcl_write, &p->cif, closure_fcn, p); ++#if HAVE_FFI_PREP_CLOSURE_LOC ++# if USING_APPLE_OS_LIBFFI ++# define HAVE_FFI_PREP_CLOSURE_LOC_RUNTIME __builtin_available(macos 10.15, ios 13, watchos 6, tvos 13, *) ++# else ++# define HAVE_FFI_PREP_CLOSURE_LOC_RUNTIME true ++# endif ++ if (HAVE_FFI_PREP_CLOSURE_LOC_RUNTIME) { ++ result = ffi_prep_closure_loc(p->pcl_write, &p->cif, closure_fcn, ++ p, ++ p->pcl_exec); ++ } else ++#endif ++ { ++#if USING_APPLE_OS_LIBFFI && defined(__arm64__) ++ PyErr_Format(PyExc_NotImplementedError, "ffi_prep_closure_loc() is missing"); ++ goto error; + #else +- result = ffi_prep_closure_loc(p->pcl_write, &p->cif, closure_fcn, +- p, +- p->pcl_exec); ++#ifdef MACOSX ++ #pragma clang diagnostic push ++ #pragma clang diagnostic ignored "-Wdeprecated-declarations" + #endif ++ result = ffi_prep_closure(p->pcl_write, &p->cif, closure_fcn, p); ++ ++#ifdef MACOSX ++ #pragma clang diagnostic pop ++#endif ++ ++#endif ++ } + if (result != FFI_OK) { + PyErr_Format(PyExc_RuntimeError, + "ffi_prep_closure failed with %d", result); +diff --git a/Modules/_ctypes/callproc.c b/Modules/_ctypes/callproc.c +index a9b8675cd9..9bfca631bb 100644 +--- a/Modules/_ctypes/callproc.c ++++ b/Modules/_ctypes/callproc.c +@@ -57,6 +57,8 @@ + #include "Python.h" + #include "structmember.h" + ++#include ++ + #ifdef MS_WIN32 + #include + #include +@@ -64,6 +66,18 @@ + #include "ctypes_dlfcn.h" + #endif + ++#ifdef __APPLE__ ++/* ++ * The API to query if a shared library is in the shared cache is ++ * private for now, this should change in beta 4. ++ * ++ * TODO: ++ * - Switch to that API ++ * - Add feature macro and runtime guards (as with the ffi.*loc API's) ++ */ ++extern bool _dyld_shared_cache_contains_path(const char* path) __attribute__((weak_import)); ++#endif ++ + #ifdef MS_WIN32 + #include + #endif +@@ -813,7 +827,8 @@ static int _call_function_pointer(int flags, + ffi_type **atypes, + ffi_type *restype, + void *resmem, +- int argcount) ++ int argcount, ++ int argtypecount) + { + PyThreadState *_save = NULL; /* For Py_BLOCK_THREADS and Py_UNBLOCK_THREADS */ + PyObject *error_object = NULL; +@@ -836,14 +851,60 @@ static int _call_function_pointer(int flags, + if ((flags & FUNCFLAG_CDECL) == 0) + cc = FFI_STDCALL; + #endif +- if (FFI_OK != ffi_prep_cif(&cif, +- cc, +- argcount, +- restype, +- atypes)) { +- PyErr_SetString(PyExc_RuntimeError, +- "ffi_prep_cif failed"); +- return -1; ++ ++# if USING_APPLE_OS_LIBFFI ++# define HAVE_FFI_PREP_CIF_VAR_RUNTIME __builtin_available(macos 10.15, ios 13, watchos 6, tvos 13, *) ++# elif HAVE_FFI_PREP_CIF_VAR ++# define HAVE_FFI_PREP_CIF_VAR_RUNTIME true ++# else ++# define HAVE_FFI_PREP_CIF_VAR_RUNTIME false ++# endif ++ ++ /* Even on Apple-arm64 the calling convention for variadic functions conincides ++ * with the standard calling convention in the case that the function called ++ * only with its fixed arguments. Thus, we do not need a special flag to be ++ * set on variadic functions. We treat a function as variadic if it is called ++ * with a nonzero number of variadic arguments */ ++ bool is_variadic = (argtypecount != 0 && argcount > argtypecount); ++ (void) is_variadic; ++ ++#if defined(__APPLE__) && defined(__arm64__) ++ if (is_variadic) { ++ if (HAVE_FFI_PREP_CIF_VAR_RUNTIME) { ++ } else { ++ PyErr_SetString(PyExc_NotImplementedError, "ffi_prep_cif_var() is missing"); ++ return -1; ++ } ++ } ++#endif ++ ++#if HAVE_FFI_PREP_CIF_VAR ++ if (is_variadic) { ++ if (HAVE_FFI_PREP_CIF_VAR_RUNTIME) { ++ if (FFI_OK != ffi_prep_cif_var(&cif, ++ cc, ++ argtypecount, ++ argcount, ++ restype, ++ atypes)) { ++ PyErr_SetString(PyExc_RuntimeError, ++ "ffi_prep_cif_var failed"); ++ return -1; ++ } ++ } ++ } else ++#endif ++ ++ { ++ if (FFI_OK != ffi_prep_cif(&cif, ++ cc, ++ argcount, ++ restype, ++ atypes)) { ++ PyErr_SetString(PyExc_RuntimeError, ++ "ffi_prep_cif failed"); ++ return -1; ++ } + } + + if (flags & (FUNCFLAG_USE_ERRNO | FUNCFLAG_USE_LASTERROR)) { +@@ -1213,9 +1274,8 @@ PyObject *_ctypes_callproc(PPROC pProc, + + if (-1 == _call_function_pointer(flags, pProc, avalues, atypes, + rtype, resbuf, +- Py_SAFE_DOWNCAST(argcount, +- Py_ssize_t, +- int))) ++ Py_SAFE_DOWNCAST(argcount, Py_ssize_t, int), ++ Py_SAFE_DOWNCAST(argtype_count, Py_ssize_t, int))) + goto cleanup; + + #ifdef WORDS_BIGENDIAN +@@ -1399,6 +1459,37 @@ copy_com_pointer(PyObject *self, PyObject *args) + } + #else + ++#ifdef __APPLE__ ++ static PyObject *py_dyld_shared_cache_contains_path(PyObject *self, PyObject *args) ++ { ++ PyObject *name, *name2; ++ char *name_str; ++ ++ if (_dyld_shared_cache_contains_path == NULL) { ++ PyErr_SetString(PyExc_NotImplementedError, "_dyld_shared_cache_contains_path symbol is missing"); ++ return NULL; ++ } ++ ++ if (!PyArg_ParseTuple(args, "O", &name)) ++ return NULL; ++ ++ if (name == Py_None) ++ Py_RETURN_FALSE; ++ ++ if (PyUnicode_FSConverter(name, &name2) == 0) ++ return NULL; ++ if (PyBytes_Check(name2)) ++ name_str = PyBytes_AS_STRING(name2); ++ else ++ name_str = PyByteArray_AS_STRING(name2); ++ ++ if(_dyld_shared_cache_contains_path(name_str)) ++ Py_RETURN_TRUE; ++ else ++ Py_RETURN_FALSE; ++ } ++ #endif ++ + static PyObject *py_dl_open(PyObject *self, PyObject *args) + { + PyObject *name, *name2; +@@ -1889,6 +1980,8 @@ buffer_info(PyObject *self, PyObject *arg) + return Py_BuildValue("siN", dict->format, dict->ndim, shape); + } + ++ ++ + PyMethodDef _ctypes_module_methods[] = { + {"get_errno", get_errno, METH_NOARGS}, + {"set_errno", set_errno, METH_VARARGS}, +@@ -1910,6 +2003,9 @@ PyMethodDef _ctypes_module_methods[] = { + "dlopen(name, flag={RTLD_GLOBAL|RTLD_LOCAL}) open a shared library"}, + {"dlclose", py_dl_close, METH_VARARGS, "dlclose a library"}, + {"dlsym", py_dl_sym, METH_VARARGS, "find symbol in shared library"}, ++#endif ++#ifdef __APPLE__ ++ {"_dyld_shared_cache_contains_path", py_dyld_shared_cache_contains_path, METH_VARARGS, "check if path is in the shared cache"}, + #endif + {"alignment", align_func, METH_O, alignment_doc}, + {"sizeof", sizeof_func, METH_O, sizeof_doc}, +diff --git a/Modules/_ctypes/ctypes.h b/Modules/_ctypes/ctypes.h +index e58f85233c..0bed85e318 100644 +--- a/Modules/_ctypes/ctypes.h ++++ b/Modules/_ctypes/ctypes.h +@@ -366,6 +366,14 @@ PyObject *_ctypes_get_errobj(int **pspace); + extern PyObject *ComError; + #endif + ++#if USING_MALLOC_CLOSURE_DOT_C ++void Py_ffi_closure_free(void *p); ++void *Py_ffi_closure_alloc(size_t size, void** codeloc); ++#else ++#define Py_ffi_closure_free ffi_closure_free ++#define Py_ffi_closure_alloc ffi_closure_alloc ++#endif ++ + /* + Local Variables: + compile-command: "python setup.py -q build install --home ~" +diff --git a/Modules/_ctypes/malloc_closure.c b/Modules/_ctypes/malloc_closure.c +index f9cdb33695..4f220e42ff 100644 +--- a/Modules/_ctypes/malloc_closure.c ++++ b/Modules/_ctypes/malloc_closure.c +@@ -89,16 +89,27 @@ static void more_core(void) + /******************************************************************/ + + /* put the item back into the free list */ +-void ffi_closure_free(void *p) ++void Py_ffi_closure_free(void *p) + { ++#if USING_APPLE_OS_LIBFFI && HAVE_FFI_CLOSURE_ALLOC ++ if (__builtin_available(macos 10.15, ios 13, watchos 6, tvos 13, *)) { ++ ffi_closure_free(p); ++ return; ++ } ++#endif + ITEM *item = (ITEM *)p; + item->next = free_list; + free_list = item; + } + + /* return one item from the free list, allocating more if needed */ +-void *ffi_closure_alloc(size_t ignored, void** codeloc) ++void *Py_ffi_closure_alloc(size_t size, void** codeloc) + { ++#if USING_APPLE_OS_LIBFFI && HAVE_FFI_CLOSURE_ALLOC ++ if (__builtin_available(macos 10.15, ios 13, watchos 6, tvos 13, *)) { ++ return ffi_closure_alloc(size, codeloc); ++ } ++#endif + ITEM *item; + if (!free_list) + more_core(); +diff --git a/configure b/configure +index f3979f16be..adf471180e 100755 +--- a/configure ++++ b/configure +@@ -6919,7 +6919,7 @@ fi + + + +-# The -arch flags for universal builds on OSX ++# The -arch flags for universal builds on macOS + UNIVERSAL_ARCH_FLAGS= + + +@@ -7405,6 +7405,11 @@ $as_echo "$CC" >&6; } + LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386" + ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc" + ;; ++ universal2) ++ UNIVERSAL_ARCH_FLAGS="-arch arm64 -arch x86_64" ++ LIPO_32BIT_FLAGS="" ++ ARCH_RUN_32BIT="true" ++ ;; + intel) + UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64" + LIPO_32BIT_FLAGS="-extract i386" +@@ -7426,7 +7431,7 @@ $as_echo "$CC" >&6; } + ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc" + ;; + *) +- as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5 ++ as_fn_error $? "proper usage is --with-universal-arch=universal2|32-bit|64-bit|all|intel|3-way" "$LINENO" 5 + ;; + esac + +@@ -9255,7 +9260,7 @@ fi + MACOSX_DEFAULT_ARCH="ppc" + ;; + *) +- as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5 ++ as_fn_error $? "Unexpected output of 'arch' on macOS" "$LINENO" 5 + ;; + esac + else +@@ -9265,9 +9270,12 @@ fi + ;; + ppc) + MACOSX_DEFAULT_ARCH="ppc64" ++ ;; ++ arm64) ++ MACOSX_DEFAULT_ARCH="arm64" + ;; + *) +- as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5 ++ as_fn_error $? "Unexpected output of 'arch' on macOS" "$LINENO" 5 + ;; + esac + +diff --git a/configure.ac b/configure.ac +index 7c688668c1..269a462dcf 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -1564,7 +1564,7 @@ AC_SUBST(BASECFLAGS) + AC_SUBST(CFLAGS_NODIST) + AC_SUBST(LDFLAGS_NODIST) + +-# The -arch flags for universal builds on OSX ++# The -arch flags for universal builds on macOS + UNIVERSAL_ARCH_FLAGS= + AC_SUBST(UNIVERSAL_ARCH_FLAGS) + +@@ -1845,6 +1845,11 @@ yes) + LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386" + ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc" + ;; ++ universal2) ++ UNIVERSAL_ARCH_FLAGS="-arch arm64 -arch x86_64" ++ LIPO_32BIT_FLAGS="" ++ ARCH_RUN_32BIT="true" ++ ;; + intel) + UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64" + LIPO_32BIT_FLAGS="-extract i386" +@@ -1866,7 +1871,7 @@ yes) + ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc" + ;; + *) +- AC_MSG_ERROR([proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way]) ++ AC_MSG_ERROR([proper usage is --with-universal-arch=universal2|32-bit|64-bit|all|intel|3-way]) + ;; + esac + +@@ -2433,7 +2438,7 @@ case $ac_sys_system/$ac_sys_release in + MACOSX_DEFAULT_ARCH="ppc" + ;; + *) +- AC_MSG_ERROR([Unexpected output of 'arch' on OSX]) ++ AC_MSG_ERROR([Unexpected output of 'arch' on macOS]) + ;; + esac + else +@@ -2443,9 +2448,12 @@ case $ac_sys_system/$ac_sys_release in + ;; + ppc) + MACOSX_DEFAULT_ARCH="ppc64" ++ ;; ++ arm64) ++ MACOSX_DEFAULT_ARCH="arm64" + ;; + *) +- AC_MSG_ERROR([Unexpected output of 'arch' on OSX]) ++ AC_MSG_ERROR([Unexpected output of 'arch' on macOS]) + ;; + esac + +diff --git a/setup.py b/setup.py +index 59d412da8f..0ed9c03d57 100644 +--- a/setup.py ++++ b/setup.py +@@ -227,6 +227,13 @@ def find_file(filename, std_dirs, paths): + # Not found anywhere + return None + ++def is_macosx_at_least(vers): ++ if MACOS: ++ dep_target = sysconfig.get_config_var('MACOSX_DEPLOYMENT_TARGET') ++ if dep_target: ++ return tuple(map(int, dep_target.split('.'))) >= vers ++ return False ++ + + def find_library_file(compiler, libname, std_dirs, paths): + result = compiler.find_library_file(std_dirs + paths, libname) +@@ -1963,43 +1970,18 @@ class PyBuildExt(build_ext): + library_dirs=added_lib_dirs)) + return True + +- def configure_ctypes_darwin(self, ext): +- # Darwin (OS X) uses preconfigured files, in +- # the Modules/_ctypes/libffi_osx directory. +- ffi_srcdir = os.path.abspath(os.path.join(self.srcdir, 'Modules', +- '_ctypes', 'libffi_osx')) +- sources = [os.path.join(ffi_srcdir, p) +- for p in ['ffi.c', +- 'x86/darwin64.S', +- 'x86/x86-darwin.S', +- 'x86/x86-ffi_darwin.c', +- 'x86/x86-ffi64.c', +- 'powerpc/ppc-darwin.S', +- 'powerpc/ppc-darwin_closure.S', +- 'powerpc/ppc-ffi_darwin.c', +- 'powerpc/ppc64-darwin_closure.S', +- ]] +- +- # Add .S (preprocessed assembly) to C compiler source extensions. +- self.compiler.src_extensions.append('.S') +- +- include_dirs = [os.path.join(ffi_srcdir, 'include'), +- os.path.join(ffi_srcdir, 'powerpc')] +- ext.include_dirs.extend(include_dirs) +- ext.sources.extend(sources) +- return True +- + def configure_ctypes(self, ext): +- if not self.use_system_libffi: +- if MACOS: +- return self.configure_ctypes_darwin(ext) +- print('INFO: Could not locate ffi libs and/or headers') +- return False + return True + + def detect_ctypes(self): + # Thomas Heller's _ctypes module +- self.use_system_libffi = False ++ ++ if (not sysconfig.get_config_var("LIBFFI_INCLUDEDIR") and MACOS and ++ (is_macosx_at_least((10,15)) or '-arch arm64' in sysconfig.get_config_var("CFLAGS"))): ++ self.use_system_libffi = True ++ else: ++ self.use_system_libffi = '--with-system-ffi' in sysconfig.get_config_var("CONFIG_ARGS") ++ + include_dirs = [] + extra_compile_args = [] + extra_link_args = [] +@@ -2012,11 +1994,10 @@ class PyBuildExt(build_ext): + + if MACOS: + sources.append('_ctypes/malloc_closure.c') +- sources.append('_ctypes/darwin/dlfcn_simple.c') ++ extra_compile_args.append('-DUSING_MALLOC_CLOSURE_DOT_C=1') ++ #sources.append('_ctypes/darwin/dlfcn_simple.c') + extra_compile_args.append('-DMACOSX') + include_dirs.append('_ctypes/darwin') +- # XXX Is this still needed? +- # extra_link_args.extend(['-read_only_relocs', 'warning']) + + elif HOST_PLATFORM == 'sunos5': + # XXX This shouldn't be necessary; it appears that some +@@ -2046,31 +2027,48 @@ class PyBuildExt(build_ext): + sources=['_ctypes/_ctypes_test.c'], + libraries=['m'])) + ++ ffi_inc = sysconfig.get_config_var("LIBFFI_INCLUDEDIR") ++ ffi_lib = None ++ + ffi_inc_dirs = self.inc_dirs.copy() + if MACOS: +- if '--with-system-ffi' not in sysconfig.get_config_var("CONFIG_ARGS"): +- return +- # OS X 10.5 comes with libffi.dylib; the include files are +- # in /usr/include/ffi +- ffi_inc_dirs.append('/usr/include/ffi') +- +- ffi_inc = [sysconfig.get_config_var("LIBFFI_INCLUDEDIR")] +- if not ffi_inc or ffi_inc[0] == '': +- ffi_inc = find_file('ffi.h', [], ffi_inc_dirs) +- if ffi_inc is not None: +- ffi_h = ffi_inc[0] + '/ffi.h' ++ # XXX: The define should only be added when actually using the system ++ # version (and not a locally compiled one) ++ ext.extra_compile_args.append("-DUSING_APPLE_OS_LIBFFI=1") ++ ffi_in_sdk = os.path.join(macosx_sdk_root(), "usr/include/ffi") ++ if os.path.exists(ffi_in_sdk): ++ ffi_inc = ffi_in_sdk ++ ffi_lib = 'ffi' ++ else: ++ # OS X 10.5 comes with libffi.dylib; the include files are ++ # in /usr/include/ffi ++ ffi_inc_dirs.append('/usr/include/ffi') ++ ++ if not ffi_inc: ++ found = find_file('ffi.h', [], ffi_inc_dirs) ++ if found: ++ ffi_inc = found[0] ++ if ffi_inc: ++ ffi_h = ffi_inc + '/ffi.h' + if not os.path.exists(ffi_h): + ffi_inc = None + print('Header file {} does not exist'.format(ffi_h)) +- ffi_lib = None +- if ffi_inc is not None: ++ if ffi_lib is None and ffi_inc: + for lib_name in ('ffi', 'ffi_pic'): + if (self.compiler.find_library_file(self.lib_dirs, lib_name)): + ffi_lib = lib_name + break + + if ffi_inc and ffi_lib: +- ext.include_dirs.extend(ffi_inc) ++ ffi_headers = glob(os.path.join(ffi_inc, '*.h')) ++ if grep_headers_for('ffi_prep_cif_var', ffi_headers): ++ ext.extra_compile_args.append("-DHAVE_FFI_PREP_CIF_VAR=1") ++ if grep_headers_for('ffi_prep_closure_loc', ffi_headers): ++ ext.extra_compile_args.append("-DHAVE_FFI_PREP_CLOSURE_LOC=1") ++ if grep_headers_for('ffi_closure_alloc', ffi_headers): ++ ext.extra_compile_args.append("-DHAVE_FFI_CLOSURE_ALLOC=1") ++ ++ ext.include_dirs.append(ffi_inc) + ext.libraries.append(ffi_lib) + self.use_system_libffi = True + From 7a062ec204164f27c9dd03632f9343f5ba9789f9 Mon Sep 17 00:00:00 2001 From: Isuru Fernando Date: Wed, 19 Aug 2020 14:35:58 -0500 Subject: [PATCH 18/29] patch only for arm64 --- recipe/meta.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index e2ea38990..8f03ecddb 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -48,7 +48,7 @@ source: - patches/gh21114.patch - patches/gh21241.patch - patches/gh21228.patch - - patches/gh21564.patch + - patches/gh21564.patch # [osx and arm64] # TODO :: Depend on our own packages for these: - url: https://github.com/python/cpython-source-deps/archive/xz-5.2.2.zip # [win] From ccf173bfd33502b528dc2de708d763389d5b26d9 Mon Sep 17 00:00:00 2001 From: Isuru Fernando Date: Wed, 19 Aug 2020 21:23:49 -0500 Subject: [PATCH 19/29] move script_env up --- recipe/meta.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 1bc094fab..a591bc81d 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -83,6 +83,9 @@ source: build: number: 3 + script_env: + - PY_INTERP_LINKAGE_NATURE + - PY_INTERP_DEBUG outputs: - name: python @@ -133,9 +136,6 @@ outputs: - python weak: - python_abi 3.8.* *_cp38 - script_env: - - PY_INTERP_LINKAGE_NATURE - - PY_INTERP_DEBUG # Not until: https://github.com/mingwandroid/conda-build/commit/c68a7d100866df7a3e9c0e3177fc7ef0ff76def9 # {% if 'conda-forge' not in channel_targets %} # - CONDA_FORGE=yes From b3fb2ad5cd1380559151d79a8a0a13746959218f Mon Sep 17 00:00:00 2001 From: Isuru Fernando Date: Wed, 19 Aug 2020 21:41:47 -0500 Subject: [PATCH 20/29] Fix patch --- recipe/patches/gh21564.patch | 174 ++++++----------------------------- 1 file changed, 26 insertions(+), 148 deletions(-) diff --git a/recipe/patches/gh21564.patch b/recipe/patches/gh21564.patch index e0c0c8ead..311a18105 100644 --- a/recipe/patches/gh21564.patch +++ b/recipe/patches/gh21564.patch @@ -1,12 +1,3 @@ -commit 14e426fd4f205e491b4c61a6d4ca6253704fc5eb -Author: Jonathan Helmus -Date: Fri Aug 7 15:43:14 2020 -0500 - - port PR 21564 to 3.8.5 - - Apply changes from https://github.com/python/cpython/pull/21564 - to the Python 3.8.5 source code - diff --git a/Lib/_osx_support.py b/Lib/_osx_support.py index e9efce7d7e..8ed1eeac85 100644 --- a/Lib/_osx_support.py @@ -21,7 +12,7 @@ index e9efce7d7e..8ed1eeac85 100644 machine = 'fat' elif archs == ('i386', 'x86_64'): diff --git a/Lib/ctypes/macholib/dyld.py b/Lib/ctypes/macholib/dyld.py -index 9ab447c0a1..2a8c7f009b 100644 +index bf0e8e8dee..d230b23da9 100644 --- a/Lib/ctypes/macholib/dyld.py +++ b/Lib/ctypes/macholib/dyld.py @@ -6,6 +6,11 @@ import os @@ -34,57 +25,8 @@ index 9ab447c0a1..2a8c7f009b 100644 + def _dyld_shared_cache_contains_path(*args): + raise NotImplementedError - __all__ = [ - 'dyld_find', 'framework_find', -@@ -126,8 +131,15 @@ def dyld_find(name, executable_path=None, env=None): - dyld_executable_path_search(name, executable_path), - dyld_default_search(name, env), - ), env): -+ - if os.path.isfile(path): - return path -+ try: -+ if _dyld_shared_cache_contains_path(path): -+ return path -+ except NotImplementedError: -+ pass -+ - raise ValueError("dylib %s could not be found" % (name,)) - - def framework_find(fn, executable_path=None, env=None): -diff --git a/Lib/ctypes/test/test_macholib.py b/Lib/ctypes/test/test_macholib.py -index 6b3526951a..a1bac26a7d 100644 ---- a/Lib/ctypes/test/test_macholib.py -+++ b/Lib/ctypes/test/test_macholib.py -@@ -45,19 +45,22 @@ def find_lib(name): - class MachOTest(unittest.TestCase): - @unittest.skipUnless(sys.platform == "darwin", 'OSX-specific test') - def test_find(self): -- -- self.assertEqual(find_lib('pthread'), -- '/usr/lib/libSystem.B.dylib') -+ # On Mac OS 11, system dylibs are only present in the shared cache, -+ # so symlinks like libpthread.dylib -> libSystem.B.dylib will not -+ # be resolved by dyld_find -+ self.assertIn(find_lib('pthread'), -+ ('/usr/lib/libSystem.B.dylib', '/usr/lib/libpthread.dylib')) - - result = find_lib('z') - # Issue #21093: dyld default search path includes $HOME/lib and - # /usr/local/lib before /usr/lib, which caused test failures if - # a local copy of libz exists in one of them. Now ignore the head - # of the path. -- self.assertRegex(result, r".*/lib/libz\..*.*\.dylib") -+ self.assertRegex(result, r".*/lib/libz.*\.dylib") - -- self.assertEqual(find_lib('IOKit'), -- '/System/Library/Frameworks/IOKit.framework/Versions/A/IOKit') -+ self.assertIn(find_lib('IOKit'), -+ ('/System/Library/Frameworks/IOKit.framework/Versions/A/IOKit', -+ '/System/Library/Frameworks/IOKit.framework/IOKit')) - - if __name__ == "__main__": - unittest.main() + try: + from _ctypes import _dyld_shared_cache_contains_path diff --git a/Lib/distutils/tests/test_build_ext.py b/Lib/distutils/tests/test_build_ext.py index 5e47e0773a..5a32e03980 100644 --- a/Lib/distutils/tests/test_build_ext.py @@ -283,55 +225,8 @@ index a58b922ce3..56fc20390c 100755 # Now build python itself buildPython() -diff --git a/Mac/BuildScript/openssl-mac-arm64.patch b/Mac/BuildScript/openssl-mac-arm64.patch -new file mode 100644 -index 0000000000..11267fb118 ---- /dev/null -+++ b/Mac/BuildScript/openssl-mac-arm64.patch -@@ -0,0 +1,41 @@ -+diff -ur openssl-1.1.1g-orig/Configurations/10-main.conf openssl-1.1.1g/Configurations/10-main.conf -+--- openssl-1.1.1g-orig/Configurations/10-main.conf 2020-04-21 14:22:39.000000000 +0200 -++++ openssl-1.1.1g/Configurations/10-main.conf 2020-07-26 12:21:32.000000000 +0200 -+@@ -1557,6 +1557,14 @@ -+ bn_ops => "SIXTY_FOUR_BIT_LONG", -+ perlasm_scheme => "macosx", -+ }, -++ "darwin64-arm64-cc" => { -++ inherit_from => [ "darwin-common", asm("aarch64_asm") ], -++ CFLAGS => add("-Wall"), -++ cflags => add("-arch arm64"), -++ lib_cppflags => add("-DL_ENDIAN"), -++ bn_ops => "SIXTY_FOUR_BIT_LONG", -++ perlasm_scheme => "ios64", -++ }, -+ -+ ##### GNU Hurd -+ "hurd-x86" => { -+diff -ur openssl-1.1.1g-orig/config openssl-1.1.1g/config -+--- openssl-1.1.1g-orig/config 2020-04-21 14:22:39.000000000 +0200 -++++ openssl-1.1.1g/config 2020-07-26 12:21:59.000000000 +0200 -+@@ -255,6 +255,9 @@ -+ ;; -+ x86_64) -+ echo "x86_64-apple-darwin${VERSION}" -++ ;; -++ arm64) -++ echo "arm64-apple-darwin${VERSION}" -+ ;; -+ *) -+ echo "i686-apple-darwin${VERSION}" -+@@ -497,6 +500,9 @@ -+ else -+ OUT="darwin64-x86_64-cc" -+ fi ;; -++ x86_64-apple-darwin*) -++ OUT="darwin64-arm64-cc" -++ ;; -+ armv6+7-*-iphoneos) -+ __CNF_CFLAGS="$__CNF_CFLAGS -arch armv6 -arch armv7" -+ __CNF_CXXFLAGS="$__CNF_CXXFLAGS -arch armv6 -arch armv7" diff --git a/Mac/Tools/pythonw.c b/Mac/Tools/pythonw.c -index c8bd3ba8d6..78813e818e 100644 +index ae4c262129..78813e818e 100644 --- a/Mac/Tools/pythonw.c +++ b/Mac/Tools/pythonw.c @@ -95,9 +95,6 @@ setup_spawnattr(posix_spawnattr_t* spawnattr) @@ -344,24 +239,7 @@ index c8bd3ba8d6..78813e818e 100644 if ((errno = posix_spawnattr_init(spawnattr)) != 0) { err(2, "posix_spawnattr_int"); -@@ -119,10 +116,16 @@ setup_spawnattr(posix_spawnattr_t* spawnattr) - - #elif defined(__ppc__) - cpu_types[0] = CPU_TYPE_POWERPC; -+ - #elif defined(__i386__) - cpu_types[0] = CPU_TYPE_X86; -+ -+#elif defined(__arm64__) -+ cpu_types[0] = CPU_TYPE_ARM64; -+ - #else - # error "Unknown CPU" -+ - #endif - - if (posix_spawnattr_setbinpref_np(spawnattr, count, -@@ -220,7 +223,8 @@ main(int argc, char **argv) { +@@ -226,7 +223,8 @@ main(int argc, char **argv) { /* We're weak-linking to posix-spawnv to ensure that * an executable build on 10.5 can work on 10.4. */ @@ -445,7 +323,7 @@ index 2a364d6c80..15230ba9bb 100644 PyErr_Format(PyExc_RuntimeError, "ffi_prep_closure failed with %d", result); diff --git a/Modules/_ctypes/callproc.c b/Modules/_ctypes/callproc.c -index a9b8675cd9..9bfca631bb 100644 +index 4a296c8b84..498b7fed67 100644 --- a/Modules/_ctypes/callproc.c +++ b/Modules/_ctypes/callproc.c @@ -57,6 +57,8 @@ @@ -457,8 +335,8 @@ index a9b8675cd9..9bfca631bb 100644 #ifdef MS_WIN32 #include #include -@@ -64,6 +66,18 @@ - #include "ctypes_dlfcn.h" +@@ -68,6 +70,18 @@ + #include #endif +#ifdef __APPLE__ @@ -476,7 +354,7 @@ index a9b8675cd9..9bfca631bb 100644 #ifdef MS_WIN32 #include #endif -@@ -813,7 +827,8 @@ static int _call_function_pointer(int flags, +@@ -817,7 +831,8 @@ static int _call_function_pointer(int flags, ffi_type **atypes, ffi_type *restype, void *resmem, @@ -486,7 +364,7 @@ index a9b8675cd9..9bfca631bb 100644 { PyThreadState *_save = NULL; /* For Py_BLOCK_THREADS and Py_UNBLOCK_THREADS */ PyObject *error_object = NULL; -@@ -836,14 +851,60 @@ static int _call_function_pointer(int flags, +@@ -840,14 +855,60 @@ static int _call_function_pointer(int flags, if ((flags & FUNCFLAG_CDECL) == 0) cc = FFI_STDCALL; #endif @@ -555,7 +433,7 @@ index a9b8675cd9..9bfca631bb 100644 } if (flags & (FUNCFLAG_USE_ERRNO | FUNCFLAG_USE_LASTERROR)) { -@@ -1213,9 +1274,8 @@ PyObject *_ctypes_callproc(PPROC pProc, +@@ -1217,9 +1278,8 @@ PyObject *_ctypes_callproc(PPROC pProc, if (-1 == _call_function_pointer(flags, pProc, avalues, atypes, rtype, resbuf, @@ -567,9 +445,9 @@ index a9b8675cd9..9bfca631bb 100644 goto cleanup; #ifdef WORDS_BIGENDIAN -@@ -1399,6 +1459,37 @@ copy_com_pointer(PyObject *self, PyObject *args) +@@ -1433,6 +1493,37 @@ static PyObject *py_dyld_shared_cache_contains_path(PyObject *self, PyObject *ar } - #else + #endif +#ifdef __APPLE__ + static PyObject *py_dyld_shared_cache_contains_path(PyObject *self, PyObject *args) @@ -605,7 +483,7 @@ index a9b8675cd9..9bfca631bb 100644 static PyObject *py_dl_open(PyObject *self, PyObject *args) { PyObject *name, *name2; -@@ -1889,6 +1980,8 @@ buffer_info(PyObject *self, PyObject *arg) +@@ -1923,6 +2014,8 @@ buffer_info(PyObject *self, PyObject *arg) return Py_BuildValue("siN", dict->format, dict->ndim, shape); } @@ -614,16 +492,16 @@ index a9b8675cd9..9bfca631bb 100644 PyMethodDef _ctypes_module_methods[] = { {"get_errno", get_errno, METH_NOARGS}, {"set_errno", set_errno, METH_VARARGS}, -@@ -1910,6 +2003,9 @@ PyMethodDef _ctypes_module_methods[] = { - "dlopen(name, flag={RTLD_GLOBAL|RTLD_LOCAL}) open a shared library"}, +@@ -1945,6 +2038,9 @@ PyMethodDef _ctypes_module_methods[] = { {"dlclose", py_dl_close, METH_VARARGS, "dlclose a library"}, {"dlsym", py_dl_sym, METH_VARARGS, "find symbol in shared library"}, -+#endif + #endif +#ifdef __APPLE__ + {"_dyld_shared_cache_contains_path", py_dyld_shared_cache_contains_path, METH_VARARGS, "check if path is in the shared cache"}, ++#endif + #if __APPLE__ && HAVE_DYLD_SHARED_CACHE_CONTAINS_PATH + {"_dyld_shared_cache_contains_path", py_dyld_shared_cache_contains_path, METH_VARARGS, "check if path is in the shared cache"}, #endif - {"alignment", align_func, METH_O, alignment_doc}, - {"sizeof", sizeof_func, METH_O, sizeof_doc}, diff --git a/Modules/_ctypes/ctypes.h b/Modules/_ctypes/ctypes.h index e58f85233c..0bed85e318 100644 --- a/Modules/_ctypes/ctypes.h @@ -678,10 +556,10 @@ index f9cdb33695..4f220e42ff 100644 if (!free_list) more_core(); diff --git a/configure b/configure -index f3979f16be..adf471180e 100755 +index 23e81243ef..465bd6de17 100755 --- a/configure +++ b/configure -@@ -6919,7 +6919,7 @@ fi +@@ -6922,7 +6922,7 @@ fi @@ -690,7 +568,7 @@ index f3979f16be..adf471180e 100755 UNIVERSAL_ARCH_FLAGS= -@@ -7405,6 +7405,11 @@ $as_echo "$CC" >&6; } +@@ -7408,6 +7408,11 @@ $as_echo "$CC" >&6; } LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386" ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc" ;; @@ -702,7 +580,7 @@ index f3979f16be..adf471180e 100755 intel) UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64" LIPO_32BIT_FLAGS="-extract i386" -@@ -7426,7 +7431,7 @@ $as_echo "$CC" >&6; } +@@ -7429,7 +7434,7 @@ $as_echo "$CC" >&6; } ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc" ;; *) @@ -711,7 +589,7 @@ index f3979f16be..adf471180e 100755 ;; esac -@@ -9255,7 +9260,7 @@ fi +@@ -9258,7 +9263,7 @@ fi MACOSX_DEFAULT_ARCH="ppc" ;; *) @@ -720,7 +598,7 @@ index f3979f16be..adf471180e 100755 ;; esac else -@@ -9265,9 +9270,12 @@ fi +@@ -9268,9 +9273,12 @@ fi ;; ppc) MACOSX_DEFAULT_ARCH="ppc64" @@ -735,7 +613,7 @@ index f3979f16be..adf471180e 100755 esac diff --git a/configure.ac b/configure.ac -index 7c688668c1..269a462dcf 100644 +index 99deb8c0f7..32856826fd 100644 --- a/configure.ac +++ b/configure.ac @@ -1564,7 +1564,7 @@ AC_SUBST(BASECFLAGS) From b5f49fe7d0ba821cc4c987bd9c63ec9616b68a82 Mon Sep 17 00:00:00 2001 From: Isuru Fernando Date: Wed, 19 Aug 2020 21:42:09 -0500 Subject: [PATCH 21/29] Add libtool --- recipe/meta.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index a591bc81d..0ca0e289d 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -160,6 +160,7 @@ outputs: - posix # [win] - ld_impl_{{ target_platform }} >=2.34 # [linux] - binutils_impl_{{ target_platform }} >=2.34 # [linux] + - libtool # [unix] host: - bzip2 # [not win] - sqlite From 7f392d7526b17d296c1e43020590ac903867b3db Mon Sep 17 00:00:00 2001 From: Isuru Fernando Date: Wed, 19 Aug 2020 22:07:46 -0500 Subject: [PATCH 22/29] update patch --- recipe/patches/gh21564.patch | 161 +++++++++++++++++++++++++++++------ 1 file changed, 135 insertions(+), 26 deletions(-) diff --git a/recipe/patches/gh21564.patch b/recipe/patches/gh21564.patch index 311a18105..6c65f9514 100644 --- a/recipe/patches/gh21564.patch +++ b/recipe/patches/gh21564.patch @@ -12,21 +12,63 @@ index e9efce7d7e..8ed1eeac85 100644 machine = 'fat' elif archs == ('i386', 'x86_64'): diff --git a/Lib/ctypes/macholib/dyld.py b/Lib/ctypes/macholib/dyld.py -index bf0e8e8dee..d230b23da9 100644 +index bf0e8e8dee..cd8abff681 100644 --- a/Lib/ctypes/macholib/dyld.py +++ b/Lib/ctypes/macholib/dyld.py -@@ -6,6 +6,11 @@ import os +@@ -6,12 +6,11 @@ import os from ctypes.macholib.framework import framework_info from ctypes.macholib.dylib import dylib_info from itertools import * -+try: +- + try: +- from _ctypes import _dyld_shared_cache_contains_path + from _ctypes import _dyld_shared_cache_contains_path -+except ImportError: + except ImportError: +- def _dyld_shared_cache_contains_path(*args): +- raise NotImplementedError + def _dyld_shared_cache_contains_path(*args): + raise NotImplementedError - try: - from _ctypes import _dyld_shared_cache_contains_path + __all__ = [ + 'dyld_find', 'framework_find', +@@ -132,6 +131,7 @@ def dyld_find(name, executable_path=None, env=None): + dyld_executable_path_search(name, executable_path), + dyld_default_search(name, env), + ), env): ++ + if os.path.isfile(path): + return path + try: +diff --git a/Lib/ctypes/test/test_macholib.py b/Lib/ctypes/test/test_macholib.py +index ed04479abd..a1bac26a7d 100644 +--- a/Lib/ctypes/test/test_macholib.py ++++ b/Lib/ctypes/test/test_macholib.py +@@ -45,13 +45,11 @@ def find_lib(name): + class MachOTest(unittest.TestCase): + @unittest.skipUnless(sys.platform == "darwin", 'OSX-specific test') + def test_find(self): +- + # On Mac OS 11, system dylibs are only present in the shared cache, + # so symlinks like libpthread.dylib -> libSystem.B.dylib will not + # be resolved by dyld_find +- + self.assertIn(find_lib('pthread'), +- ('/usr/lib/libSystem.B.dylib', '/usr/lib/libpthread.dylib')) ++ ('/usr/lib/libSystem.B.dylib', '/usr/lib/libpthread.dylib')) + + result = find_lib('z') + # Issue #21093: dyld default search path includes $HOME/lib and +@@ -61,8 +59,8 @@ class MachOTest(unittest.TestCase): + self.assertRegex(result, r".*/lib/libz.*\.dylib") + + self.assertIn(find_lib('IOKit'), +- ('/System/Library/Frameworks/IOKit.framework/Versions/A/IOKit', +- '/System/Library/Frameworks/IOKit.framework/IOKit')) ++ ('/System/Library/Frameworks/IOKit.framework/Versions/A/IOKit', ++ '/System/Library/Frameworks/IOKit.framework/IOKit')) + + if __name__ == "__main__": + unittest.main() diff --git a/Lib/distutils/tests/test_build_ext.py b/Lib/distutils/tests/test_build_ext.py index 5e47e0773a..5a32e03980 100644 --- a/Lib/distutils/tests/test_build_ext.py @@ -323,22 +365,26 @@ index 2a364d6c80..15230ba9bb 100644 PyErr_Format(PyExc_RuntimeError, "ffi_prep_closure failed with %d", result); diff --git a/Modules/_ctypes/callproc.c b/Modules/_ctypes/callproc.c -index 4a296c8b84..498b7fed67 100644 +index 4a296c8b84..2b1a762e7d 100644 --- a/Modules/_ctypes/callproc.c +++ b/Modules/_ctypes/callproc.c -@@ -57,6 +57,8 @@ +@@ -57,6 +57,10 @@ #include "Python.h" #include "structmember.h" ++#include ++ +#include + #ifdef MS_WIN32 #include #include -@@ -68,6 +70,18 @@ - #include +@@ -64,8 +68,16 @@ + #include "ctypes_dlfcn.h" #endif +-#if __APPLE__ && HAVE_DYLD_SHARED_CACHE_CONTAINS_PATH +-#include +#ifdef __APPLE__ +/* + * The API to query if a shared library is in the shared cache is @@ -349,12 +395,10 @@ index 4a296c8b84..498b7fed67 100644 + * - Add feature macro and runtime guards (as with the ffi.*loc API's) + */ +extern bool _dyld_shared_cache_contains_path(const char* path) __attribute__((weak_import)); -+#endif -+ - #ifdef MS_WIN32 - #include #endif -@@ -817,7 +831,8 @@ static int _call_function_pointer(int flags, + + #ifdef MS_WIN32 +@@ -817,7 +829,8 @@ static int _call_function_pointer(int flags, ffi_type **atypes, ffi_type *restype, void *resmem, @@ -364,7 +408,7 @@ index 4a296c8b84..498b7fed67 100644 { PyThreadState *_save = NULL; /* For Py_BLOCK_THREADS and Py_UNBLOCK_THREADS */ PyObject *error_object = NULL; -@@ -840,14 +855,60 @@ static int _call_function_pointer(int flags, +@@ -840,14 +853,60 @@ static int _call_function_pointer(int flags, if ((flags & FUNCFLAG_CDECL) == 0) cc = FFI_STDCALL; #endif @@ -433,7 +477,7 @@ index 4a296c8b84..498b7fed67 100644 } if (flags & (FUNCFLAG_USE_ERRNO | FUNCFLAG_USE_LASTERROR)) { -@@ -1217,9 +1278,8 @@ PyObject *_ctypes_callproc(PPROC pProc, +@@ -1217,9 +1276,8 @@ PyObject *_ctypes_callproc(PPROC pProc, if (-1 == _call_function_pointer(flags, pProc, avalues, atypes, rtype, resbuf, @@ -445,10 +489,20 @@ index 4a296c8b84..498b7fed67 100644 goto cleanup; #ifdef WORDS_BIGENDIAN -@@ -1433,6 +1493,37 @@ static PyObject *py_dyld_shared_cache_contains_path(PyObject *self, PyObject *ar +@@ -1403,6 +1461,7 @@ copy_com_pointer(PyObject *self, PyObject *args) + } + #else + ++<<<<<<< HEAD + #if __APPLE__ && HAVE_DYLD_SHARED_CACHE_CONTAINS_PATH + static PyObject *py_dyld_shared_cache_contains_path(PyObject *self, PyObject *args) + { +@@ -1433,6 +1492,39 @@ static PyObject *py_dyld_shared_cache_contains_path(PyObject *self, PyObject *ar } #endif ++======= ++>>>>>>> 8e3b4548f3... Merge ctypes changes from Apple (PR 21241) +#ifdef __APPLE__ + static PyObject *py_dyld_shared_cache_contains_path(PyObject *self, PyObject *args) + { @@ -483,7 +537,7 @@ index 4a296c8b84..498b7fed67 100644 static PyObject *py_dl_open(PyObject *self, PyObject *args) { PyObject *name, *name2; -@@ -1923,6 +2014,8 @@ buffer_info(PyObject *self, PyObject *arg) +@@ -1923,6 +2015,8 @@ buffer_info(PyObject *self, PyObject *arg) return Py_BuildValue("siN", dict->format, dict->ndim, shape); } @@ -492,16 +546,22 @@ index 4a296c8b84..498b7fed67 100644 PyMethodDef _ctypes_module_methods[] = { {"get_errno", get_errno, METH_NOARGS}, {"set_errno", set_errno, METH_VARARGS}, -@@ -1945,6 +2038,9 @@ PyMethodDef _ctypes_module_methods[] = { +@@ -1945,9 +2039,15 @@ PyMethodDef _ctypes_module_methods[] = { {"dlclose", py_dl_close, METH_VARARGS, "dlclose a library"}, {"dlsym", py_dl_sym, METH_VARARGS, "find symbol in shared library"}, #endif +#ifdef __APPLE__ + {"_dyld_shared_cache_contains_path", py_dyld_shared_cache_contains_path, METH_VARARGS, "check if path is in the shared cache"}, +#endif ++<<<<<<< HEAD #if __APPLE__ && HAVE_DYLD_SHARED_CACHE_CONTAINS_PATH {"_dyld_shared_cache_contains_path", py_dyld_shared_cache_contains_path, METH_VARARGS, "check if path is in the shared cache"}, #endif ++======= ++>>>>>>> 8e3b4548f3... Merge ctypes changes from Apple (PR 21241) + {"alignment", align_func, METH_O, alignment_doc}, + {"sizeof", sizeof_func, METH_O, sizeof_doc}, + {"byref", byref, METH_VARARGS, byref_doc}, diff --git a/Modules/_ctypes/ctypes.h b/Modules/_ctypes/ctypes.h index e58f85233c..0bed85e318 100644 --- a/Modules/_ctypes/ctypes.h @@ -670,10 +730,60 @@ index 99deb8c0f7..32856826fd 100644 esac diff --git a/setup.py b/setup.py -index 59d412da8f..0ed9c03d57 100644 +index 59d412da8f..b4569e54c3 100644 --- a/setup.py +++ b/setup.py -@@ -227,6 +227,13 @@ def find_file(filename, std_dirs, paths): +@@ -179,6 +179,35 @@ def macosx_sdk_root(): + return MACOS_SDK_ROOT + + ++def macosx_sdk_specified(): ++ """Returns true if an SDK was explicitly configured. ++ ++ True if an SDK was selected at configure time, either by specifying ++ --enable-universalsdk=(something other than no or /) or by adding a ++ -isysroot option to CFLAGS. In some cases, like when making ++ decisions about macOS Tk framework paths, we need to be able to ++ know whether the user explicitly asked to build with an SDK versus ++ the implicit use of an SDK when header files are no longer ++ installed on a running system by the Command Line Tools. ++ """ ++ global MACOS_SDK_SPECIFIED ++ ++ # If already called, return cached result. ++ if MACOS_SDK_SPECIFIED: ++ return MACOS_SDK_SPECIFIED ++ ++ # Find the sdk root and set MACOS_SDK_SPECIFIED ++ macosx_sdk_root() ++ return MACOS_SDK_SPECIFIED ++ ++def is_macosx_at_least(vers): ++ if MACOS: ++ dep_target = sysconfig.get_config_var('MACOSX_DEPLOYMENT_TARGET') ++ if dep_target: ++ return tuple(map(int, dep_target.split('.'))) >= vers ++ return False ++ ++ + def is_macosx_sdk_path(path): + """ + Returns True if 'path' can be located in an OSX SDK +@@ -188,6 +217,13 @@ def is_macosx_sdk_path(path): + or path.startswith('/Library/') ) + + ++def grep_headers_for(function, headers): ++ for header in headers: ++ with open(header, 'r') as f: ++ if function in f.read(): ++ return True ++ return False ++ + def find_file(filename, std_dirs, paths): + """Searches for the directory where a given file is located, + and returns a possibly-empty list of additional directories, or None +@@ -227,6 +263,13 @@ def find_file(filename, std_dirs, paths): # Not found anywhere return None @@ -687,7 +797,7 @@ index 59d412da8f..0ed9c03d57 100644 def find_library_file(compiler, libname, std_dirs, paths): result = compiler.find_library_file(std_dirs + paths, libname) -@@ -1963,43 +1970,18 @@ class PyBuildExt(build_ext): +@@ -1963,43 +2006,18 @@ class PyBuildExt(build_ext): library_dirs=added_lib_dirs)) return True @@ -738,7 +848,7 @@ index 59d412da8f..0ed9c03d57 100644 include_dirs = [] extra_compile_args = [] extra_link_args = [] -@@ -2012,11 +1994,10 @@ class PyBuildExt(build_ext): +@@ -2012,11 +2030,10 @@ class PyBuildExt(build_ext): if MACOS: sources.append('_ctypes/malloc_closure.c') @@ -752,7 +862,7 @@ index 59d412da8f..0ed9c03d57 100644 elif HOST_PLATFORM == 'sunos5': # XXX This shouldn't be necessary; it appears that some -@@ -2046,31 +2027,48 @@ class PyBuildExt(build_ext): +@@ -2046,31 +2063,47 @@ class PyBuildExt(build_ext): sources=['_ctypes/_ctypes_test.c'], libraries=['m'])) @@ -810,7 +920,6 @@ index 59d412da8f..0ed9c03d57 100644 + ext.extra_compile_args.append("-DHAVE_FFI_PREP_CLOSURE_LOC=1") + if grep_headers_for('ffi_closure_alloc', ffi_headers): + ext.extra_compile_args.append("-DHAVE_FFI_CLOSURE_ALLOC=1") -+ + ext.include_dirs.append(ffi_inc) ext.libraries.append(ffi_lib) self.use_system_libffi = True From 784353ad53386d31074a8f5e54ade4e0de6f101f Mon Sep 17 00:00:00 2001 From: Isuru Fernando Date: Wed, 19 Aug 2020 22:25:24 -0500 Subject: [PATCH 23/29] Update patch --- recipe/patches/gh21564.patch | 90 ++++++------------------------------ 1 file changed, 15 insertions(+), 75 deletions(-) diff --git a/recipe/patches/gh21564.patch b/recipe/patches/gh21564.patch index 6c65f9514..f30d91a30 100644 --- a/recipe/patches/gh21564.patch +++ b/recipe/patches/gh21564.patch @@ -12,63 +12,21 @@ index e9efce7d7e..8ed1eeac85 100644 machine = 'fat' elif archs == ('i386', 'x86_64'): diff --git a/Lib/ctypes/macholib/dyld.py b/Lib/ctypes/macholib/dyld.py -index bf0e8e8dee..cd8abff681 100644 +index bf0e8e8dee..d230b23da9 100644 --- a/Lib/ctypes/macholib/dyld.py +++ b/Lib/ctypes/macholib/dyld.py -@@ -6,12 +6,11 @@ import os +@@ -6,6 +6,11 @@ import os from ctypes.macholib.framework import framework_info from ctypes.macholib.dylib import dylib_info from itertools import * -- - try: -- from _ctypes import _dyld_shared_cache_contains_path ++try: + from _ctypes import _dyld_shared_cache_contains_path - except ImportError: -- def _dyld_shared_cache_contains_path(*args): -- raise NotImplementedError ++except ImportError: + def _dyld_shared_cache_contains_path(*args): + raise NotImplementedError - __all__ = [ - 'dyld_find', 'framework_find', -@@ -132,6 +131,7 @@ def dyld_find(name, executable_path=None, env=None): - dyld_executable_path_search(name, executable_path), - dyld_default_search(name, env), - ), env): -+ - if os.path.isfile(path): - return path - try: -diff --git a/Lib/ctypes/test/test_macholib.py b/Lib/ctypes/test/test_macholib.py -index ed04479abd..a1bac26a7d 100644 ---- a/Lib/ctypes/test/test_macholib.py -+++ b/Lib/ctypes/test/test_macholib.py -@@ -45,13 +45,11 @@ def find_lib(name): - class MachOTest(unittest.TestCase): - @unittest.skipUnless(sys.platform == "darwin", 'OSX-specific test') - def test_find(self): -- - # On Mac OS 11, system dylibs are only present in the shared cache, - # so symlinks like libpthread.dylib -> libSystem.B.dylib will not - # be resolved by dyld_find -- - self.assertIn(find_lib('pthread'), -- ('/usr/lib/libSystem.B.dylib', '/usr/lib/libpthread.dylib')) -+ ('/usr/lib/libSystem.B.dylib', '/usr/lib/libpthread.dylib')) - - result = find_lib('z') - # Issue #21093: dyld default search path includes $HOME/lib and -@@ -61,8 +59,8 @@ class MachOTest(unittest.TestCase): - self.assertRegex(result, r".*/lib/libz.*\.dylib") - - self.assertIn(find_lib('IOKit'), -- ('/System/Library/Frameworks/IOKit.framework/Versions/A/IOKit', -- '/System/Library/Frameworks/IOKit.framework/IOKit')) -+ ('/System/Library/Frameworks/IOKit.framework/Versions/A/IOKit', -+ '/System/Library/Frameworks/IOKit.framework/IOKit')) - - if __name__ == "__main__": - unittest.main() + try: + from _ctypes import _dyld_shared_cache_contains_path diff --git a/Lib/distutils/tests/test_build_ext.py b/Lib/distutils/tests/test_build_ext.py index 5e47e0773a..5a32e03980 100644 --- a/Lib/distutils/tests/test_build_ext.py @@ -365,21 +323,19 @@ index 2a364d6c80..15230ba9bb 100644 PyErr_Format(PyExc_RuntimeError, "ffi_prep_closure failed with %d", result); diff --git a/Modules/_ctypes/callproc.c b/Modules/_ctypes/callproc.c -index 4a296c8b84..2b1a762e7d 100644 +index 4a296c8b84..20b7adc8bf 100644 --- a/Modules/_ctypes/callproc.c +++ b/Modules/_ctypes/callproc.c -@@ -57,6 +57,10 @@ +@@ -57,6 +57,8 @@ #include "Python.h" #include "structmember.h" -+#include -+ +#include + #ifdef MS_WIN32 #include #include -@@ -64,8 +68,16 @@ +@@ -64,8 +66,16 @@ #include "ctypes_dlfcn.h" #endif @@ -398,7 +354,7 @@ index 4a296c8b84..2b1a762e7d 100644 #endif #ifdef MS_WIN32 -@@ -817,7 +829,8 @@ static int _call_function_pointer(int flags, +@@ -817,7 +827,8 @@ static int _call_function_pointer(int flags, ffi_type **atypes, ffi_type *restype, void *resmem, @@ -408,7 +364,7 @@ index 4a296c8b84..2b1a762e7d 100644 { PyThreadState *_save = NULL; /* For Py_BLOCK_THREADS and Py_UNBLOCK_THREADS */ PyObject *error_object = NULL; -@@ -840,14 +853,60 @@ static int _call_function_pointer(int flags, +@@ -840,14 +851,60 @@ static int _call_function_pointer(int flags, if ((flags & FUNCFLAG_CDECL) == 0) cc = FFI_STDCALL; #endif @@ -477,7 +433,7 @@ index 4a296c8b84..2b1a762e7d 100644 } if (flags & (FUNCFLAG_USE_ERRNO | FUNCFLAG_USE_LASTERROR)) { -@@ -1217,9 +1276,8 @@ PyObject *_ctypes_callproc(PPROC pProc, +@@ -1217,9 +1274,8 @@ PyObject *_ctypes_callproc(PPROC pProc, if (-1 == _call_function_pointer(flags, pProc, avalues, atypes, rtype, resbuf, @@ -489,20 +445,10 @@ index 4a296c8b84..2b1a762e7d 100644 goto cleanup; #ifdef WORDS_BIGENDIAN -@@ -1403,6 +1461,7 @@ copy_com_pointer(PyObject *self, PyObject *args) - } - #else - -+<<<<<<< HEAD - #if __APPLE__ && HAVE_DYLD_SHARED_CACHE_CONTAINS_PATH - static PyObject *py_dyld_shared_cache_contains_path(PyObject *self, PyObject *args) - { -@@ -1433,6 +1492,39 @@ static PyObject *py_dyld_shared_cache_contains_path(PyObject *self, PyObject *ar +@@ -1433,6 +1489,37 @@ static PyObject *py_dyld_shared_cache_contains_path(PyObject *self, PyObject *ar } #endif -+======= -+>>>>>>> 8e3b4548f3... Merge ctypes changes from Apple (PR 21241) +#ifdef __APPLE__ + static PyObject *py_dyld_shared_cache_contains_path(PyObject *self, PyObject *args) + { @@ -537,7 +483,7 @@ index 4a296c8b84..2b1a762e7d 100644 static PyObject *py_dl_open(PyObject *self, PyObject *args) { PyObject *name, *name2; -@@ -1923,6 +2015,8 @@ buffer_info(PyObject *self, PyObject *arg) +@@ -1923,6 +2010,8 @@ buffer_info(PyObject *self, PyObject *arg) return Py_BuildValue("siN", dict->format, dict->ndim, shape); } @@ -546,22 +492,16 @@ index 4a296c8b84..2b1a762e7d 100644 PyMethodDef _ctypes_module_methods[] = { {"get_errno", get_errno, METH_NOARGS}, {"set_errno", set_errno, METH_VARARGS}, -@@ -1945,9 +2039,15 @@ PyMethodDef _ctypes_module_methods[] = { +@@ -1945,6 +2034,9 @@ PyMethodDef _ctypes_module_methods[] = { {"dlclose", py_dl_close, METH_VARARGS, "dlclose a library"}, {"dlsym", py_dl_sym, METH_VARARGS, "find symbol in shared library"}, #endif +#ifdef __APPLE__ + {"_dyld_shared_cache_contains_path", py_dyld_shared_cache_contains_path, METH_VARARGS, "check if path is in the shared cache"}, +#endif -+<<<<<<< HEAD #if __APPLE__ && HAVE_DYLD_SHARED_CACHE_CONTAINS_PATH {"_dyld_shared_cache_contains_path", py_dyld_shared_cache_contains_path, METH_VARARGS, "check if path is in the shared cache"}, #endif -+======= -+>>>>>>> 8e3b4548f3... Merge ctypes changes from Apple (PR 21241) - {"alignment", align_func, METH_O, alignment_doc}, - {"sizeof", sizeof_func, METH_O, sizeof_doc}, - {"byref", byref, METH_VARARGS, byref_doc}, diff --git a/Modules/_ctypes/ctypes.h b/Modules/_ctypes/ctypes.h index e58f85233c..0bed85e318 100644 --- a/Modules/_ctypes/ctypes.h From a5d51061d04adeaa6655726b77fff1c7e15cc419 Mon Sep 17 00:00:00 2001 From: Isuru Fernando Date: Wed, 19 Aug 2020 22:52:58 -0500 Subject: [PATCH 24/29] Update patch --- recipe/patches/gh21564.patch | 49 ++++++++++++++++++++++++++++-------- 1 file changed, 39 insertions(+), 10 deletions(-) diff --git a/recipe/patches/gh21564.patch b/recipe/patches/gh21564.patch index f30d91a30..49a8fec96 100644 --- a/recipe/patches/gh21564.patch +++ b/recipe/patches/gh21564.patch @@ -323,7 +323,7 @@ index 2a364d6c80..15230ba9bb 100644 PyErr_Format(PyExc_RuntimeError, "ffi_prep_closure failed with %d", result); diff --git a/Modules/_ctypes/callproc.c b/Modules/_ctypes/callproc.c -index 4a296c8b84..20b7adc8bf 100644 +index 4a296c8b84..9bfca631bb 100644 --- a/Modules/_ctypes/callproc.c +++ b/Modules/_ctypes/callproc.c @@ -57,6 +57,8 @@ @@ -445,10 +445,39 @@ index 4a296c8b84..20b7adc8bf 100644 goto cleanup; #ifdef WORDS_BIGENDIAN -@@ -1433,6 +1489,37 @@ static PyObject *py_dyld_shared_cache_contains_path(PyObject *self, PyObject *ar +@@ -1403,35 +1459,36 @@ copy_com_pointer(PyObject *self, PyObject *args) } - #endif + #else +-#if __APPLE__ && HAVE_DYLD_SHARED_CACHE_CONTAINS_PATH +-static PyObject *py_dyld_shared_cache_contains_path(PyObject *self, PyObject *args) +-{ +- if (__builtin_available(macos 11, ios 14, watchos 7, tvos 14, *)) { +- PyObject *name, *name2; +- char *name_str; +- if (!PyArg_ParseTuple(args, "O", &name)) +- return NULL; +- +- if (name == Py_None) +- Py_RETURN_FALSE; +- +- if (PyUnicode_FSConverter(name, &name2) == 0) +- return NULL; +- if (PyBytes_Check(name2)) +- name_str = PyBytes_AS_STRING(name2); +- else +- name_str = PyByteArray_AS_STRING(name2); +- +- if(_dyld_shared_cache_contains_path(name_str)) +- Py_RETURN_TRUE; +- else +- Py_RETURN_FALSE; +- } else { +- PyErr_SetString(PyExc_NotImplementedError, "_dyld_shared_cache_contains_path symbol is missing"); +- return NULL; +- } +-} +-#endif +#ifdef __APPLE__ + static PyObject *py_dyld_shared_cache_contains_path(PyObject *self, PyObject *args) + { @@ -479,11 +508,10 @@ index 4a296c8b84..20b7adc8bf 100644 + Py_RETURN_FALSE; + } + #endif -+ + static PyObject *py_dl_open(PyObject *self, PyObject *args) { - PyObject *name, *name2; -@@ -1923,6 +2010,8 @@ buffer_info(PyObject *self, PyObject *arg) +@@ -1923,6 +1980,8 @@ buffer_info(PyObject *self, PyObject *arg) return Py_BuildValue("siN", dict->format, dict->ndim, shape); } @@ -492,16 +520,17 @@ index 4a296c8b84..20b7adc8bf 100644 PyMethodDef _ctypes_module_methods[] = { {"get_errno", get_errno, METH_NOARGS}, {"set_errno", set_errno, METH_VARARGS}, -@@ -1945,6 +2034,9 @@ PyMethodDef _ctypes_module_methods[] = { +@@ -1945,8 +2004,8 @@ PyMethodDef _ctypes_module_methods[] = { {"dlclose", py_dl_close, METH_VARARGS, "dlclose a library"}, {"dlsym", py_dl_sym, METH_VARARGS, "find symbol in shared library"}, #endif +-#if __APPLE__ && HAVE_DYLD_SHARED_CACHE_CONTAINS_PATH +- {"_dyld_shared_cache_contains_path", py_dyld_shared_cache_contains_path, METH_VARARGS, "check if path is in the shared cache"}, +#ifdef __APPLE__ + {"_dyld_shared_cache_contains_path", py_dyld_shared_cache_contains_path, METH_VARARGS, "check if path is in the shared cache"}, -+#endif - #if __APPLE__ && HAVE_DYLD_SHARED_CACHE_CONTAINS_PATH - {"_dyld_shared_cache_contains_path", py_dyld_shared_cache_contains_path, METH_VARARGS, "check if path is in the shared cache"}, #endif + {"alignment", align_func, METH_O, alignment_doc}, + {"sizeof", sizeof_func, METH_O, sizeof_doc}, diff --git a/Modules/_ctypes/ctypes.h b/Modules/_ctypes/ctypes.h index e58f85233c..0bed85e318 100644 --- a/Modules/_ctypes/ctypes.h From bd87476e5f2073ba6df9883eb00766638e453c1b Mon Sep 17 00:00:00 2001 From: Isuru Fernando Date: Thu, 20 Aug 2020 01:51:44 -0500 Subject: [PATCH 25/29] skip all --- recipe/meta.yaml | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 0ca0e289d..e4724a79c 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -112,23 +112,7 @@ outputs: # match python.org compiler standard skip: True # [win and int(float(vc)) < 14] skip_compile_pyc: - - lib/python3.8/lib2to3/tests/data/bom.py - - lib/python3.8/lib2to3/tests/data/crlf.py - - lib/python3.8/lib2to3/tests/data/different_encoding.py - - lib/python3.8/lib2to3/tests/data/false_encoding.py - - lib/python3.8/lib2to3/tests/data/py2_test_grammar.py - - lib/python3.8/test/bad_coding.py - - lib/python3.8/test/bad_coding2.py - - lib/python3.8/test/badsyntax_3131.py - - lib/python3.8/test/badsyntax_future10.py - - lib/python3.8/test/badsyntax_future3.py - - lib/python3.8/test/badsyntax_future4.py - - lib/python3.8/test/badsyntax_future5.py - - lib/python3.8/test/badsyntax_future6.py - - lib/python3.8/test/badsyntax_future7.py - - lib/python3.8/test/badsyntax_future8.py - - lib/python3.8/test/badsyntax_future9.py - - lib/python3.8/test/badsyntax_pep3120.py + - *.py # Would like to be able to append to the calculated build string here, ping @msarahan, is this possible? string: h{{ PKG_HASH }}_{{ PKG_BUILDNUM }}{{ linkage_nature }}{{ debug }}_cpython run_exports: From 2826466713b7238bf59748825bf7644c001823da Mon Sep 17 00:00:00 2001 From: Isuru Fernando Date: Thu, 20 Aug 2020 01:53:08 -0500 Subject: [PATCH 26/29] add quotes --- recipe/meta.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index e4724a79c..9391245d8 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -112,7 +112,7 @@ outputs: # match python.org compiler standard skip: True # [win and int(float(vc)) < 14] skip_compile_pyc: - - *.py + - '*.py' # Would like to be able to append to the calculated build string here, ping @msarahan, is this possible? string: h{{ PKG_HASH }}_{{ PKG_BUILDNUM }}{{ linkage_nature }}{{ debug }}_cpython run_exports: @@ -155,7 +155,7 @@ outputs: - tk # [not win] - ncurses # [linux] - libffi # [not win] - - ld_impl_{{ target_platform }} >=2.34 # [linux] + #- ld_impl_{{ target_platform }} >=2.34 # [linux] run: - ld_impl_{{ target_platform }} >=2.34 # [linux] run_constrained: From 180e3a16ccd24db50760bcd5195f0653aa4e8c69 Mon Sep 17 00:00:00 2001 From: Isuru Fernando Date: Thu, 20 Aug 2020 02:17:24 -0500 Subject: [PATCH 27/29] add a selector --- recipe/meta.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 9391245d8..b131f1a60 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -112,7 +112,7 @@ outputs: # match python.org compiler standard skip: True # [win and int(float(vc)) < 14] skip_compile_pyc: - - '*.py' + - '*.py' # [osx and arm64] # Would like to be able to append to the calculated build string here, ping @msarahan, is this possible? string: h{{ PKG_HASH }}_{{ PKG_BUILDNUM }}{{ linkage_nature }}{{ debug }}_cpython run_exports: From 7f6ccddf0b0e6119a8519358fef823ba8dc02f0a Mon Sep 17 00:00:00 2001 From: Isuru Fernando Date: Thu, 20 Aug 2020 10:45:26 -0500 Subject: [PATCH 28/29] build string for libpython-static --- recipe/meta.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index b131f1a60..c65e48ac6 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -155,7 +155,7 @@ outputs: - tk # [not win] - ncurses # [linux] - libffi # [not win] - #- ld_impl_{{ target_platform }} >=2.34 # [linux] + - ld_impl_{{ target_platform }} >=2.34 # [linux] run: - ld_impl_{{ target_platform }} >=2.34 # [linux] run_constrained: @@ -221,6 +221,7 @@ outputs: - name: libpython-static build: activate_in_script: True + string: h{{ PKG_HASH }}_{{ PKG_BUILDNUM }}{{ linkage_nature }}{{ debug }}_cpython script: build_static.sh # [unix] script: build_static.bat # [win] requirements: From 7646dec8d18b4a002e2b4a08361fa712344ebe6b Mon Sep 17 00:00:00 2001 From: Isuru Fernando Date: Thu, 20 Aug 2020 13:11:50 -0500 Subject: [PATCH 29/29] MNT: Re-rendered with conda-build 3.19.2, conda-smithy 3.7.10, and conda-forge-pinning 2020.08.17.20.01.55 --- .azure-pipelines/azure-pipelines-linux.yml | 41 ++++ .azure-pipelines/azure-pipelines-osx.yml | 32 +++ .azure-pipelines/azure-pipelines-win.yml | 111 ++++++++++ .ci_support/README | 1 + .../linux_64_target_platformlinux-64.yaml | 58 +++++ ..._aarch64_target_platformlinux-aarch64.yaml | 64 ++++++ ..._ppc64le_target_platformlinux-ppc64le.yaml | 54 +++++ .ci_support/osx_64_target_platformosx-64.yaml | 58 +++++ .../osx_arm64_target_platformosx-arm64.yaml | 58 +++++ .ci_support/win_64_.yaml | 24 +++ .scripts/run_osx_build.sh | 2 +- README.md | 202 ++++++++++++++++++ 12 files changed, 704 insertions(+), 1 deletion(-) create mode 100755 .azure-pipelines/azure-pipelines-linux.yml create mode 100755 .azure-pipelines/azure-pipelines-osx.yml create mode 100755 .azure-pipelines/azure-pipelines-win.yml create mode 100644 .ci_support/README create mode 100644 .ci_support/linux_64_target_platformlinux-64.yaml create mode 100644 .ci_support/linux_aarch64_target_platformlinux-aarch64.yaml create mode 100644 .ci_support/linux_ppc64le_target_platformlinux-ppc64le.yaml create mode 100644 .ci_support/osx_64_target_platformosx-64.yaml create mode 100644 .ci_support/osx_arm64_target_platformosx-arm64.yaml create mode 100644 .ci_support/win_64_.yaml create mode 100644 README.md diff --git a/.azure-pipelines/azure-pipelines-linux.yml b/.azure-pipelines/azure-pipelines-linux.yml new file mode 100755 index 000000000..3f72c4cb6 --- /dev/null +++ b/.azure-pipelines/azure-pipelines-linux.yml @@ -0,0 +1,41 @@ +# This file was generated automatically from conda-smithy. To update this configuration, +# update the conda-forge.yml and/or the recipe/meta.yaml. +# -*- mode: yaml -*- + +jobs: +- job: linux + pool: + vmImage: ubuntu-16.04 + strategy: + matrix: + linux_64_target_platformlinux-64: + CONFIG: linux_64_target_platformlinux-64 + UPLOAD_PACKAGES: 'True' + DOCKER_IMAGE: condaforge/linux-anvil-comp7 + maxParallel: 8 + timeoutInMinutes: 360 + + steps: + - script: | + rm -rf /opt/ghc + df -h + displayName: Manage disk space + + # configure qemu binfmt-misc running. This allows us to run docker containers + # embedded qemu-static + - script: | + docker run --rm --privileged multiarch/qemu-user-static:register --reset --credential yes + ls /proc/sys/fs/binfmt_misc/ + condition: not(startsWith(variables['CONFIG'], 'linux_64')) + displayName: Configure binfmt_misc + + - script: | + export CI=azure + export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME + export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) + .scripts/run_docker_build.sh + displayName: Run docker build + env: + BINSTAR_TOKEN: $(BINSTAR_TOKEN) + FEEDSTOCK_TOKEN: $(FEEDSTOCK_TOKEN) + STAGING_BINSTAR_TOKEN: $(STAGING_BINSTAR_TOKEN) \ No newline at end of file diff --git a/.azure-pipelines/azure-pipelines-osx.yml b/.azure-pipelines/azure-pipelines-osx.yml new file mode 100755 index 000000000..2be27d43f --- /dev/null +++ b/.azure-pipelines/azure-pipelines-osx.yml @@ -0,0 +1,32 @@ +# This file was generated automatically from conda-smithy. To update this configuration, +# update the conda-forge.yml and/or the recipe/meta.yaml. +# -*- mode: yaml -*- + +jobs: +- job: osx + pool: + vmImage: macOS-10.15 + strategy: + matrix: + osx_64_target_platformosx-64: + CONFIG: osx_64_target_platformosx-64 + UPLOAD_PACKAGES: 'True' + osx_arm64_target_platformosx-arm64: + CONFIG: osx_arm64_target_platformosx-arm64 + UPLOAD_PACKAGES: 'True' + maxParallel: 8 + timeoutInMinutes: 360 + + steps: + # TODO: Fast finish on azure pipelines? + - script: | + export CI=azure + export OSX_FORCE_SDK_DOWNLOAD="1" + export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME + export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) + ./.scripts/run_osx_build.sh + displayName: Run OSX build + env: + BINSTAR_TOKEN: $(BINSTAR_TOKEN) + FEEDSTOCK_TOKEN: $(FEEDSTOCK_TOKEN) + STAGING_BINSTAR_TOKEN: $(STAGING_BINSTAR_TOKEN) \ No newline at end of file diff --git a/.azure-pipelines/azure-pipelines-win.yml b/.azure-pipelines/azure-pipelines-win.yml new file mode 100755 index 000000000..ab8cb2ba0 --- /dev/null +++ b/.azure-pipelines/azure-pipelines-win.yml @@ -0,0 +1,111 @@ +# This file was generated automatically from conda-smithy. To update this configuration, +# update the conda-forge.yml and/or the recipe/meta.yaml. +# -*- mode: yaml -*- + +jobs: +- job: win + pool: + vmImage: vs2017-win2016 + strategy: + matrix: + win_64_: + CONFIG: win_64_ + UPLOAD_PACKAGES: 'True' + maxParallel: 4 + timeoutInMinutes: 360 + variables: + CONDA_BLD_PATH: D:\\bld\\ + + steps: + - script: | + choco install vcpython27 -fdv -y --debug + condition: contains(variables['CONFIG'], 'vs2008') + displayName: Install vcpython27.msi (if needed) + + # Cygwin's git breaks conda-build. (See https://github.com/conda-forge/conda-smithy-feedstock/pull/2.) + # - script: rmdir C:\cygwin /s /q + # continueOnError: true + + - powershell: | + Set-PSDebug -Trace 1 + + $batchcontent = @" + ECHO ON + SET vcpython=C:\Program Files (x86)\Common Files\Microsoft\Visual C++ for Python\9.0 + + DIR "%vcpython%" + + CALL "%vcpython%\vcvarsall.bat" %* + "@ + + $batchDir = "C:\Program Files (x86)\Common Files\Microsoft\Visual C++ for Python\9.0\VC" + $batchPath = "$batchDir" + "\vcvarsall.bat" + New-Item -Path $batchPath -ItemType "file" -Force + + Set-Content -Value $batchcontent -Path $batchPath + + Get-ChildItem -Path $batchDir + + Get-ChildItem -Path ($batchDir + '\..') + + condition: contains(variables['CONFIG'], 'vs2008') + displayName: Patch vs2008 (if needed) + + - task: CondaEnvironment@1 + inputs: + packageSpecs: 'python=3.6 conda-build conda conda-forge::conda-forge-ci-setup=3 pip' # Optional + installOptions: "-c conda-forge" + updateConda: true + displayName: Install conda-build and activate environment + + - script: set PYTHONUNBUFFERED=1 + displayName: Set PYTHONUNBUFFERED + + # Configure the VM + - script: | + call activate base + setup_conda_rc .\ ".\recipe" .\.ci_support\%CONFIG%.yaml + displayName: conda-forge CI setup + + # Configure the VM. + - script: | + set "CI=azure" + call activate base + run_conda_forge_build_setup + displayName: conda-forge build setup + + + # Special cased version setting some more things! + - script: | + call activate base + conda.exe build "recipe" -m .ci_support\%CONFIG%.yaml + displayName: Build recipe (vs2008) + env: + VS90COMNTOOLS: "C:\\Program Files (x86)\\Common Files\\Microsoft\\Visual C++ for Python\\9.0\\VC\\bin" + PYTHONUNBUFFERED: 1 + condition: contains(variables['CONFIG'], 'vs2008') + + - script: | + call activate base + conda.exe build "recipe" -m .ci_support\%CONFIG%.yaml + displayName: Build recipe + env: + PYTHONUNBUFFERED: 1 + condition: not(contains(variables['CONFIG'], 'vs2008')) + - script: | + set "FEEDSTOCK_NAME=%BUILD_REPOSITORY_NAME:*/=%" + call activate base + validate_recipe_outputs "%FEEDSTOCK_NAME%" + displayName: Validate Recipe Outputs + + - script: | + set "GIT_BRANCH=%BUILD_SOURCEBRANCHNAME%" + set "FEEDSTOCK_NAME=%BUILD_REPOSITORY_NAME:*/=%" + call activate base + upload_package --validate --feedstock-name="%FEEDSTOCK_NAME%" .\ ".\recipe" .ci_support\%CONFIG%.yaml + displayName: Upload package + env: + BINSTAR_TOKEN: $(BINSTAR_TOKEN) + FEEDSTOCK_TOKEN: $(FEEDSTOCK_TOKEN) + STAGING_BINSTAR_TOKEN: $(STAGING_BINSTAR_TOKEN) + condition: and(succeeded(), not(eq(variables['UPLOAD_PACKAGES'], 'False'))) \ No newline at end of file diff --git a/.ci_support/README b/.ci_support/README new file mode 100644 index 000000000..e4e2dcec9 --- /dev/null +++ b/.ci_support/README @@ -0,0 +1 @@ +This file is automatically generated by conda-smithy. To change any matrix elements, you should change conda-smithy's input conda_build_config.yaml and re-render the recipe, rather than editing these files directly. \ No newline at end of file diff --git a/.ci_support/linux_64_target_platformlinux-64.yaml b/.ci_support/linux_64_target_platformlinux-64.yaml new file mode 100644 index 000000000..de9068a25 --- /dev/null +++ b/.ci_support/linux_64_target_platformlinux-64.yaml @@ -0,0 +1,58 @@ +bzip2: +- '1' +c_compiler: +- gcc +c_compiler_version: +- '7' +channel_sources: +- conda-forge,defaults +channel_targets: +- conda-forge main +cxx_compiler: +- gxx +cxx_compiler_version: +- '7' +docker_image: +- condaforge/linux-anvil-comp7 +libffi: +- '3.2' +ncurses: +- '6.2' +openssl: +- 1.1.1 +pin_run_as_build: + bzip2: + max_pin: x + libffi: + max_pin: x.x + ncurses: + max_pin: x.x + openssl: + max_pin: x.x.x + python: + min_pin: x.x + max_pin: x.x + readline: + max_pin: x + sqlite: + max_pin: x + tk: + max_pin: x.x + xz: + max_pin: x.x + zlib: + max_pin: x.x +python: +- '3.8' +readline: +- '8.0' +sqlite: +- '3' +target_platform: +- linux-64 +tk: +- '8.6' +xz: +- '5.2' +zlib: +- '1.2' diff --git a/.ci_support/linux_aarch64_target_platformlinux-aarch64.yaml b/.ci_support/linux_aarch64_target_platformlinux-aarch64.yaml new file mode 100644 index 000000000..d4e299f41 --- /dev/null +++ b/.ci_support/linux_aarch64_target_platformlinux-aarch64.yaml @@ -0,0 +1,64 @@ +BUILD: +- aarch64-conda_cos7-linux-gnu +bzip2: +- '1' +c_compiler: +- gcc +c_compiler_version: +- '7' +cdt_arch: +- aarch64 +cdt_name: +- cos7 +channel_sources: +- conda-forge +channel_targets: +- conda-forge main +cxx_compiler: +- gxx +cxx_compiler_version: +- '7' +docker_image: +- condaforge/linux-anvil-aarch64 +libffi: +- '3.2' +ncurses: +- '6.2' +openssl: +- 1.1.1 +pin_run_as_build: + bzip2: + max_pin: x + libffi: + max_pin: x.x + ncurses: + max_pin: x.x + openssl: + max_pin: x.x.x + python: + min_pin: x.x + max_pin: x.x + readline: + max_pin: x + sqlite: + max_pin: x + tk: + max_pin: x.x + xz: + max_pin: x.x + zlib: + max_pin: x.x +python: +- '3.8' +readline: +- '8.0' +sqlite: +- '3' +target_platform: +- linux-aarch64 +tk: +- '8.6' +xz: +- '5.2' +zlib: +- '1.2' diff --git a/.ci_support/linux_ppc64le_target_platformlinux-ppc64le.yaml b/.ci_support/linux_ppc64le_target_platformlinux-ppc64le.yaml new file mode 100644 index 000000000..3d1ce2e1d --- /dev/null +++ b/.ci_support/linux_ppc64le_target_platformlinux-ppc64le.yaml @@ -0,0 +1,54 @@ +bzip2: +- '1' +c_compiler: +- gcc +c_compiler_version: +- '8' +channel_sources: +- conda-forge,defaults +channel_targets: +- conda-forge main +cxx_compiler: +- gxx +cxx_compiler_version: +- '8' +docker_image: +- condaforge/linux-anvil-ppc64le +libffi: +- '3.2' +ncurses: +- '6.2' +openssl: +- 1.1.1 +pin_run_as_build: + bzip2: + max_pin: x + libffi: + max_pin: x.x + ncurses: + max_pin: x.x + openssl: + max_pin: x.x.x + python: + min_pin: x.x + max_pin: x.x + readline: + max_pin: x + sqlite: + max_pin: x + xz: + max_pin: x.x + zlib: + max_pin: x.x +python: +- '3.8' +readline: +- '8.0' +sqlite: +- '3' +target_platform: +- linux-ppc64le +xz: +- '5.2' +zlib: +- '1.2' diff --git a/.ci_support/osx_64_target_platformosx-64.yaml b/.ci_support/osx_64_target_platformosx-64.yaml new file mode 100644 index 000000000..3f3ac48e4 --- /dev/null +++ b/.ci_support/osx_64_target_platformosx-64.yaml @@ -0,0 +1,58 @@ +MACOSX_DEPLOYMENT_TARGET: +- '10.9' +bzip2: +- '1' +c_compiler: +- clang +c_compiler_version: +- '10' +channel_sources: +- conda-forge,defaults +channel_targets: +- conda-forge main +cxx_compiler: +- clangxx +cxx_compiler_version: +- '10' +libffi: +- '3.2' +macos_machine: +- x86_64-apple-darwin13.4.0 +macos_min_version: +- '10.9' +openssl: +- 1.1.1 +pin_run_as_build: + bzip2: + max_pin: x + libffi: + max_pin: x.x + openssl: + max_pin: x.x.x + python: + min_pin: x.x + max_pin: x.x + readline: + max_pin: x + sqlite: + max_pin: x + tk: + max_pin: x.x + xz: + max_pin: x.x + zlib: + max_pin: x.x +python: +- '3.8' +readline: +- '8.0' +sqlite: +- '3' +target_platform: +- osx-64 +tk: +- '8.6' +xz: +- '5.2' +zlib: +- '1.2' diff --git a/.ci_support/osx_arm64_target_platformosx-arm64.yaml b/.ci_support/osx_arm64_target_platformosx-arm64.yaml new file mode 100644 index 000000000..655fd1ab4 --- /dev/null +++ b/.ci_support/osx_arm64_target_platformosx-arm64.yaml @@ -0,0 +1,58 @@ +MACOSX_DEPLOYMENT_TARGET: +- '11.0' +bzip2: +- '1' +c_compiler: +- clang +c_compiler_version: +- '11' +channel_sources: +- conda-forge/label/llvm_rc,conda-forge,https://conda-web.anaconda.org/conda-forge +channel_targets: +- conda-forge main +cxx_compiler: +- clangxx +cxx_compiler_version: +- '11' +libffi: +- '3.2' +macos_machine: +- arm64-apple-darwin20.0.0 +macos_min_version: +- '11.0' +openssl: +- 1.1.1 +pin_run_as_build: + bzip2: + max_pin: x + libffi: + max_pin: x.x + openssl: + max_pin: x.x.x + python: + min_pin: x.x + max_pin: x.x + readline: + max_pin: x + sqlite: + max_pin: x + tk: + max_pin: x.x + xz: + max_pin: x.x + zlib: + max_pin: x.x +python: +- '3.8' +readline: +- '8.0' +sqlite: +- '3' +target_platform: +- osx-arm64 +tk: +- '8.6' +xz: +- '5.2' +zlib: +- '1.2' diff --git a/.ci_support/win_64_.yaml b/.ci_support/win_64_.yaml new file mode 100644 index 000000000..98bb6f528 --- /dev/null +++ b/.ci_support/win_64_.yaml @@ -0,0 +1,24 @@ +c_compiler: +- vs2017 +channel_sources: +- conda-forge,defaults +channel_targets: +- conda-forge main +cxx_compiler: +- vs2017 +openssl: +- 1.1.1 +pin_run_as_build: + openssl: + max_pin: x.x.x + python: + min_pin: x.x + max_pin: x.x + sqlite: + max_pin: x +python: +- '3.8' +sqlite: +- '3' +target_platform: +- win-64 diff --git a/.scripts/run_osx_build.sh b/.scripts/run_osx_build.sh index e3e879933..d64afd097 100755 --- a/.scripts/run_osx_build.sh +++ b/.scripts/run_osx_build.sh @@ -58,4 +58,4 @@ validate_recipe_outputs "${FEEDSTOCK_NAME}" if [[ "${UPLOAD_PACKAGES}" != "False" ]]; then echo -e "\n\nUploading the packages." upload_package --validate --feedstock-name="${FEEDSTOCK_NAME}" ./ ./recipe ./.ci_support/${CONFIG}.yaml -fi +fi \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 000000000..c94cf5325 --- /dev/null +++ b/README.md @@ -0,0 +1,202 @@ +About python-split +================== + +Home: http://www.python.org/ + +Package license: Python-2.0 + +Feedstock license: BSD-3-Clause + +Summary: General purpose programming language + +Python is a widely used high-level, general-purpose, interpreted, dynamic +programming language. Its design philosophy emphasizes code +readability, and its syntax allows programmers to express concepts in +fewer lines of code than would be possible in languages such as C++ or +Java. The language provides constructs intended to enable clear programs +on both a small and large scale. + + +Current build status +==================== + + +
VariantStatus
linux_64_python3.6.____cpythontarget_platformlinux-64linux_64_target_platformlinux-64 - variant + variant
linux_64_python3.7.____cpythontarget_platformlinux-64linux_aarch64_target_platformlinux-aarch64 - variant + variant
linux_64_python3.8.____cpythontarget_platformlinux-64linux_ppc64le_target_platformlinux-ppc64le - variant + variant
linux_aarch64_python3.6.____cpythontarget_platformlinux-aarch64osx_64_target_platformosx-64 - variant + variant
linux_aarch64_python3.7.____cpythontarget_platformlinux-aarch64osx_arm64_target_platformosx-arm64 - variant - -
linux_aarch64_python3.8.____cpythontarget_platformlinux-aarch64 - - variant - -
linux_ppc64le_python3.6.____cpythontarget_platformlinux-ppc64le - - variant - -
linux_ppc64le_python3.7.____cpythontarget_platformlinux-ppc64le - - variant - -
linux_ppc64le_python3.8.____cpythontarget_platformlinux-ppc64le - - variant - -
osx_64_python3.6.____cpythontarget_platformosx-64 - - variant - -
osx_64_python3.7.____cpythontarget_platformosx-64 - - variant - -
osx_64_python3.8.____cpythontarget_platformosx-64 - - variant - -
osx_arm64_python3.6.____cpythontarget_platformosx-arm64 - - variant - -
osx_arm64_python3.7.____cpythontarget_platformosx-arm64 - - variant - -
osx_arm64_python3.8.____cpythontarget_platformosx-arm64 - - variant + variant
+ + + + + + + + + + + +
Travis + + macOS + +
Drone + + linux + +
Azure +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
VariantStatus
linux_64_target_platformlinux-64 + + variant + +
linux_aarch64_target_platformlinux-aarch64 + + variant + +
linux_ppc64le_target_platformlinux-ppc64le + + variant + +
osx_64_target_platformosx-64 + + variant + +
osx_arm64_target_platformosx-arm64 + + variant + +
win_64 + + variant + +
+
+
+ +Current release info +==================== + +| Name | Downloads | Version | Platforms | +| --- | --- | --- | --- | +| [![Conda Recipe](https://img.shields.io/badge/recipe-libpython--static-green.svg)](https://anaconda.org/conda-forge/libpython-static) | [![Conda Downloads](https://img.shields.io/conda/dn/conda-forge/libpython-static.svg)](https://anaconda.org/conda-forge/libpython-static) | [![Conda Version](https://img.shields.io/conda/vn/conda-forge/libpython-static.svg)](https://anaconda.org/conda-forge/libpython-static) | [![Conda Platforms](https://img.shields.io/conda/pn/conda-forge/libpython-static.svg)](https://anaconda.org/conda-forge/libpython-static) | +| [![Conda Recipe](https://img.shields.io/badge/recipe-python-green.svg)](https://anaconda.org/conda-forge/python) | [![Conda Downloads](https://img.shields.io/conda/dn/conda-forge/python.svg)](https://anaconda.org/conda-forge/python) | [![Conda Version](https://img.shields.io/conda/vn/conda-forge/python.svg)](https://anaconda.org/conda-forge/python) | [![Conda Platforms](https://img.shields.io/conda/pn/conda-forge/python.svg)](https://anaconda.org/conda-forge/python) | + +Installing python-split +======================= + +Installing `python-split` from the `conda-forge` channel can be achieved by adding `conda-forge` to your channels with: + +``` +conda config --add channels conda-forge +``` + +Once the `conda-forge` channel has been enabled, `libpython-static, python` can be installed with: + +``` +conda install libpython-static python +``` + +It is possible to list all of the versions of `libpython-static` available on your platform with: + +``` +conda search libpython-static --channel conda-forge +``` + + +About conda-forge +================= + +[![Powered by NumFOCUS](https://img.shields.io/badge/powered%20by-NumFOCUS-orange.svg?style=flat&colorA=E1523D&colorB=007D8A)](http://numfocus.org) + +conda-forge is a community-led conda channel of installable packages. +In order to provide high-quality builds, the process has been automated into the +conda-forge GitHub organization. The conda-forge organization contains one repository +for each of the installable packages. Such a repository is known as a *feedstock*. + +A feedstock is made up of a conda recipe (the instructions on what and how to build +the package) and the necessary configurations for automatic building using freely +available continuous integration services. Thanks to the awesome service provided by +[CircleCI](https://circleci.com/), [AppVeyor](https://www.appveyor.com/) +and [TravisCI](https://travis-ci.com/) it is possible to build and upload installable +packages to the [conda-forge](https://anaconda.org/conda-forge) +[Anaconda-Cloud](https://anaconda.org/) channel for Linux, Windows and OSX respectively. + +To manage the continuous integration and simplify feedstock maintenance +[conda-smithy](https://github.com/conda-forge/conda-smithy) has been developed. +Using the ``conda-forge.yml`` within this repository, it is possible to re-render all of +this feedstock's supporting files (e.g. the CI configuration files) with ``conda smithy rerender``. + +For more information please check the [conda-forge documentation](https://conda-forge.org/docs/). + +Terminology +=========== + +**feedstock** - the conda recipe (raw material), supporting scripts and CI configuration. + +**conda-smithy** - the tool which helps orchestrate the feedstock. + Its primary use is in the construction of the CI ``.yml`` files + and simplify the management of *many* feedstocks. + +**conda-forge** - the place where the feedstock and smithy live and work to + produce the finished article (built conda distributions) + + +Updating python-split-feedstock +=============================== + +If you would like to improve the python-split recipe or build a new +package version, please fork this repository and submit a PR. Upon submission, +your changes will be run on the appropriate platforms to give the reviewer an +opportunity to confirm that the changes result in a successful build. Once +merged, the recipe will be re-built and uploaded automatically to the +`conda-forge` channel, whereupon the built conda packages will be available for +everybody to install and use from the `conda-forge` channel. +Note that all branches in the conda-forge/python-split-feedstock are +immediately built and any created packages are uploaded, so PRs should be based +on branches in forks and branches in the main repository should only be used to +build distinct package versions. + +In order to produce a uniquely identifiable distribution: + * If the version of a package **is not** being increased, please add or increase + the [``build/number``](https://conda.io/docs/user-guide/tasks/build-packages/define-metadata.html#build-number-and-string). + * If the version of a package **is** being increased, please remember to return + the [``build/number``](https://conda.io/docs/user-guide/tasks/build-packages/define-metadata.html#build-number-and-string) + back to 0. + +Feedstock Maintainers +===================== + +* [@isuruf](https://github.com/isuruf/) +* [@jakirkham](https://github.com/jakirkham/) +* [@jjhelmus](https://github.com/jjhelmus/) +* [@mingwandroid](https://github.com/mingwandroid/) +* [@msarahan](https://github.com/msarahan/) +* [@ocefpaf](https://github.com/ocefpaf/) +* [@pelson](https://github.com/pelson/) +* [@scopatz](https://github.com/scopatz/) +