diff --git a/.azure-pipelines/azure-pipelines-linux.yml b/.azure-pipelines/azure-pipelines-linux.yml
index f04e699cd..3d1d30fba 100755
--- a/.azure-pipelines/azure-pipelines-linux.yml
+++ b/.azure-pipelines/azure-pipelines-linux.yml
@@ -8,10 +8,16 @@ jobs:
vmImage: ubuntu-latest
strategy:
matrix:
- linux_64_:
- CONFIG: linux_64_
+ linux_64_openssl1.1.1:
+ CONFIG: linux_64_openssl1.1.1
UPLOAD_PACKAGES: 'True'
DOCKER_IMAGE: quay.io/condaforge/linux-anvil-comp7
+ SHORT_CONFIG_NAME: linux_64_openssl1.1.1
+ linux_64_openssl3:
+ CONFIG: linux_64_openssl3
+ UPLOAD_PACKAGES: 'True'
+ DOCKER_IMAGE: quay.io/condaforge/linux-anvil-comp7
+ SHORT_CONFIG_NAME: linux_64_openssl3
timeoutInMinutes: 360
steps:
@@ -37,4 +43,16 @@ jobs:
env:
BINSTAR_TOKEN: $(BINSTAR_TOKEN)
FEEDSTOCK_TOKEN: $(FEEDSTOCK_TOKEN)
- STAGING_BINSTAR_TOKEN: $(STAGING_BINSTAR_TOKEN)
\ No newline at end of file
+ STAGING_BINSTAR_TOKEN: $(STAGING_BINSTAR_TOKEN)
+ - script: |
+ artifact_name="conda_artifacts_$(build.BuildId)_$(SHORT_CONFIG_NAME)"
+ echo "##vso[task.setVariable variable=ARTIFACT_NAME]$artifact_name"
+ if [ -d build_artifacts ]; then
+ echo "##vso[task.setVariable variable=CONDA_BLD_DIR_EXISTS]true"
+ fi
+ displayName: Check for conda build artifacts
+ condition: succeededOrFailed()
+
+ - publish: build_artifacts/
+ artifact: $(ARTIFACT_NAME)
+ condition: eq(variables.CONDA_BLD_DIR_EXISTS, 'true')
\ No newline at end of file
diff --git a/.azure-pipelines/azure-pipelines-osx.yml b/.azure-pipelines/azure-pipelines-osx.yml
index 39baad3f4..7957fa8c8 100755
--- a/.azure-pipelines/azure-pipelines-osx.yml
+++ b/.azure-pipelines/azure-pipelines-osx.yml
@@ -8,12 +8,22 @@ jobs:
vmImage: macOS-10.15
strategy:
matrix:
- osx_64_:
- CONFIG: osx_64_
+ osx_64_openssl1.1.1:
+ CONFIG: osx_64_openssl1.1.1
UPLOAD_PACKAGES: 'True'
- osx_arm64_:
- CONFIG: osx_arm64_
+ SHORT_CONFIG_NAME: osx_64_openssl1.1.1
+ osx_64_openssl3:
+ CONFIG: osx_64_openssl3
UPLOAD_PACKAGES: 'True'
+ SHORT_CONFIG_NAME: osx_64_openssl3
+ osx_arm64_openssl1.1.1:
+ CONFIG: osx_arm64_openssl1.1.1
+ UPLOAD_PACKAGES: 'True'
+ SHORT_CONFIG_NAME: osx_arm64_openssl1.1.1
+ osx_arm64_openssl3:
+ CONFIG: osx_arm64_openssl3
+ UPLOAD_PACKAGES: 'True'
+ SHORT_CONFIG_NAME: osx_arm64_openssl3
timeoutInMinutes: 360
steps:
@@ -28,4 +38,16 @@ jobs:
env:
BINSTAR_TOKEN: $(BINSTAR_TOKEN)
FEEDSTOCK_TOKEN: $(FEEDSTOCK_TOKEN)
- STAGING_BINSTAR_TOKEN: $(STAGING_BINSTAR_TOKEN)
\ No newline at end of file
+ STAGING_BINSTAR_TOKEN: $(STAGING_BINSTAR_TOKEN)
+ - script: |
+ artifact_name="conda_artifacts_$(build.BuildId)_$(SHORT_CONFIG_NAME)"
+ echo "##vso[task.setVariable variable=ARTIFACT_NAME]$artifact_name"
+ if [ -d /Users/runner/miniforge3/conda-bld/ ]; then
+ echo "##vso[task.setVariable variable=CONDA_BLD_DIR_EXISTS]true"
+ fi
+ displayName: Check for conda build artifacts
+ condition: succeededOrFailed()
+
+ - publish: /Users/runner/miniforge3/conda-bld/
+ artifact: $(ARTIFACT_NAME)
+ condition: eq(variables.CONDA_BLD_DIR_EXISTS, 'true')
\ No newline at end of file
diff --git a/.azure-pipelines/azure-pipelines-win.yml b/.azure-pipelines/azure-pipelines-win.yml
index 1fd8ea12d..26cb31cdd 100755
--- a/.azure-pipelines/azure-pipelines-win.yml
+++ b/.azure-pipelines/azure-pipelines-win.yml
@@ -8,9 +8,14 @@ jobs:
vmImage: vs2017-win2016
strategy:
matrix:
- win_64_:
- CONFIG: win_64_
+ win_64_openssl1.1.1:
+ CONFIG: win_64_openssl1.1.1
UPLOAD_PACKAGES: 'True'
+ SHORT_CONFIG_NAME: win_64_openssl1.1.1
+ win_64_openssl3:
+ CONFIG: win_64_openssl3
+ UPLOAD_PACKAGES: 'True'
+ SHORT_CONFIG_NAME: win_64_openssl3
timeoutInMinutes: 360
variables:
CONDA_BLD_PATH: D:\\bld\\
@@ -86,11 +91,23 @@ jobs:
- script: |
call activate base
- conda.exe build "recipe" -m .ci_support\%CONFIG%.yaml
+ conda.exe build "recipe" -m .ci_support\%CONFIG%.yaml --suppress-variables
displayName: Build recipe
env:
PYTHONUNBUFFERED: 1
condition: not(contains(variables['CONFIG'], 'vs2008'))
+ - script: |
+ set artifact_name=conda_artifacts_$(build.BuildID)_$(SHORT_CONFIG_NAME)
+ echo ##vso[task.setVariable variable=ARTIFACT_NAME]%artifact_name%
+ if exist $(CONDA_BLD_PATH)\\ (
+ echo ##vso[task.setVariable variable=CONDA_BLD_DIR_EXISTS]true
+ )
+ displayName: Check for conda build artifacts
+ condition: succeededOrFailed()
+
+ - publish: $(CONDA_BLD_PATH)\\
+ artifact: $(ARTIFACT_NAME)
+ condition: eq(variables.CONDA_BLD_DIR_EXISTS, 'true')
- script: |
set "FEEDSTOCK_NAME=%BUILD_REPOSITORY_NAME:*/=%"
call activate base
diff --git a/.ci_support/linux_64_.yaml b/.ci_support/linux_64_openssl1.1.1.yaml
similarity index 90%
rename from .ci_support/linux_64_.yaml
rename to .ci_support/linux_64_openssl1.1.1.yaml
index 55c1a2e8d..537601aab 100644
--- a/.ci_support/linux_64_.yaml
+++ b/.ci_support/linux_64_openssl1.1.1.yaml
@@ -7,7 +7,7 @@ c_compiler_version:
cdt_name:
- cos6
channel_sources:
-- conda-forge,defaults
+- conda-forge
channel_targets:
- conda-forge main
cxx_compiler:
@@ -17,7 +17,9 @@ cxx_compiler_version:
docker_image:
- quay.io/condaforge/linux-anvil-comp7
libffi:
-- '3.3'
+- '3.4'
+libuuid:
+- '2'
ncurses:
- '6.2'
openssl:
@@ -27,10 +29,10 @@ pin_run_as_build:
max_pin: x
libffi:
max_pin: x.x
+ libuuid:
+ max_pin: x
ncurses:
max_pin: x.x
- openssl:
- max_pin: x.x.x
python:
min_pin: x.x
max_pin: x.x
@@ -45,7 +47,7 @@ pin_run_as_build:
zlib:
max_pin: x.x
python:
-- '3.9'
+- '3.10'
readline:
- '8'
sqlite:
diff --git a/.ci_support/linux_64_openssl3.yaml b/.ci_support/linux_64_openssl3.yaml
new file mode 100644
index 000000000..b88e8ee2e
--- /dev/null
+++ b/.ci_support/linux_64_openssl3.yaml
@@ -0,0 +1,67 @@
+bzip2:
+- '1'
+c_compiler:
+- gcc
+c_compiler_version:
+- '9'
+cdt_name:
+- cos6
+channel_sources:
+- conda-forge
+channel_targets:
+- conda-forge main
+cxx_compiler:
+- gxx
+cxx_compiler_version:
+- '9'
+docker_image:
+- quay.io/condaforge/linux-anvil-comp7
+libffi:
+- '3.4'
+libuuid:
+- '2'
+ncurses:
+- '6.2'
+openssl:
+- '3'
+pin_run_as_build:
+ bzip2:
+ max_pin: x
+ libffi:
+ max_pin: x.x
+ libuuid:
+ max_pin: x
+ ncurses:
+ max_pin: 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.10'
+readline:
+- '8'
+sqlite:
+- '3'
+target_platform:
+- linux-64
+tk:
+- '8.6'
+xz:
+- '5.2'
+zip_keys:
+- - c_compiler_version
+ - cxx_compiler_version
+- - cdt_name
+ - docker_image
+zlib:
+- '1.2'
diff --git a/.ci_support/linux_aarch64_.yaml b/.ci_support/linux_aarch64_openssl1.1.1.yaml
similarity index 93%
rename from .ci_support/linux_aarch64_.yaml
rename to .ci_support/linux_aarch64_openssl1.1.1.yaml
index 966b3e7ae..139a979fc 100644
--- a/.ci_support/linux_aarch64_.yaml
+++ b/.ci_support/linux_aarch64_openssl1.1.1.yaml
@@ -21,7 +21,9 @@ cxx_compiler_version:
docker_image:
- quay.io/condaforge/linux-anvil-aarch64
libffi:
-- '3.3'
+- '3.4'
+libuuid:
+- '2'
ncurses:
- '6.2'
openssl:
@@ -31,10 +33,10 @@ pin_run_as_build:
max_pin: x
libffi:
max_pin: x.x
+ libuuid:
+ max_pin: x
ncurses:
max_pin: x.x
- openssl:
- max_pin: x.x.x
python:
min_pin: x.x
max_pin: x.x
@@ -49,7 +51,7 @@ pin_run_as_build:
zlib:
max_pin: x.x
python:
-- '3.9'
+- '3.10'
readline:
- '8'
sqlite:
diff --git a/.ci_support/linux_aarch64_openssl3.yaml b/.ci_support/linux_aarch64_openssl3.yaml
new file mode 100644
index 000000000..6f6cf7fb8
--- /dev/null
+++ b/.ci_support/linux_aarch64_openssl3.yaml
@@ -0,0 +1,69 @@
+BUILD:
+- aarch64-conda_cos7-linux-gnu
+bzip2:
+- '1'
+c_compiler:
+- gcc
+c_compiler_version:
+- '9'
+cdt_arch:
+- aarch64
+cdt_name:
+- cos7
+channel_sources:
+- conda-forge
+channel_targets:
+- conda-forge main
+cxx_compiler:
+- gxx
+cxx_compiler_version:
+- '9'
+docker_image:
+- quay.io/condaforge/linux-anvil-aarch64
+libffi:
+- '3.4'
+libuuid:
+- '2'
+ncurses:
+- '6.2'
+openssl:
+- '3'
+pin_run_as_build:
+ bzip2:
+ max_pin: x
+ libffi:
+ max_pin: x.x
+ libuuid:
+ max_pin: x
+ ncurses:
+ max_pin: 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.10'
+readline:
+- '8'
+sqlite:
+- '3'
+target_platform:
+- linux-aarch64
+tk:
+- '8.6'
+xz:
+- '5.2'
+zip_keys:
+- - c_compiler_version
+ - cxx_compiler_version
+zlib:
+- '1.2'
diff --git a/.ci_support/linux_ppc64le_.yaml b/.ci_support/linux_ppc64le_openssl1.1.1.yaml
similarity index 90%
rename from .ci_support/linux_ppc64le_.yaml
rename to .ci_support/linux_ppc64le_openssl1.1.1.yaml
index fc2b57090..09eb8ed4a 100644
--- a/.ci_support/linux_ppc64le_.yaml
+++ b/.ci_support/linux_ppc64le_openssl1.1.1.yaml
@@ -7,7 +7,7 @@ c_compiler_version:
cdt_name:
- cos7
channel_sources:
-- conda-forge,defaults
+- conda-forge
channel_targets:
- conda-forge main
cxx_compiler:
@@ -17,7 +17,9 @@ cxx_compiler_version:
docker_image:
- quay.io/condaforge/linux-anvil-ppc64le
libffi:
-- '3.3'
+- '3.4'
+libuuid:
+- '2'
ncurses:
- '6.2'
openssl:
@@ -27,10 +29,10 @@ pin_run_as_build:
max_pin: x
libffi:
max_pin: x.x
+ libuuid:
+ max_pin: x
ncurses:
max_pin: x.x
- openssl:
- max_pin: x.x.x
python:
min_pin: x.x
max_pin: x.x
@@ -43,7 +45,7 @@ pin_run_as_build:
zlib:
max_pin: x.x
python:
-- '3.9'
+- '3.10'
readline:
- '8'
sqlite:
diff --git a/.ci_support/linux_ppc64le_openssl3.yaml b/.ci_support/linux_ppc64le_openssl3.yaml
new file mode 100644
index 000000000..1f052e138
--- /dev/null
+++ b/.ci_support/linux_ppc64le_openssl3.yaml
@@ -0,0 +1,61 @@
+bzip2:
+- '1'
+c_compiler:
+- gcc
+c_compiler_version:
+- '9'
+cdt_name:
+- cos7
+channel_sources:
+- conda-forge
+channel_targets:
+- conda-forge main
+cxx_compiler:
+- gxx
+cxx_compiler_version:
+- '9'
+docker_image:
+- quay.io/condaforge/linux-anvil-ppc64le
+libffi:
+- '3.4'
+libuuid:
+- '2'
+ncurses:
+- '6.2'
+openssl:
+- '3'
+pin_run_as_build:
+ bzip2:
+ max_pin: x
+ libffi:
+ max_pin: x.x
+ libuuid:
+ max_pin: x
+ ncurses:
+ max_pin: 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.10'
+readline:
+- '8'
+sqlite:
+- '3'
+target_platform:
+- linux-ppc64le
+xz:
+- '5.2'
+zip_keys:
+- - c_compiler_version
+ - cxx_compiler_version
+zlib:
+- '1.2'
diff --git a/.ci_support/migrations/libffi34.yaml b/.ci_support/migrations/libffi34.yaml
new file mode 100644
index 000000000..328f8e3bf
--- /dev/null
+++ b/.ci_support/migrations/libffi34.yaml
@@ -0,0 +1,7 @@
+__migrator:
+ build_number: 1
+ kind: version
+ migration_number: 1
+libffi:
+- '3.4'
+migrator_ts: 1630622620.3080156
diff --git a/.ci_support/migrations/openssl3.yaml b/.ci_support/migrations/openssl3.yaml
new file mode 100644
index 000000000..ae551c1e9
--- /dev/null
+++ b/.ci_support/migrations/openssl3.yaml
@@ -0,0 +1,8 @@
+__migrator:
+ build_number: 1
+ kind: version
+ migration_number: 1
+migrator_ts: 1631932209.13688
+openssl:
+- 1.1.1
+- '3'
diff --git a/.ci_support/osx_64_.yaml b/.ci_support/osx_64_openssl1.1.1.yaml
similarity index 91%
rename from .ci_support/osx_64_.yaml
rename to .ci_support/osx_64_openssl1.1.1.yaml
index c27563bba..f30cff02f 100644
--- a/.ci_support/osx_64_.yaml
+++ b/.ci_support/osx_64_openssl1.1.1.yaml
@@ -9,7 +9,7 @@ c_compiler:
c_compiler_version:
- '11'
channel_sources:
-- conda-forge,defaults
+- conda-forge
channel_targets:
- conda-forge main
cxx_compiler:
@@ -17,7 +17,7 @@ cxx_compiler:
cxx_compiler_version:
- '11'
libffi:
-- '3.3'
+- '3.4'
macos_machine:
- x86_64-apple-darwin13.4.0
ncurses:
@@ -31,8 +31,6 @@ pin_run_as_build:
max_pin: x.x
ncurses:
max_pin: x.x
- openssl:
- max_pin: x.x.x
python:
min_pin: x.x
max_pin: x.x
@@ -47,7 +45,7 @@ pin_run_as_build:
zlib:
max_pin: x.x
python:
-- '3.9'
+- '3.10'
readline:
- '8'
sqlite:
diff --git a/.ci_support/osx_64_openssl3.yaml b/.ci_support/osx_64_openssl3.yaml
new file mode 100644
index 000000000..8bfd4a217
--- /dev/null
+++ b/.ci_support/osx_64_openssl3.yaml
@@ -0,0 +1,63 @@
+MACOSX_DEPLOYMENT_TARGET:
+- '10.9'
+MACOSX_SDK_VERSION:
+- '11.0'
+bzip2:
+- '1'
+c_compiler:
+- clang
+c_compiler_version:
+- '11'
+channel_sources:
+- conda-forge
+channel_targets:
+- conda-forge main
+cxx_compiler:
+- clangxx
+cxx_compiler_version:
+- '11'
+libffi:
+- '3.4'
+macos_machine:
+- x86_64-apple-darwin13.4.0
+ncurses:
+- '6.2'
+openssl:
+- '3'
+pin_run_as_build:
+ bzip2:
+ max_pin: x
+ libffi:
+ max_pin: x.x
+ ncurses:
+ max_pin: 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.10'
+readline:
+- '8'
+sqlite:
+- '3'
+target_platform:
+- osx-64
+tk:
+- '8.6'
+xz:
+- '5.2'
+zip_keys:
+- - c_compiler_version
+ - cxx_compiler_version
+zlib:
+- '1.2'
diff --git a/.ci_support/osx_arm64_.yaml b/.ci_support/osx_arm64_openssl1.1.1.yaml
similarity index 89%
rename from .ci_support/osx_arm64_.yaml
rename to .ci_support/osx_arm64_openssl1.1.1.yaml
index 09d441851..38a14c553 100644
--- a/.ci_support/osx_arm64_.yaml
+++ b/.ci_support/osx_arm64_openssl1.1.1.yaml
@@ -7,13 +7,15 @@ c_compiler:
c_compiler_version:
- '11'
channel_sources:
-- conda-forge/label/rust_dev,conda-forge
+- conda-forge
channel_targets:
- conda-forge main
cxx_compiler:
- clangxx
cxx_compiler_version:
- '11'
+libffi:
+- '3.4'
macos_machine:
- arm64-apple-darwin20.0.0
ncurses:
@@ -23,10 +25,10 @@ openssl:
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
@@ -41,7 +43,7 @@ pin_run_as_build:
zlib:
max_pin: x.x
python:
-- '3.9'
+- '3.10'
readline:
- '8'
sqlite:
diff --git a/.ci_support/osx_arm64_openssl3.yaml b/.ci_support/osx_arm64_openssl3.yaml
new file mode 100644
index 000000000..d7f7892bd
--- /dev/null
+++ b/.ci_support/osx_arm64_openssl3.yaml
@@ -0,0 +1,61 @@
+MACOSX_DEPLOYMENT_TARGET:
+- '11.0'
+bzip2:
+- '1'
+c_compiler:
+- clang
+c_compiler_version:
+- '11'
+channel_sources:
+- conda-forge
+channel_targets:
+- conda-forge main
+cxx_compiler:
+- clangxx
+cxx_compiler_version:
+- '11'
+libffi:
+- '3.4'
+macos_machine:
+- arm64-apple-darwin20.0.0
+ncurses:
+- '6.2'
+openssl:
+- '3'
+pin_run_as_build:
+ bzip2:
+ max_pin: x
+ libffi:
+ max_pin: x.x
+ ncurses:
+ max_pin: 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.10'
+readline:
+- '8'
+sqlite:
+- '3'
+target_platform:
+- osx-arm64
+tk:
+- '8.6'
+xz:
+- '5.2'
+zip_keys:
+- - c_compiler_version
+ - cxx_compiler_version
+zlib:
+- '1.2'
diff --git a/.ci_support/win_64_.yaml b/.ci_support/win_64_openssl1.1.1.yaml
similarity index 54%
rename from .ci_support/win_64_.yaml
rename to .ci_support/win_64_openssl1.1.1.yaml
index 7113321cb..36a83ca0f 100644
--- a/.ci_support/win_64_.yaml
+++ b/.ci_support/win_64_openssl1.1.1.yaml
@@ -1,24 +1,42 @@
+bzip2:
+- '1'
c_compiler:
- vs2017
channel_sources:
-- conda-forge,defaults
+- conda-forge
channel_targets:
- conda-forge main
cxx_compiler:
- vs2017
+libffi:
+- '3.4'
openssl:
- 1.1.1
pin_run_as_build:
- openssl:
- max_pin: x.x.x
+ bzip2:
+ max_pin: x
+ libffi:
+ max_pin: x.x
python:
min_pin: x.x
max_pin: x.x
sqlite:
max_pin: x
+ tk:
+ max_pin: x.x
+ xz:
+ max_pin: x.x
+ zlib:
+ max_pin: x.x
python:
-- '3.9'
+- '3.10'
sqlite:
- '3'
target_platform:
- win-64
+tk:
+- '8.6'
+xz:
+- '5.2'
+zlib:
+- '1.2'
diff --git a/.ci_support/win_64_openssl3.yaml b/.ci_support/win_64_openssl3.yaml
new file mode 100644
index 000000000..14b82dcae
--- /dev/null
+++ b/.ci_support/win_64_openssl3.yaml
@@ -0,0 +1,42 @@
+bzip2:
+- '1'
+c_compiler:
+- vs2017
+channel_sources:
+- conda-forge
+channel_targets:
+- conda-forge main
+cxx_compiler:
+- vs2017
+libffi:
+- '3.4'
+openssl:
+- '3'
+pin_run_as_build:
+ bzip2:
+ max_pin: x
+ libffi:
+ max_pin: x.x
+ python:
+ min_pin: x.x
+ max_pin: x.x
+ sqlite:
+ max_pin: x
+ tk:
+ max_pin: x.x
+ xz:
+ max_pin: x.x
+ zlib:
+ max_pin: x.x
+python:
+- '3.10'
+sqlite:
+- '3'
+target_platform:
+- win-64
+tk:
+- '8.6'
+xz:
+- '5.2'
+zlib:
+- '1.2'
diff --git a/.drone.yml b/.drone.yml
index af150917c..e9f1f1ea9 100644
--- a/.drone.yml
+++ b/.drone.yml
@@ -1,6 +1,6 @@
---
kind: pipeline
-name: linux_aarch64_
+name: linux_aarch64_openssl1.1.1
platform:
os: linux
@@ -10,7 +10,38 @@ steps:
- name: Install and build
image: quay.io/condaforge/linux-anvil-aarch64
environment:
- CONFIG: linux_aarch64_
+ CONFIG: linux_aarch64_openssl1.1.1
+ 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_openssl3
+
+platform:
+ os: linux
+ arch: arm64
+
+steps:
+- name: Install and build
+ image: quay.io/condaforge/linux-anvil-aarch64
+ environment:
+ CONFIG: linux_aarch64_openssl3
UPLOAD_PACKAGES: True
PLATFORM: linux-aarch64
BINSTAR_TOKEN:
diff --git a/.travis.yml b/.travis.yml
index ecb962dea..cdd507356 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -7,7 +7,12 @@ language: generic
matrix:
include:
- - env: CONFIG=linux_ppc64le_ UPLOAD_PACKAGES=True PLATFORM=linux-ppc64le DOCKER_IMAGE=quay.io/condaforge/linux-anvil-ppc64le
+ - env: CONFIG=linux_ppc64le_openssl1.1.1 UPLOAD_PACKAGES=True PLATFORM=linux-ppc64le DOCKER_IMAGE=quay.io/condaforge/linux-anvil-ppc64le
+ os: linux
+ arch: ppc64le
+ dist: focal
+
+ - env: CONFIG=linux_ppc64le_openssl3 UPLOAD_PACKAGES=True PLATFORM=linux-ppc64le DOCKER_IMAGE=quay.io/condaforge/linux-anvil-ppc64le
os: linux
arch: ppc64le
dist: focal
diff --git a/README.md b/README.md
index ecf206579..3a4b75c65 100644
--- a/README.md
+++ b/README.md
@@ -53,45 +53,87 @@ Current build status
| Variant | Status |
- | linux_64 |
+ linux_64_openssl1.1.1 |
-
+
|
- | linux_aarch64 |
+ linux_64_openssl3 |
-
+
|
- | linux_ppc64le |
+ linux_aarch64_openssl1.1.1 |
-
+
|
- | osx_64 |
+ linux_aarch64_openssl3 |
-
+
|
- | osx_arm64 |
+ linux_ppc64le_openssl1.1.1 |
-
+
|
- | win_64 |
+ linux_ppc64le_openssl3 |
-
+
+
+ |
+
+ | osx_64_openssl1.1.1 |
+
+
+
+
+ |
+
+ | osx_64_openssl3 |
+
+
+
+
+ |
+
+ | osx_arm64_openssl1.1.1 |
+
+
+
+
+ |
+
+ | osx_arm64_openssl3 |
+
+
+
+
+ |
+
+ | win_64_openssl1.1.1 |
+
+
+
+
+ |
+
+ | win_64_openssl3 |
+
+
+
|
diff --git a/conda-forge.yml b/conda-forge.yml
index 7ae36bb7e..ab4659c10 100644
--- a/conda-forge.yml
+++ b/conda-forge.yml
@@ -4,7 +4,8 @@ provider: {linux_aarch64: native, linux_ppc64le: native, osx: azure, win: azure}
test_on_native_only: true
bot:
abi_migration_branches:
- - 3.6
- 3.7
- 3.8
- 3.9
+azure:
+ store_build_artifacts: true
diff --git a/recipe/build_base.bat b/recipe/build_base.bat
index c39cd6459..06af2528b 100644
--- a/recipe/build_base.bat
+++ b/recipe/build_base.bat
@@ -82,12 +82,6 @@ if errorlevel 1 exit 1
mkdir %PREFIX%\DLLs
xcopy /s /y %SRC_DIR%\PCBuild\%BUILD_PATH%\*.pyd %PREFIX%\DLLs\
if errorlevel 1 exit 1
-copy /Y %SRC_DIR%\PCbuild\%BUILD_PATH%\tcl86t.dll %PREFIX%\DLLs\
-if errorlevel 1 exit 1
-copy /Y %SRC_DIR%\PCbuild\%BUILD_PATH%\tk86t.dll %PREFIX%\DLLs\
-if errorlevel 1 exit 1
-copy /Y %SRC_DIR%\PCbuild\%BUILD_PATH%\libffi-7.dll %PREFIX%\DLLs\
-if errorlevel 1 exit 1
copy /Y %SRC_DIR%\PC\icons\py.ico %PREFIX%\DLLs\
if errorlevel 1 exit 1
@@ -124,10 +118,6 @@ if errorlevel 1 exit 1
move /y %PREFIX%\Tools\scripts\pydoc3 %PREFIX%\Tools\scripts\pydoc3.py
if errorlevel 1 exit 1
-:: Populate the tcl directory
-xcopy /s /y /i %SRC_DIR%\externals\tcltk-8.6.9.0\%BUILD_PATH%\lib %PREFIX%\tcl
-if errorlevel 1 exit 1
-
:: Populate the include directory
xcopy /s /y %SRC_DIR%\Include %PREFIX%\include\
if errorlevel 1 exit 1
diff --git a/recipe/build_base.sh b/recipe/build_base.sh
index 0a72c6ba4..c456da1e1 100644
--- a/recipe/build_base.sh
+++ b/recipe/build_base.sh
@@ -69,12 +69,6 @@ test "${PY_VER}" = "${VER}"
unset _PYTHON_SYSCONFIGDATA_NAME
unset _CONDA_PYTHON_SYSCONFIGDATA_NAME
-# Remove bzip2's shared library if present,
-# as we only want to link to it statically.
-# This is important in cases where conda
-# tries to update bzip2.
-find "${PREFIX}/lib" -name "libbz2*${SHLIB_EXT}*" | xargs rm -fv {}
-
# Prevent lib/python${VER}/_sysconfigdata_*.py from ending up with full paths to these things
# in _build_env because _build_env will not get found during prefix replacement, only _h_env_placeh ...
AR=$(basename "${AR}")
@@ -107,6 +101,10 @@ if [[ ${CONDA_FORGE} == yes ]]; then
${SYS_PYTHON} ${RECIPE_DIR}/brand_python.py
fi
+if [[ "$target_platform" == linux-* ]]; then
+ cp ${PREFIX}/include/uuid/uuid.h ${PREFIX}/include/uuid.h
+fi
+
declare -a LTO_CFLAGS=()
# Following is needed for building extensions like zlib
@@ -455,6 +453,8 @@ pushd "${PREFIX}"/lib/python${VER}
# Remove unfilled config option
sed -i.bak "s/@SGI_ABI@//g" sysconfigfile
sed -i.bak "s@$BUILD_PREFIX/bin/${HOST}-llvm-ar@${HOST}-ar@g" sysconfigfile
+ # Remove GNULD=yes to make sure new-dtags are not used
+ sed -i.bak "s/'GNULD': 'yes'/'GNULD': 'no'/g" sysconfigfile
cp sysconfigfile ${our_compilers_name}
sed -i.bak "s@${HOST}@${OLD_HOST}@g" sysconfigfile
@@ -482,6 +482,9 @@ pushd "${PREFIX}"/lib/python${VER}
# Cleanup some extra spaces from above
sed -i.bak "s@' [ ]*@'@g" sysconfigfile
cp sysconfigfile $recorded_name
+ echo "========================sysconfig==========================="
+ cat $recorded_name
+ echo "============================================================"
rm sysconfigfile
rm sysconfigfile.bak
@@ -499,3 +502,6 @@ rm -rf ${PREFIX}/lib/python${VER}/distutils/command/*.exe
python -c "import compileall,os;compileall.compile_dir(os.environ['PREFIX'])"
rm ${PREFIX}/lib/libpython${VER}.a
+if [[ "$target_platform" == linux-* ]]; then
+ rm ${PREFIX}/include/uuid.h
+fi
diff --git a/recipe/conda_build_config.yaml b/recipe/conda_build_config.yaml
index d35ab838f..d418477dd 100644
--- a/recipe/conda_build_config.yaml
+++ b/recipe/conda_build_config.yaml
@@ -1,5 +1,5 @@
python:
- - 3.9
+ - 3.10
python_impl:
- cpython
numpy:
diff --git a/recipe/meta.yaml b/recipe/meta.yaml
index e120fc6d8..7eda694f5 100644
--- a/recipe/meta.yaml
+++ b/recipe/meta.yaml
@@ -1,10 +1,10 @@
-{% set version = "3.9.6" %}
+{% set version = "3.10.0" %}
{% set dev = "" %}
{% set dev_ = "" %}
{% set ver2 = '.'.join(version.split('.')[0:2]) %}
{% set ver2nd = ''.join(version.split('.')[0:2]) %}
{% set ver3nd = ''.join(version.split('.')[0:3]) %}
-{% set build_number = 1 %}
+{% set build_number = 0 %}
# this makes the linter happy
{% set channel_targets = channel_targets or 'conda-forge main' %}
@@ -47,69 +47,41 @@ source:
{% else %}
- url: https://www.python.org/ftp/python/{{ version }}/Python-{{ version }}{{ dev }}.tar.xz
# md5 from: https://www.python.org/downloads/release/python-{{ ver3nd }}/
- md5: ecc29a7688f86e550d29dba2ee66cf80
+ md5: 3e7035d272680f80e3ce4e8eb492d580
{% endif %}
patches:
- - patches/0000-Fix-off-by-one-error-in-_winapi_WaitForMultipleObjec.patch
- - patches/0001-Darwin-Add-arch-x86_64-to-UnicCCompiler-ld_args.patch
- - patches/0002-Win32-Change-FD_SETSIZE-from-512-to-2048.patch
- - patches/0003-Win32-distutils-Add-support-to-cygwinccompiler-for-V.patch
- - patches/0004-Do-not-pass-g-to-GCC-when-not-Py_DEBUG.patch
- - patches/0005-Support-cross-compiling-byte-code.patch
- - patches/0006-Win32-Fixes-for-Windows-GCC-interop-needed-by-RPy2-a.patch
- - patches/0007-Darwin-Look-in-sysroot-usr-lib-include-if-sysroot-is.patch
- - patches/0008-runtime_library_dir_option-Use-1st-word-of-CC-as-com.patch
- - patches/0009-Win32-Do-not-download-externals.patch
- - patches/0010-Add-support-for-_CONDA_PYTHON_SYSCONFIGDATA_NAME-if-.patch
- - patches/0011-Fix-find_library-so-that-it-looks-in-sys.prefix-lib-.patch
- - patches/0012-Disable-new-dtags-in-unixccompiler.py.patch
- - patches/0013-Fix-cross-compilation-on-Debian-based-distros.patch
- - patches/0014-Disable-registry-lookup-unless-CONDA_PY_ALLOW_REG_PA.patch
- - patches/0015-Unvendor-openssl.patch
- - patches/0016-Unvendor-sqlite3.patch
- - patches/0017-venv-Revert-a-change-from-https-github.com-python-cp.patch
- - patches/0018-Win-Add-back-the-DLLSuffix-used-to-find-the-openssl-.patch
- - patches/0019-Use-ranlib-from-env-if-env-variable-is-set.patch
- - patches/0020-Add-CondaEcosystemModifyDllSearchPath.patch
- - patches/0021-Add-d1trimfile-SRC_DIR-to-make-pdbs-more-relocatable.patch
- - patches/0022-Doing-d1trimfile.patch
- - patches/0023-egg-debugging-with-Windows-debug-builds.patch
- - patches/0024-Add-CONDA_DLL_SEARCH_MODIFICATION_KEEP_GIL-to-aid-de.patch
- - patches/0025-cross-compile-darwin.patch
- - patches/0032-Fix-TZPATH-on-windows.patch
- - patches/0033-gh24324.patch
- - patches/0034-distutils-fix-ldshared.patch
-
- # TODO :: Depend on our own packages for these:
- - url: https://github.com/python/cpython-source-deps/archive/xz-5.2.2.zip # [win]
- folder: externals/xz-5.2.2 # [win]
- sha256: 02b6d6f1e0369940e7e1f0d324992e069d09f5f3d32d86e2d22cd8b82ac3fb3f # [win]
- # Not used as of 3.7b3 (tcltk from cpython-bin- is), but kept for archival and license reasons.
- - url: https://github.com/python/cpython-source-deps/archive/tcl-core-8.6.9.0.zip # [win]
- folder: externals/tcl-core-8.6.9.0 # [win]
- sha256: ea9e724536ec13b476ebbd47948303b92fdd90a33aa94f30fcc2f5c3a899f69e # [win]
- # Not used as of 3.7b3 (tcltk from cpython-bin- is), but kept for archival and license reasons.
- - url: https://github.com/python/cpython-source-deps/archive/tk-8.6.9.0.zip # [win]
- folder: externals/tk-8.6.9.0 # [win]
- sha256: f3112b6bbc3bd163c877030187e73ce9a113ce03eff559ec5b9df697e3a08fad # [win]
- - url: https://github.com/python/cpython-bin-deps/archive/tcltk-8.6.9.0.zip # [win]
- folder: externals/tcltk-8.6.9.0 # [win]
- sha256: 37cd629a75d2a34974a3d771ccab5c9e3caf3d138cea81040f9cdba1aded1cf2 # [win]
- - url: https://github.com/python/cpython-source-deps/archive/tix-8.4.3.6.zip # [win]
- folder: externals/tix-8.4.3.6 # [win]
- sha256: e558e3dc5e67ac0942f8fceafce00ca46b177da9ebeaf38ec7fafd9b9913ac56 # [win]
- - url: https://github.com/python/cpython-source-deps/archive/bzip2-1.0.6.zip # [win]
- folder: externals/bzip2-1.0.6 # [win]
- sha256: c42fd1432a2667b964a74bc423bb7485059c4a6d5dc92946d59dbf9a6bdb988d # [win]
- - url: https://github.com/python/cpython-source-deps/archive/zlib-1.2.11.zip # [win]
- folder: externals/zlib-1.2.11 # [win]
- sha256: debb1952945fa6c25817a40abe90641b572c83171f244937b70b9fe156f5a63a # [win]
- - url: https://github.com/python/cpython-bin-deps/archive/nasm-2.11.06.zip # [win]
- folder: externals/nasm-2.11.06 # [win]
- sha256: de3c87b26a80e789986d8e6950c6304175d3829afe9c6c7211eb7257266ab0ac # [win]
- - url: https://github.com/python/cpython-bin-deps/archive/libffi.zip # [win]
- folder: externals/libffi # [win]
- sha256: 4872e72e188a5aa1124db0c3b163a4163e84ead359a514d86dd7c6fa2d2ff02a # [win]
+ - patches/0001-Win32-Change-FD_SETSIZE-from-512-to-2048.patch
+ - patches/0002-Win32-distutils-Add-support-to-cygwinccompiler-for-V.patch
+ - patches/0003-Support-cross-compiling-byte-code.patch
+ # https://github.com/python/cpython/pull/28501
+ - patches/0004-bpo-45258-search-for-isysroot-in-addition-to-sysroot.patch
+ # https://github.com/pypa/distutils/pull/54
+ - patches/0005-runtime_library_dir_option-Use-1st-word-of-CC-as-com.patch
+ - patches/0006-Win32-Do-not-download-externals.patch
+ - patches/0007-Fix-find_library-so-that-it-looks-in-sys.prefix-lib-.patch
+ # https://github.com/python/cpython/pull/28397
+ - patches/0008-bpo-22699-Allow-compiling-on-debian-ubuntu-with-a-di.patch
+ - patches/0009-Disable-registry-lookup-unless-CONDA_PY_ALLOW_REG_PA.patch
+ - patches/0010-Unvendor-openssl.patch
+ - patches/0011-Unvendor-sqlite3.patch
+ - patches/0012-venv-Revert-a-change-from-https-github.com-python-cp.patch
+ # https://github.com/pypa/distutils/pull/53
+ - patches/0013-Use-ranlib-from-env-if-env-variable-is-set.patch
+ - patches/0014-Add-CondaEcosystemModifyDllSearchPath.patch
+ - patches/0015-Add-d1trimfile-SRC_DIR-to-make-pdbs-more-relocatable.patch
+ - patches/0016-Doing-d1trimfile.patch
+ # https://github.com/python/cpython/pull/23523
+ - patches/0017-cross-compile-darwin.patch
+ - patches/0018-Fix-TZPATH-on-windows.patch
+ # https://github.com/python/cpython/pull/24324
+ - patches/0019-Make-dyld-search-work-with-SYSTEM_VERSION_COMPAT-1.patch
+ # https://github.com/pypa/distutils/pull/53
+ - patches/0020-Fix-LDSHARED-when-CC-is-overriden-on-Linux-too.patch
+ - patches/0021-Unvendor-bzip2.patch
+ - patches/0022-Unvendor-libffi.patch
+ - patches/0023-Unvendor-tcltk.patch
+ - patches/0024-unvendor-xz.patch
+ - patches/0025-unvendor-zlib.patch
build:
number: {{ build_number }}
@@ -136,10 +108,8 @@ outputs:
no_link:
- DLLs/_ctypes.pyd # [win]
ignore_run_exports_from: # [unix]
- # We delete the shared bzip2 library
- - bzip2 # [unix]
# C++ only installed so CXX is defined for distutils/sysconfig.
- - {{ compiler('cxx') }}
+ - {{ compiler('cxx') }} # [unix]
# Disabled until verified to work correctly
detect_binary_files_with_prefix: true
# detect_binary_files_with_prefix: False
@@ -154,7 +124,7 @@ outputs:
# match python.org compiler standard
skip: true # [win and int(float(vc)) < 14]
skip_compile_pyc:
- - '*.py' # [osx and arm64]
+ - '*.py' # [build_platform != target_platform]
string: {{ dev_ }}h{{ PKG_HASH }}_{{ PKG_BUILDNUM }}{{ linkage_nature }}{{ debug }}_cpython # ["conda-forge" in (channel_targets or "")]
string: h{{ PKG_HASH }}_{{ PKG_BUILDNUM }}{{ linkage_nature }}{{ debug }} # ["conda-forge" not in (channel_targets or "")]
{% if 'conda-forge' in channel_targets %}
@@ -188,7 +158,6 @@ outputs:
- {{ compiler('cxx') }}
- {{ cdt('xorg-x11-proto-devel') }} # [linux]
- {{ cdt('libx11-devel') }} # [linux]
- - {{ cdt('libuuid-devel') }} # [linux and not (ppc64le or aarch64)]
- make # [not win]
- libtool # [unix]
- pkg-config # [not win]
@@ -199,28 +168,29 @@ outputs:
- binutils_impl_{{ target_platform }} # [linux]
{% endif %}
host:
- - bzip2 # [not win]
+ - bzip2
- sqlite
- - xz # [not win]
- - zlib # [not win]
+ - xz
+ - zlib
- openssl
- readline # [not win]
- - tk # [not win]
+ - tk
- ncurses # [unix]
- - libffi # [not (win or (osx and arm64))]
+ - libffi
- ld_impl_{{ target_platform }} >=2.36.1 # [linux]
+ - libuuid # [linux]
run:
- ld_impl_{{ target_platform }} >=2.36.1 # [linux]
- tzdata
{% if 'conda-forge' in channel_targets %}
- - ncurses # [unix]
run_constrained:
- python_abi {{ ver2 }}.* *_cp{{ ver2nd }}
{% endif %}
test:
downstreams:
- - cython
- - setuptools
+ # Temporarily disable dowmstream tests on aarch64 as the solver causes timeouts on drone
+ - cython # [not aarch64]
+ - setuptools # [not aarch64]
requires:
- ripgrep
- cmake
@@ -233,6 +203,7 @@ outputs:
- tests/cmake/*
- tests/cython/*
- tests/prefix-replacement/*
+ - run_test.py
commands:
- echo on # [win]
- set # [win]
@@ -281,6 +252,7 @@ outputs:
# --trace --debug-output --debug-trycompile .
- popd
- popd
+ - python run_test.py
- test ! -f default.profraw # [osx]
- name: libpython-static
@@ -305,10 +277,17 @@ outputs:
run:
- {{ pin_subpackage('python', exact=True) }}
test:
+ files:
+ - tests/prefix-replacement/*
+ requires:
+ - {{ compiler('c') }}
commands:
- test -f ${PREFIX}/lib/libpython${PKG_VERSION%.*}.a # [unix]
- test -f ${PREFIX}/lib/libpython${PKG_VERSION%.*}.nolto.a # [unix]
- test -f ${PREFIX}/lib/python${PKG_VERSION%.*}/config-${PKG_VERSION%.*}-darwin/libpython${PKG_VERSION%.*}.a # [osx]
+ - pushd tests/prefix-replacement # [unix]
+ - bash build-and-test.sh # [unix]
+ - popd # [unix]
about:
home: https://www.python.org/
diff --git a/recipe/patches/0000-Fix-off-by-one-error-in-_winapi_WaitForMultipleObjec.patch b/recipe/patches/0000-Fix-off-by-one-error-in-_winapi_WaitForMultipleObjec.patch
deleted file mode 100644
index 1d80421ff..000000000
--- a/recipe/patches/0000-Fix-off-by-one-error-in-_winapi_WaitForMultipleObjec.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From d2bec7fa299be363c0c6dab461b6d3172539675b Mon Sep 17 00:00:00 2001
-From: Ray Donnelly
-Date: Sun, 12 Apr 2020 18:22:21 +0200
-Subject: [PATCH 00/30] Fix off-by-one-error in
- _winapi_WaitForMultipleObjects_impl
-
----
- Modules/_winapi.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/Modules/_winapi.c b/Modules/_winapi.c
-index e1672c4785..4206bb6c49 100644
---- a/Modules/_winapi.c
-+++ b/Modules/_winapi.c
-@@ -1713,7 +1713,7 @@ _winapi_WaitForMultipleObjects_impl(PyObject *module, PyObject *handle_seq,
- nhandles = PySequence_Length(handle_seq);
- if (nhandles == -1)
- return NULL;
-- if (nhandles < 0 || nhandles >= MAXIMUM_WAIT_OBJECTS - 1) {
-+ if (nhandles < 0 || nhandles > MAXIMUM_WAIT_OBJECTS - 1) {
- PyErr_Format(PyExc_ValueError,
- "need at most %zd handles, got a sequence of length %zd",
- MAXIMUM_WAIT_OBJECTS - 1, nhandles);
---
-2.23.0
-
diff --git a/recipe/patches/0001-Darwin-Add-arch-x86_64-to-UnicCCompiler-ld_args.patch b/recipe/patches/0001-Darwin-Add-arch-x86_64-to-UnicCCompiler-ld_args.patch
deleted file mode 100644
index 5f4d8b80c..000000000
--- a/recipe/patches/0001-Darwin-Add-arch-x86_64-to-UnicCCompiler-ld_args.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From 0fcc174b9cef0d93ebf1c95fd942c1368132cfdc Mon Sep 17 00:00:00 2001
-From: Ray Donnelly
-Date: Wed, 16 Aug 2017 08:48:16 +0100
-Subject: [PATCH 02/22] Darwin: Add -arch x86_64 to UnicCCompiler ld_args
-
----
- Lib/distutils/unixccompiler.py | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/Lib/distutils/unixccompiler.py b/Lib/distutils/unixccompiler.py
-index 4d7a6de..3f05cf7 100644
---- a/Lib/distutils/unixccompiler.py
-+++ b/Lib/distutils/unixccompiler.py
-@@ -200,6 +200,8 @@ class UnixCCompiler(CCompiler):
-
- if sys.platform == 'darwin':
- linker = _osx_support.compiler_fixup(linker, ld_args)
-+ from distutils.util import get_host_platform
-+ ld_args = ['-arch', get_host_platform().split("-")[-1]] + ld_args
-
- self.spawn(linker + ld_args)
- except DistutilsExecError as msg:
---
-2.20.1
-
diff --git a/recipe/patches/0002-Win32-Change-FD_SETSIZE-from-512-to-2048.patch b/recipe/patches/0001-Win32-Change-FD_SETSIZE-from-512-to-2048.patch
similarity index 77%
rename from recipe/patches/0002-Win32-Change-FD_SETSIZE-from-512-to-2048.patch
rename to recipe/patches/0001-Win32-Change-FD_SETSIZE-from-512-to-2048.patch
index 148843bc8..9b0eca3c5 100644
--- a/recipe/patches/0002-Win32-Change-FD_SETSIZE-from-512-to-2048.patch
+++ b/recipe/patches/0001-Win32-Change-FD_SETSIZE-from-512-to-2048.patch
@@ -1,7 +1,7 @@
-From d637f41485e2e8e0b09ba241d664f2bda765c62c Mon Sep 17 00:00:00 2001
+From a76714ae299694b57534636be2ae9f2218faa60f Mon Sep 17 00:00:00 2001
From: Ray Donnelly
Date: Wed, 16 Aug 2017 11:53:55 +0100
-Subject: [PATCH 02/30] Win32: Change FD_SETSIZE from 512 to 2048
+Subject: [PATCH 01/25] Win32: Change FD_SETSIZE from 512 to 2048
https://github.com/ContinuumIO/anaconda-issues/issues/1241
---
@@ -9,7 +9,7 @@ https://github.com/ContinuumIO/anaconda-issues/issues/1241
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Modules/selectmodule.c b/Modules/selectmodule.c
-index fb71e9196f..57a5c29bb3 100644
+index 3ecd0c32b3..000d1d8bb2 100644
--- a/Modules/selectmodule.c
+++ b/Modules/selectmodule.c
@@ -33,7 +33,7 @@
@@ -22,5 +22,5 @@ index fb71e9196f..57a5c29bb3 100644
#if defined(HAVE_POLL_H)
--
-2.23.0
+2.30.2
diff --git a/recipe/patches/0003-Win32-distutils-Add-support-to-cygwinccompiler-for-V.patch b/recipe/patches/0002-Win32-distutils-Add-support-to-cygwinccompiler-for-V.patch
similarity index 84%
rename from recipe/patches/0003-Win32-distutils-Add-support-to-cygwinccompiler-for-V.patch
rename to recipe/patches/0002-Win32-distutils-Add-support-to-cygwinccompiler-for-V.patch
index e0c8a10b4..35d2fc2f4 100644
--- a/recipe/patches/0003-Win32-distutils-Add-support-to-cygwinccompiler-for-V.patch
+++ b/recipe/patches/0002-Win32-distutils-Add-support-to-cygwinccompiler-for-V.patch
@@ -1,7 +1,7 @@
-From d11ba2d6dbd21931bcc9233a0b553a56781917cf Mon Sep 17 00:00:00 2001
+From 242512d2a1ba65723c0f19a0a45cb895404bd8db Mon Sep 17 00:00:00 2001
From: Ray Donnelly
Date: Wed, 16 Aug 2017 11:59:00 +0100
-Subject: [PATCH 03/30] Win32: distutils: Add support to cygwinccompiler for
+Subject: [PATCH 02/25] Win32: distutils: Add support to cygwinccompiler for
VS>=2015
Really this is for mingw-w64 though
@@ -24,5 +24,5 @@ index 66c12dd358..e6c790118b 100644
raise ValueError("Unknown MS Compiler version %s " % msc_ver)
--
-2.23.0
+2.30.2
diff --git a/recipe/patches/0005-Support-cross-compiling-byte-code.patch b/recipe/patches/0003-Support-cross-compiling-byte-code.patch
similarity index 86%
rename from recipe/patches/0005-Support-cross-compiling-byte-code.patch
rename to recipe/patches/0003-Support-cross-compiling-byte-code.patch
index ee2fb8a33..e5f33d51f 100644
--- a/recipe/patches/0005-Support-cross-compiling-byte-code.patch
+++ b/recipe/patches/0003-Support-cross-compiling-byte-code.patch
@@ -1,7 +1,7 @@
-From ee0faacf1f8c46e331e537ca1c5eded2fc0b9783 Mon Sep 17 00:00:00 2001
+From b7337c800cefefc6b6191ca8f6a0248aa1018437 Mon Sep 17 00:00:00 2001
From: Ray Donnelly
Date: Wed, 16 Aug 2017 12:17:33 +0100
-Subject: [PATCH 05/30] Support cross-compiling byte-code
+Subject: [PATCH 03/25] Support cross-compiling byte-code
https://bugs.python.org/issue22724
---
@@ -11,18 +11,18 @@ https://bugs.python.org/issue22724
3 files changed, 13 insertions(+), 8 deletions(-)
diff --git a/Makefile.pre.in b/Makefile.pre.in
-index 77f91e72b1..5bebe06f1d 100644
+index 790d974b96..b851467f38 100644
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
-@@ -253,6 +253,7 @@ BUILDPYTHON= python$(BUILDEXE)
+@@ -262,6 +262,7 @@ BUILDPYTHON= python$(BUILDEXE)
PYTHON_FOR_REGEN?=@PYTHON_FOR_REGEN@
- UPDATE_FILE=@PYTHON_FOR_REGEN@ $(srcdir)/Tools/scripts/update_file.py
+ UPDATE_FILE=$(PYTHON_FOR_REGEN) $(srcdir)/Tools/scripts/update_file.py
+PY_BUILD_ENVIRON=@PY_BUILD_ENVIRON@
PYTHON_FOR_BUILD=@PYTHON_FOR_BUILD@
_PYTHON_HOST_PLATFORM=@_PYTHON_HOST_PLATFORM@
BUILD_GNU_TYPE= @build@
-@@ -590,7 +591,7 @@ $(BUILDPYTHON): Programs/python.o $(LIBRARY) $(LDLIBRARY) $(PY3LIBRARY) $(EXPORT
+@@ -590,7 +591,7 @@ $(BUILDPYTHON): Programs/python.o $(LIBRARY_DEPS)
$(LINKCC) $(PY_CORE_LDFLAGS) $(LINKFORSHARED) -o $@ Programs/python.o $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS)
platform: $(BUILDPYTHON) pybuilddir.txt
@@ -49,7 +49,7 @@ index 77f91e72b1..5bebe06f1d 100644
# Build static library
-@@ -1244,7 +1245,7 @@ install: @FRAMEWORKINSTALLFIRST@ commoninstall bininstall maninstall @FRAMEWORKI
+@@ -1271,7 +1272,7 @@ install: @FRAMEWORKINSTALLFIRST@ commoninstall bininstall maninstall @FRAMEWORKI
upgrade) ensurepip="--upgrade" ;; \
install|*) ensurepip="" ;; \
esac; \
@@ -58,7 +58,7 @@ index 77f91e72b1..5bebe06f1d 100644
$$ensurepip --root=$(DESTDIR)/ ; \
fi
-@@ -1254,7 +1255,7 @@ altinstall: commoninstall
+@@ -1281,7 +1282,7 @@ altinstall: commoninstall
upgrade) ensurepip="--altinstall --upgrade" ;; \
install|*) ensurepip="--altinstall" ;; \
esac; \
@@ -67,7 +67,7 @@ index 77f91e72b1..5bebe06f1d 100644
$$ensurepip --root=$(DESTDIR)/ ; \
fi
-@@ -1672,7 +1673,7 @@ libainstall: @DEF_MAKE_RULE@ python-config
+@@ -1747,7 +1748,7 @@ libainstall: @DEF_MAKE_RULE@ python-config
# Install the dynamically loadable modules
# This goes into $(exec_prefix)
sharedinstall: sharedmods
@@ -77,10 +77,10 @@ index 77f91e72b1..5bebe06f1d 100644
--install-scripts=$(BINDIR) \
--install-platlib=$(DESTSHARED) \
diff --git a/configure b/configure
-index ac5cc21dcc..a8e2400a15 100755
+index 1baa145e3e..f227dd88c0 100755
--- a/configure
+++ b/configure
-@@ -754,6 +754,7 @@ CONFIG_ARGS
+@@ -758,6 +758,7 @@ CONFIG_ARGS
SOVERSION
VERSION
PYTHON_FOR_BUILD
@@ -88,7 +88,7 @@ index ac5cc21dcc..a8e2400a15 100755
PYTHON_FOR_REGEN
host_os
host_vendor
-@@ -2977,7 +2978,8 @@ $as_echo_n "checking for python interpreter for cross build... " >&6; }
+@@ -3009,7 +3010,8 @@ $as_echo_n "checking for python interpreter for cross build... " >&6; }
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
$as_echo "$interp" >&6; }
@@ -99,10 +99,10 @@ index ac5cc21dcc..a8e2400a15 100755
elif test "$cross_compiling" = maybe; then
as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
diff --git a/configure.ac b/configure.ac
-index a8135f1d8e..e178d1fb54 100644
+index 3e6c07c279..f70a69b2f9 100644
--- a/configure.ac
+++ b/configure.ac
-@@ -75,13 +75,15 @@ if test "$cross_compiling" = yes; then
+@@ -82,13 +82,15 @@ if test "$cross_compiling" = yes; then
AC_MSG_ERROR([python$PACKAGE_VERSION interpreter not found])
fi
AC_MSG_RESULT($interp)
@@ -120,5 +120,5 @@ index a8135f1d8e..e178d1fb54 100644
dnl Ensure that if prefix is specified, it does not end in a slash. If
--
-2.23.0
+2.30.2
diff --git a/recipe/patches/0004-Do-not-pass-g-to-GCC-when-not-Py_DEBUG.patch b/recipe/patches/0004-Do-not-pass-g-to-GCC-when-not-Py_DEBUG.patch
deleted file mode 100644
index b1b848a33..000000000
--- a/recipe/patches/0004-Do-not-pass-g-to-GCC-when-not-Py_DEBUG.patch
+++ /dev/null
@@ -1,52 +0,0 @@
-From 583b390991261cf651032b7144d3054befd22d81 Mon Sep 17 00:00:00 2001
-From: Ray Donnelly
-Date: Wed, 16 Aug 2017 11:45:28 +0100
-Subject: [PATCH 04/30] Do not pass -g to GCC when not Py_DEBUG
-
-This bloats our exe and our modules a lot.
----
- configure | 6 +++---
- configure.ac | 2 +-
- 2 files changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/configure b/configure
-index 9e6fd46583..ac5cc21dcc 100755
---- a/configure
-+++ b/configure
-@@ -4261,9 +4261,9 @@ if test "$ac_test_CFLAGS" = set; then
- CFLAGS=$ac_save_CFLAGS
- elif test $ac_cv_prog_cc_g = yes; then
- if test "$GCC" = yes; then
-- CFLAGS="-g -O2"
-+ CFLAGS="-O2"
- else
-- CFLAGS="-g"
-+ CFLAGS=
- fi
- else
- if test "$GCC" = yes; then
-@@ -6930,7 +6930,7 @@ then
- OPT="-g -O0 -Wall"
- fi
- else
-- OPT="-g $WRAP -O3 -Wall"
-+ OPT="$WRAP -O3 -Wall"
- fi
- ;;
- *)
-diff --git a/configure.ac b/configure.ac
-index d60f05251a..a8135f1d8e 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -1563,7 +1563,7 @@ then
- OPT="-g -O0 -Wall"
- fi
- else
-- OPT="-g $WRAP -O3 -Wall"
-+ OPT="$WRAP -O3 -Wall"
- fi
- ;;
- *)
---
-2.23.0
-
diff --git a/recipe/patches/0004-bpo-45258-search-for-isysroot-in-addition-to-sysroot.patch b/recipe/patches/0004-bpo-45258-search-for-isysroot-in-addition-to-sysroot.patch
new file mode 100644
index 000000000..3955b4a61
--- /dev/null
+++ b/recipe/patches/0004-bpo-45258-search-for-isysroot-in-addition-to-sysroot.patch
@@ -0,0 +1,27 @@
+From be83588c9ada973ddd037d050b60c532be82d200 Mon Sep 17 00:00:00 2001
+From: Isuru Fernando
+Date: Tue, 21 Sep 2021 13:05:20 -0500
+Subject: [PATCH 04/25] bpo-45258: search for -isysroot in addition to
+ --sysroot
+
+-isysroot is for macOS, while --sysroot is for gcc/linux
+---
+ setup.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/setup.py b/setup.py
+index 3d250e7249..8fb8ea5c47 100644
+--- a/setup.py
++++ b/setup.py
+@@ -160,7 +160,7 @@ def sysroot_paths(make_vars, subdirs):
+ for var_name in make_vars:
+ var = sysconfig.get_config_var(var_name)
+ if var is not None:
+- m = re.search(r'--sysroot=([^"]\S*|"[^"]+")', var)
++ m = re.search(r'(?:--sysroot|-isysroot)=([^"]\S*|"[^"]+")', var)
+ if m is not None:
+ sysroot = m.group(1).strip('"')
+ for subdir in subdirs:
+--
+2.30.2
+
diff --git a/recipe/patches/0008-runtime_library_dir_option-Use-1st-word-of-CC-as-com.patch b/recipe/patches/0005-runtime_library_dir_option-Use-1st-word-of-CC-as-com.patch
similarity index 66%
rename from recipe/patches/0008-runtime_library_dir_option-Use-1st-word-of-CC-as-com.patch
rename to recipe/patches/0005-runtime_library_dir_option-Use-1st-word-of-CC-as-com.patch
index 2cf82e986..83cda288e 100644
--- a/recipe/patches/0008-runtime_library_dir_option-Use-1st-word-of-CC-as-com.patch
+++ b/recipe/patches/0005-runtime_library_dir_option-Use-1st-word-of-CC-as-com.patch
@@ -1,29 +1,30 @@
-From d931b85e44bb5f2aff68f1504ff1aeca76b8f56c Mon Sep 17 00:00:00 2001
+From cd6889b235274585ae4beff8fd655aefb66bf094 Mon Sep 17 00:00:00 2001
From: Ray Donnelly
Date: Thu, 5 Oct 2017 02:00:41 +0100
-Subject: [PATCH 08/30] runtime_library_dir_option: Use 1st word of CC as
+Subject: [PATCH 05/25] runtime_library_dir_option: Use 1st word of CC as
compiler
Previous, 'CC' got passed to os.path.basename, so any paths in it after
the executable name would get returned as the executable and it would
not get detected as gcc (or whatever it actually is).
---
- Lib/distutils/unixccompiler.py | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
+ Lib/distutils/unixccompiler.py | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/Lib/distutils/unixccompiler.py b/Lib/distutils/unixccompiler.py
-index 3f05cf7f8c..84a421767d 100644
+index f0792de74a..2445a5f348 100644
--- a/Lib/distutils/unixccompiler.py
+++ b/Lib/distutils/unixccompiler.py
-@@ -232,7 +232,7 @@ class UnixCCompiler(CCompiler):
+@@ -231,7 +231,8 @@ def runtime_library_dir_option(self, dir):
# this time, there's no way to determine this information from
# the configuration data stored in the Python installation, so
# we use this hack.
- compiler = os.path.basename(sysconfig.get_config_var("CC"))
-+ compiler = os.path.basename(sysconfig.get_config_var("CC").split()[0])
++ import shlex
++ compiler = os.path.basename(shlex.split(sysconfig.get_config_var("CC"))[0])
if sys.platform[:6] == "darwin":
# MacOSX's linker doesn't understand the -R flag at all
return "-L" + dir
--
-2.23.0
+2.30.2
diff --git a/recipe/patches/0009-Win32-Do-not-download-externals.patch b/recipe/patches/0006-Win32-Do-not-download-externals.patch
similarity index 80%
rename from recipe/patches/0009-Win32-Do-not-download-externals.patch
rename to recipe/patches/0006-Win32-Do-not-download-externals.patch
index 5856c59fd..8ebd49614 100644
--- a/recipe/patches/0009-Win32-Do-not-download-externals.patch
+++ b/recipe/patches/0006-Win32-Do-not-download-externals.patch
@@ -1,14 +1,14 @@
-From 36c19e43a2e4abb941d11eee48e321d24f3b56d3 Mon Sep 17 00:00:00 2001
+From e6438fb56d985fe8d97d3a552151f052859cd9c4 Mon Sep 17 00:00:00 2001
From: Ray Donnelly
Date: Thu, 7 Sep 2017 11:35:47 +0100
-Subject: [PATCH 09/30] Win32: Do not download externals
+Subject: [PATCH 06/25] Win32: Do not download externals
---
PCbuild/build.bat | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/PCbuild/build.bat b/PCbuild/build.bat
-index ba7154d8cb..4416597ed9 100644
+index d333ceabd2..11e3d16a4f 100644
--- a/PCbuild/build.bat
+++ b/PCbuild/build.bat
@@ -97,7 +97,7 @@ if "%IncludeCTypes%"=="" set IncludeCTypes=true
@@ -21,5 +21,5 @@ index ba7154d8cb..4416597ed9 100644
if "%do_pgo%" EQU "true" if "%platf%" EQU "x64" (
if "%PROCESSOR_ARCHITEW6432%" NEQ "AMD64" if "%PROCESSOR_ARCHITECTURE%" NEQ "AMD64" (
--
-2.23.0
+2.30.2
diff --git a/recipe/patches/0006-Win32-Fixes-for-Windows-GCC-interop-needed-by-RPy2-a.patch b/recipe/patches/0006-Win32-Fixes-for-Windows-GCC-interop-needed-by-RPy2-a.patch
deleted file mode 100644
index 2007bc203..000000000
--- a/recipe/patches/0006-Win32-Fixes-for-Windows-GCC-interop-needed-by-RPy2-a.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From 4c935f04b47027b4cc15b7bb899e03eab41d34bf Mon Sep 17 00:00:00 2001
-From: Ray Donnelly
-Date: Wed, 16 Aug 2017 12:23:02 +0100
-Subject: [PATCH 06/30] Win32: Fixes for Windows GCC interop needed by RPy2 and
- CVXOPT
-
-We must pass -DMS_WIN32 or -DMS_WIN64
----
- Lib/distutils/cygwinccompiler.py | 10 +++++++---
- 1 file changed, 7 insertions(+), 3 deletions(-)
-
-diff --git a/Lib/distutils/cygwinccompiler.py b/Lib/distutils/cygwinccompiler.py
-index e6c790118b..d4337669e3 100644
---- a/Lib/distutils/cygwinccompiler.py
-+++ b/Lib/distutils/cygwinccompiler.py
-@@ -300,9 +300,13 @@ class Mingw32CCompiler(CygwinCCompiler):
- raise CCompilerError(
- 'Cygwin gcc cannot be used with --compiler=mingw32')
-
-- self.set_executables(compiler='gcc -O -Wall',
-- compiler_so='gcc -mdll -O -Wall',
-- compiler_cxx='g++ -O -Wall',
-+ if sys.maxsize == 2**31 - 1:
-+ ms_win=' -DMS_WIN32'
-+ else:
-+ ms_win=' -DMS_WIN64'
-+ self.set_executables(compiler='gcc -O -Wall'+ms_win,
-+ compiler_so='gcc -mdll -O -Wall'+ms_win,
-+ compiler_cxx='g++ -O -Wall'+ms_win,
- linker_exe='gcc',
- linker_so='%s %s %s'
- % (self.linker_dll, shared_option,
---
-2.23.0
-
diff --git a/recipe/patches/0007-Darwin-Look-in-sysroot-usr-lib-include-if-sysroot-is.patch b/recipe/patches/0007-Darwin-Look-in-sysroot-usr-lib-include-if-sysroot-is.patch
deleted file mode 100644
index cfeeb14ca..000000000
--- a/recipe/patches/0007-Darwin-Look-in-sysroot-usr-lib-include-if-sysroot-is.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From fee618d990e4d7effcec92085d2fdcf414a933a8 Mon Sep 17 00:00:00 2001
-From: Ray Donnelly
-Date: Sun, 20 Aug 2017 00:22:22 +0100
-Subject: [PATCH 07/30] Darwin: Look in ${sysroot}/usr/{lib,include} if sysroot
- is set
-
----
- setup.py | 8 +++++++-
- 1 file changed, 7 insertions(+), 1 deletion(-)
-
-diff --git a/setup.py b/setup.py
-index 770866bca7..41cd6e171c 100644
---- a/setup.py
-+++ b/setup.py
-@@ -770,7 +770,13 @@ class PyBuildExt(build_ext):
- # lib_dirs and inc_dirs are used to search for files;
- # if a file is found in one of those directories, it can
- # be assumed that no additional -I,-L directives are needed.
-- if not CROSS_COMPILING:
-+ # If we are using a macosx sysroot then ensure we look in
-+ # sysroot/usr/{lib,include} (irrespective of whether we consider
-+ # this cross_compiling or not).
-+ if macosx_sdk_root() != '/':
-+ self.lib_dirs = self.compiler.library_dirs + ['/usr/lib']
-+ self.inc_dirs = self.compiler.include_dirs + ['/usr/include']
-+ elif not CROSS_COMPILING:
- self.lib_dirs = self.compiler.library_dirs + system_lib_dirs
- self.inc_dirs = self.compiler.include_dirs + system_include_dirs
- else:
---
-2.23.0
-
diff --git a/recipe/patches/0011-Fix-find_library-so-that-it-looks-in-sys.prefix-lib-.patch b/recipe/patches/0007-Fix-find_library-so-that-it-looks-in-sys.prefix-lib-.patch
similarity index 88%
rename from recipe/patches/0011-Fix-find_library-so-that-it-looks-in-sys.prefix-lib-.patch
rename to recipe/patches/0007-Fix-find_library-so-that-it-looks-in-sys.prefix-lib-.patch
index 0572de154..7bf69f888 100644
--- a/recipe/patches/0011-Fix-find_library-so-that-it-looks-in-sys.prefix-lib-.patch
+++ b/recipe/patches/0007-Fix-find_library-so-that-it-looks-in-sys.prefix-lib-.patch
@@ -1,7 +1,7 @@
-From 70e40f6858ac8da70d91869b28792cd5a1e8f076 Mon Sep 17 00:00:00 2001
+From cc6f65d61a003a856b17f89bb414d14036dfbc39 Mon Sep 17 00:00:00 2001
From: Ray Donnelly
Date: Tue, 5 Dec 2017 22:47:59 +0000
-Subject: [PATCH 11/30] Fix find_library so that it looks in sys.prefix/lib
+Subject: [PATCH 07/25] Fix find_library so that it looks in sys.prefix/lib
first
---
@@ -10,10 +10,10 @@ Subject: [PATCH 11/30] Fix find_library so that it looks in sys.prefix/lib
2 files changed, 28 insertions(+), 3 deletions(-)
diff --git a/Lib/ctypes/macholib/dyld.py b/Lib/ctypes/macholib/dyld.py
-index 9d86b05876..9ab447c0a1 100644
+index 1c3f8fd38b..82a4b4fd58 100644
--- a/Lib/ctypes/macholib/dyld.py
+++ b/Lib/ctypes/macholib/dyld.py
-@@ -88,6 +88,10 @@ def dyld_executable_path_search(name, executable_path=None):
+@@ -93,6 +93,10 @@ def dyld_executable_path_search(name, executable_path=None):
# If we haven't done any searching and found a library and the
# dylib_name starts with "@executable_path/" then construct the
# library name.
@@ -25,10 +25,10 @@ index 9d86b05876..9ab447c0a1 100644
yield os.path.join(executable_path, name[len('@executable_path/'):])
diff --git a/Lib/ctypes/util.py b/Lib/ctypes/util.py
-index 01176bf969..b80dc43b4f 100644
+index 0c2510e161..72b46cc481 100644
--- a/Lib/ctypes/util.py
+++ b/Lib/ctypes/util.py
-@@ -70,7 +70,8 @@ if os.name == "nt":
+@@ -70,7 +70,8 @@ def find_library(name):
elif os.name == "posix" and sys.platform == "darwin":
from ctypes.macholib.dyld import dyld_find as _dyld_find
def find_library(name):
@@ -38,7 +38,7 @@ index 01176bf969..b80dc43b4f 100644
'%s.dylib' % name,
'%s.framework/%s' % (name, name)]
for name in possible:
-@@ -324,10 +325,30 @@ elif os.name == "posix":
+@@ -324,10 +325,30 @@ def _findLib_ld(name):
pass # result will be None
return result
@@ -72,5 +72,5 @@ index 01176bf969..b80dc43b4f 100644
################################################################
# test code
--
-2.23.0
+2.30.2
diff --git a/recipe/patches/0008-bpo-22699-Allow-compiling-on-debian-ubuntu-with-a-di.patch b/recipe/patches/0008-bpo-22699-Allow-compiling-on-debian-ubuntu-with-a-di.patch
new file mode 100644
index 000000000..4a6443b94
--- /dev/null
+++ b/recipe/patches/0008-bpo-22699-Allow-compiling-on-debian-ubuntu-with-a-di.patch
@@ -0,0 +1,48 @@
+From 3fcffbb0e129478332491a9906386b2a7834be4c Mon Sep 17 00:00:00 2001
+From: Isuru Fernando
+Date: Thu, 16 Sep 2021 15:46:09 -0500
+Subject: [PATCH 08/25] bpo-22699: Allow compiling on debian/ubuntu with a
+ different compiler
+
+This PR fixes one issue mentioned in the bpo
+https://bugs.python.org/issue22699#msg364685 with a slightly better
+patch than given
+---
+ setup.py | 19 ++++++++++++++++++-
+ 1 file changed, 18 insertions(+), 1 deletion(-)
+
+diff --git a/setup.py b/setup.py
+index 8fb8ea5c47..783d20bdcd 100644
+--- a/setup.py
++++ b/setup.py
+@@ -663,9 +663,26 @@ def add_multiarch_paths(self):
+ # Debian/Ubuntu multiarch support.
+ # https://wiki.ubuntu.com/MultiarchSpec
+ cc = sysconfig.get_config_var('CC')
+- tmpfile = os.path.join(self.build_temp, 'multiarch')
+ if not os.path.exists(self.build_temp):
+ os.makedirs(self.build_temp)
++
++ tmpfile_sysroot = os.path.join(self.build_temp, 'sysroot')
++ ret_sysroot = run_command(
++ '%s -print-sysroot > %s 2> /dev/null' % (cc, tmpfile_sysroot))
++
++ try:
++ if ret_sysroot == 0:
++ with open(tmpfile_sysroot) as fp:
++ sysroot = fp.readline().strip()
++ # if the sysroot is not /, then we are not using
++ # the compiler from debian/ubuntu
++ if sysroot not in ['', '/']:
++ return
++ finally:
++ os.unlink(tmpfile_sysroot)
++
++ tmpfile = os.path.join(self.build_temp, 'multiarch')
++
+ ret = run_command(
+ '%s -print-multiarch > %s 2> /dev/null' % (cc, tmpfile))
+ multiarch_path_component = ''
+--
+2.30.2
+
diff --git a/recipe/patches/0014-Disable-registry-lookup-unless-CONDA_PY_ALLOW_REG_PA.patch b/recipe/patches/0009-Disable-registry-lookup-unless-CONDA_PY_ALLOW_REG_PA.patch
similarity index 88%
rename from recipe/patches/0014-Disable-registry-lookup-unless-CONDA_PY_ALLOW_REG_PA.patch
rename to recipe/patches/0009-Disable-registry-lookup-unless-CONDA_PY_ALLOW_REG_PA.patch
index b8f518eb0..d95abde04 100644
--- a/recipe/patches/0014-Disable-registry-lookup-unless-CONDA_PY_ALLOW_REG_PA.patch
+++ b/recipe/patches/0009-Disable-registry-lookup-unless-CONDA_PY_ALLOW_REG_PA.patch
@@ -1,7 +1,7 @@
-From a137ff9cf74e0e27414a0d0b440ba994d2844cd5 Mon Sep 17 00:00:00 2001
+From 4da2bd8d4c8c048b4ccf393550438f770e5263b6 Mon Sep 17 00:00:00 2001
From: Ray Donnelly
Date: Sat, 27 Oct 2018 18:48:30 +0100
-Subject: [PATCH 14/30] Disable registry lookup unless CONDA_PY_ALLOW_REG_PATHS
+Subject: [PATCH 09/25] Disable registry lookup unless CONDA_PY_ALLOW_REG_PATHS
is not 0
---
@@ -9,7 +9,7 @@ Subject: [PATCH 14/30] Disable registry lookup unless CONDA_PY_ALLOW_REG_PATHS
1 file changed, 10 insertions(+), 5 deletions(-)
diff --git a/PC/getpathp.c b/PC/getpathp.c
-index 53da3a6d05..3fc90067c5 100644
+index 603a1eb13c..0792704a25 100644
--- a/PC/getpathp.c
+++ b/PC/getpathp.c
@@ -779,13 +779,18 @@ calculate_module_search_path(PyCalculatePath *calculate,
@@ -37,5 +37,5 @@ index 53da3a6d05..3fc90067c5 100644
anything better to use! */
int skipdefault = (calculate->pythonpath_env != NULL ||
--
-2.23.0
+2.30.2
diff --git a/recipe/patches/0010-Add-support-for-_CONDA_PYTHON_SYSCONFIGDATA_NAME-if-.patch b/recipe/patches/0010-Add-support-for-_CONDA_PYTHON_SYSCONFIGDATA_NAME-if-.patch
deleted file mode 100644
index 36bb2967a..000000000
--- a/recipe/patches/0010-Add-support-for-_CONDA_PYTHON_SYSCONFIGDATA_NAME-if-.patch
+++ /dev/null
@@ -1,83 +0,0 @@
-From fe6e847bbea130ace6ad0b018ea34adc16914f55 Mon Sep 17 00:00:00 2001
-From: Ray Donnelly
-Date: Sun, 3 Dec 2017 17:31:27 +0000
-Subject: [PATCH 10/30] Add support for _CONDA_PYTHON_SYSCONFIGDATA_NAME if
- _PYTHON_SYSCONFIGDATA_NAME is not set and ignore
- {_CONDA,}_PYTHON_SYSCONFIGDATA_NAME if it does not exist
-
-This is important when bootstrapping a Miniconda (however if you are using
-a Python that pre-dates this change then you will need to apply this patch
-manually).
----
- Lib/distutils/sysconfig.py | 12 +++++++-----
- Lib/sysconfig.py | 24 ++++++++++++++++--------
- 2 files changed, 23 insertions(+), 13 deletions(-)
-
-diff --git a/Lib/distutils/sysconfig.py b/Lib/distutils/sysconfig.py
-index 37feae5df7..f56ebe6c3a 100644
---- a/Lib/distutils/sysconfig.py
-+++ b/Lib/distutils/sysconfig.py
-@@ -439,11 +439,13 @@ def _init_posix():
- """Initialize the module as appropriate for POSIX systems."""
- # _sysconfigdata is generated at build time, see the sysconfig module
- name = os.environ.get('_PYTHON_SYSCONFIGDATA_NAME',
-- '_sysconfigdata_{abi}_{platform}_{multiarch}'.format(
-- abi=sys.abiflags,
-- platform=sys.platform,
-- multiarch=getattr(sys.implementation, '_multiarch', ''),
-- ))
-+ os.environ.get('_CONDA_PYTHON_SYSCONFIGDATA_NAME',
-+ '_sysconfigdata_{abi}_{platform}_{multiarch}'.format(
-+ abi=sys.abiflags,
-+ platform=sys.platform,
-+ multiarch=getattr(sys.implementation, '_multiarch', ''))
-+ )
-+ )
- _temp = __import__(name, globals(), locals(), ['build_time_vars'], 0)
- build_time_vars = _temp.build_time_vars
- global _config_vars
-diff --git a/Lib/sysconfig.py b/Lib/sysconfig.py
-index bf04ac541e..3c971b82c2 100644
---- a/Lib/sysconfig.py
-+++ b/Lib/sysconfig.py
-@@ -341,13 +341,21 @@ def get_makefile_filename():
- return os.path.join(get_path('stdlib'), config_dir_name, 'Makefile')
-
-
--def _get_sysconfigdata_name():
-- return os.environ.get('_PYTHON_SYSCONFIGDATA_NAME',
-- '_sysconfigdata_{abi}_{platform}_{multiarch}'.format(
-- abi=sys.abiflags,
-- platform=sys.platform,
-- multiarch=getattr(sys.implementation, '_multiarch', ''),
-- ))
-+def _get_sysconfigdata_name(check_exists=False):
-+ for envvar in ('_PYTHON_SYSCONFIGDATA_NAME', '_CONDA_PYTHON_SYSCONFIGDATA_NAME'):
-+ res = os.environ.get(envvar, None)
-+ if res and check_exists:
-+ try:
-+ import importlib.util
-+ loader = importlib.util.find_spec(res)
-+ except:
-+ res = None
-+ if res:
-+ return res
-+ return '_sysconfigdata_{abi}_{platform}_{multiarch}'.format(
-+ abi=sys.abiflags,
-+ platform=sys.platform,
-+ multiarch=getattr(sys.implementation, '_multiarch', ''))
-
-
- def _generate_posix_vars():
-@@ -416,7 +424,7 @@ def _generate_posix_vars():
- def _init_posix(vars):
- """Initialize the module as appropriate for POSIX systems."""
- # _sysconfigdata is generated at build time, see _generate_posix_vars()
-- name = _get_sysconfigdata_name()
-+ name = _get_sysconfigdata_name(True)
- _temp = __import__(name, globals(), locals(), ['build_time_vars'], 0)
- build_time_vars = _temp.build_time_vars
- vars.update(build_time_vars)
---
-2.23.0
-
diff --git a/recipe/patches/0010-Unvendor-openssl.patch b/recipe/patches/0010-Unvendor-openssl.patch
new file mode 100644
index 000000000..c4656d55d
--- /dev/null
+++ b/recipe/patches/0010-Unvendor-openssl.patch
@@ -0,0 +1,185 @@
+From 82f58df7b4dae8a1aa548161d8147ea7213d55d4 Mon Sep 17 00:00:00 2001
+From: Nehal J Wani
+Date: Sat, 24 Nov 2018 20:38:02 -0600
+Subject: [PATCH 10/25] Unvendor openssl
+
+Co-authored-by: Isuru Fernando
+---
+ PCbuild/_ssl.vcxproj | 3 --
+ PCbuild/_ssl.vcxproj.filters | 3 --
+ PCbuild/openssl.props | 10 ++-----
+ PCbuild/openssl.vcxproj | 56 ------------------------------------
+ PCbuild/python.props | 1 +
+ PCbuild/python.vcxproj | 3 ++
+ PCbuild/pythonw.vcxproj | 3 ++
+ 7 files changed, 9 insertions(+), 70 deletions(-)
+
+diff --git a/PCbuild/_ssl.vcxproj b/PCbuild/_ssl.vcxproj
+index 4907f49b66..b2c23d5e8c 100644
+--- a/PCbuild/_ssl.vcxproj
++++ b/PCbuild/_ssl.vcxproj
+@@ -99,9 +99,6 @@
+
+
+
+-
+- _CRT_SECURE_NO_WARNINGS;$(PreprocessorDefinitions)
+-
+
+
+
+diff --git a/PCbuild/_ssl.vcxproj.filters b/PCbuild/_ssl.vcxproj.filters
+index 716a69a41a..8aef9e03fc 100644
+--- a/PCbuild/_ssl.vcxproj.filters
++++ b/PCbuild/_ssl.vcxproj.filters
+@@ -12,9 +12,6 @@
+
+ Source Files
+
+-
+- Source Files
+-
+
+
+
+diff --git a/PCbuild/openssl.props b/PCbuild/openssl.props
+index a7e16793c7..f7e9be4d11 100644
+--- a/PCbuild/openssl.props
++++ b/PCbuild/openssl.props
+@@ -2,10 +2,10 @@
+
+
+
+- $(opensslIncludeDir);%(AdditionalIncludeDirectories)
++ $(condaDir)include;%(AdditionalIncludeDirectories)
+
+
+- $(opensslOutDir);%(AdditionalLibraryDirectories)
++ $(condaDir)lib;%(AdditionalLibraryDirectories)
+ ws2_32.lib;libcrypto.lib;libssl.lib;%(AdditionalDependencies)
+
+
+@@ -20,10 +20,4 @@
+ <_SSLDLL Include="$(opensslOutDir)\libssl$(_DLLSuffix).dll" />
+ <_SSLDLL Include="$(opensslOutDir)\libssl$(_DLLSuffix).pdb" />
+
+-
+-
+-
+-
+-
+-
+
+\ No newline at end of file
+diff --git a/PCbuild/openssl.vcxproj b/PCbuild/openssl.vcxproj
+index 0da6f67495..17eee400eb 100644
+--- a/PCbuild/openssl.vcxproj
++++ b/PCbuild/openssl.vcxproj
+@@ -60,64 +60,8 @@
+
+
+
+-
+- $(opensslDir)\tmp$(Bitness)dll
+- $(opensslOutDir)
+- setlocal
+-set VCINSTALLDIR=$(VCInstallDir)
+-if not exist "$(IntDir.TrimEnd('\'))" mkdir "$(IntDir.TrimEnd('\'))"
+-cd /D "$(IntDir.TrimEnd('\'))"
+-$(Perl) "$(opensslDir)\configure" $(OpenSSLPlatform) no-asm
+-nmake
+-
+-
+-
+
+
+-
+-
+- $(opensslDir)\ms\uplink.c
+- ((h = GetModuleHandle(NULL)) == NULL)
+- ((h = GetModuleHandleA("_ssl.pyd")) == NULL) if ((h = GetModuleHandleA("_ssl_d.pyd")) == NULL) if ((h = GetModuleHandle(NULL)) == NULL /*patched*/)
+-
+-
+-
+- <_Original>$([System.IO.File]::ReadAllText($(Uplink)))
+- <_Patched>$(_Original.Replace($(BeforePatch), $(AfterPatch)))
+- false
+- true
+-
+-
+-
+-
+-
+-
+-
+-
+- <_Built Include="$(opensslDir)\LICENSE" />
+- <_Built Include="$(IntDir)\libcrypto.lib;$(IntDir)\libcrypto-*.dll;$(IntDir)\libcrypto-*.pdb" />
+- <_Built Include="$(IntDir)\libssl.lib;$(IntDir)\libssl-*.dll;$(IntDir)\libssl-*.pdb" />
+- <_AppLink Include="$(opensslDir)\ms\applink.c" />
+- <_Include Include="$(opensslDir)\Include\openssl\*.h" />
+- <_Include Include="$(IntDir)\include\openssl\*.h" />
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+
+
+
+diff --git a/PCbuild/python.props b/PCbuild/python.props
+index 42c67de4af..306f4d4658 100644
+--- a/PCbuild/python.props
++++ b/PCbuild/python.props
+@@ -55,6 +55,7 @@
+
+
+ $(EXTERNALS_DIR)
++ $(LIBRARY_PREFIX)\
+ $([System.IO.Path]::GetFullPath(`$(PySourcePath)externals`))
+ $(ExternalsDir)\
+ $(ExternalsDir)sqlite-3.35.5.0\
+diff --git a/PCbuild/python.vcxproj b/PCbuild/python.vcxproj
+index b58945a4d1..5dac66b4d0 100644
+--- a/PCbuild/python.vcxproj
++++ b/PCbuild/python.vcxproj
+@@ -105,6 +105,9 @@
+
+
+
++
++ _CRT_SECURE_NO_WARNINGS;$(PreprocessorDefinitions)
++
+
+
+
+diff --git a/PCbuild/pythonw.vcxproj b/PCbuild/pythonw.vcxproj
+index e7216dec3a..247ea10d5c 100644
+--- a/PCbuild/pythonw.vcxproj
++++ b/PCbuild/pythonw.vcxproj
+@@ -97,6 +97,9 @@
+
+
+
++
++ _CRT_SECURE_NO_WARNINGS;$(PreprocessorDefinitions)
++
+
+
+
+--
+2.30.2
+
diff --git a/recipe/patches/0016-Unvendor-sqlite3.patch b/recipe/patches/0011-Unvendor-sqlite3.patch
similarity index 84%
rename from recipe/patches/0016-Unvendor-sqlite3.patch
rename to recipe/patches/0011-Unvendor-sqlite3.patch
index 02fd67ce2..990233446 100644
--- a/recipe/patches/0016-Unvendor-sqlite3.patch
+++ b/recipe/patches/0011-Unvendor-sqlite3.patch
@@ -1,7 +1,7 @@
-From c3f4e248b58c6d5fc393d1c8b057c99fca3fc5be Mon Sep 17 00:00:00 2001
+From 2ba3c685f214652bc36149c574c16ac68fc37d35 Mon Sep 17 00:00:00 2001
From: Nehal J Wani
-Date: Mon, 10 Dec 2018 12:22:37 -0600
-Subject: [PATCH 16/30] Unvendor sqlite3
+Date: Tue, 5 Oct 2021 12:42:06 -0700
+Subject: [PATCH 11/25] Unvendor sqlite3
---
PCbuild/_sqlite3.vcxproj | 9 ++++-----
@@ -11,16 +11,15 @@ Subject: [PATCH 16/30] Unvendor sqlite3
4 files changed, 11 insertions(+), 14 deletions(-)
diff --git a/PCbuild/_sqlite3.vcxproj b/PCbuild/_sqlite3.vcxproj
-index 7e0062692b..3e7b2262e8 100644
+index 5eb8559d29..fcdee1be60 100644
--- a/PCbuild/_sqlite3.vcxproj
+++ b/PCbuild/_sqlite3.vcxproj
-@@ -93,9 +93,12 @@
+@@ -93,8 +93,11 @@
- $(sqlite3Dir);%(AdditionalIncludeDirectories)
+ $(sqlite3Dir)\include;%(AdditionalIncludeDirectories)
- MODULE_NAME="sqlite3";%(PreprocessorDefinitions)
+
+ $(sqlite3Dir)\lib\sqlite3.lib;%(AdditionalDependencies)
@@ -28,7 +27,7 @@ index 7e0062692b..3e7b2262e8 100644
-@@ -127,10 +130,6 @@
+@@ -126,10 +129,6 @@
{cf7ac3d1-e2df-41d2-bea6-1e2556cdea26}
false
@@ -40,10 +39,10 @@ index 7e0062692b..3e7b2262e8 100644
diff --git a/PCbuild/pcbuild.sln b/PCbuild/pcbuild.sln
-index 4b6dc1e677..19d75c75b8 100644
+index 3507b97279..2b4ac3258c 100644
--- a/PCbuild/pcbuild.sln
+++ b/PCbuild/pcbuild.sln
-@@ -57,8 +57,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "bdist_wininst", "..\PC\bdis
+@@ -55,8 +55,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pyexpat", "pyexpat.vcxproj"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_hashlib", "_hashlib.vcxproj", "{447F05A8-F581-4CAC-A466-5AC7936E207E}"
EndProject
@@ -53,20 +52,20 @@ index 4b6dc1e677..19d75c75b8 100644
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "python3dll", "python3dll.vcxproj", "{885D4898-D08D-4091-9C40-C700CFE3FC5A}"
diff --git a/PCbuild/python.props b/PCbuild/python.props
-index 9c2838b162..2360417748 100644
+index 306f4d4658..f29293a0f4 100644
--- a/PCbuild/python.props
+++ b/PCbuild/python.props
-@@ -56,7 +56,7 @@
- $(EXTERNALS_DIR)
+@@ -58,7 +58,7 @@
+ $(LIBRARY_PREFIX)\
$([System.IO.Path]::GetFullPath(`$(PySourcePath)externals`))
$(ExternalsDir)\
- $(ExternalsDir)sqlite-3.35.5.0\
+ $(SQLITE3_DIR)\
$(ExternalsDir)bzip2-1.0.6\
$(ExternalsDir)xz-5.2.2\
- $(ExternalsDir)libffi\
+ $(ExternalsDir)libffi-3.3.0\
diff --git a/PCbuild/sqlite3.vcxproj b/PCbuild/sqlite3.vcxproj
-index 7351a6dda2..56d18cfa94 100644
+index e39e2d9c22..63d1c27fbc 100644
--- a/PCbuild/sqlite3.vcxproj
+++ b/PCbuild/sqlite3.vcxproj
@@ -88,12 +88,12 @@
@@ -89,5 +88,5 @@ index 7351a6dda2..56d18cfa94 100644
--
-2.23.0
+2.30.2
diff --git a/recipe/patches/0012-Disable-new-dtags-in-unixccompiler.py.patch b/recipe/patches/0012-Disable-new-dtags-in-unixccompiler.py.patch
deleted file mode 100644
index d743f059c..000000000
--- a/recipe/patches/0012-Disable-new-dtags-in-unixccompiler.py.patch
+++ /dev/null
@@ -1,67 +0,0 @@
-From c23b6879c789beb899744592bbd5e13a2153c7f1 Mon Sep 17 00:00:00 2001
-From: Ray Donnelly
-Date: Sun, 29 Apr 2018 16:10:42 +0100
-Subject: [PATCH 12/30] Disable new-dtags in unixccompiler.py
-
-They prevent isolation from system libraries and the HPC 'modules' system
-by giving precedence to LD_LIBRARY_PATH. We never want our libraries to
-be interposed by other libraries.
-
-The ELF spec. has comprehensive rpath support and new-dtags causes far
-more harm than good (for Anaconda Distribution at least). This may be a
-bit controversial I am convinced this is the right thing to do.
-
-Exclude this check from Windows though really we shouldn't have to as
-GNULD should be getting determined in a different way than from using
-sysconfig (which relates to the compiler used to build the interpreter
-itself, MSVC).
----
- Lib/distutils/tests/test_unixccompiler.py | 4 ++--
- Lib/distutils/unixccompiler.py | 6 +++---
- 2 files changed, 5 insertions(+), 5 deletions(-)
-
-diff --git a/Lib/distutils/tests/test_unixccompiler.py b/Lib/distutils/tests/test_unixccompiler.py
-index eef702cf01..2d8d61df03 100644
---- a/Lib/distutils/tests/test_unixccompiler.py
-+++ b/Lib/distutils/tests/test_unixccompiler.py
-@@ -59,7 +59,7 @@ class UnixCCompilerTestCase(unittest.TestCase):
- elif v == 'GNULD':
- return 'yes'
- sysconfig.get_config_var = gcv
-- self.assertEqual(self.cc.rpath_foo(), '-Wl,--enable-new-dtags,-R/foo')
-+ self.assertEqual(self.cc.rpath_foo(), '-Wl,-R/foo')
-
- # GCC non-GNULD
- sys.platform = 'bar'
-@@ -69,7 +69,7 @@ class UnixCCompilerTestCase(unittest.TestCase):
- elif v == 'GNULD':
- return 'no'
- sysconfig.get_config_var = gcv
-- self.assertEqual(self.cc.rpath_foo(), '-Wl,-R/foo')
-+ self.assertEqual(self.cc.rpath_foo(), '-Wl,--disable-new-dtags,-R/foo')
-
- # GCC GNULD with fully qualified configuration prefix
- # see #7617
-diff --git a/Lib/distutils/unixccompiler.py b/Lib/distutils/unixccompiler.py
-index 84a421767d..12a9f777fe 100644
---- a/Lib/distutils/unixccompiler.py
-+++ b/Lib/distutils/unixccompiler.py
-@@ -248,12 +248,12 @@ class UnixCCompiler(CCompiler):
- # use it anyway. Since distutils has always passed in
- # -Wl whenever gcc was used in the past it is probably
- # safest to keep doing so.
-- if sysconfig.get_config_var("GNULD") == "yes":
-+ if sysconfig.get_config_var("GNULD") == "yes" or sys.platform == 'win32':
- # GNU ld needs an extra option to get a RUNPATH
- # instead of just an RPATH.
-- return "-Wl,--enable-new-dtags,-R" + dir
-- else:
- return "-Wl,-R" + dir
-+ else:
-+ return "-Wl,--disable-new-dtags,-R" + dir
- else:
- # No idea how --enable-new-dtags would be passed on to
- # ld if this system was using GNU ld. Don't know if a
---
-2.23.0
-
diff --git a/recipe/patches/0017-venv-Revert-a-change-from-https-github.com-python-cp.patch b/recipe/patches/0012-venv-Revert-a-change-from-https-github.com-python-cp.patch
similarity index 86%
rename from recipe/patches/0017-venv-Revert-a-change-from-https-github.com-python-cp.patch
rename to recipe/patches/0012-venv-Revert-a-change-from-https-github.com-python-cp.patch
index d40c556dc..cef48882d 100644
--- a/recipe/patches/0017-venv-Revert-a-change-from-https-github.com-python-cp.patch
+++ b/recipe/patches/0012-venv-Revert-a-change-from-https-github.com-python-cp.patch
@@ -1,7 +1,7 @@
-From f6559d3e3adb952d3c007a084166cc5da1bd9873 Mon Sep 17 00:00:00 2001
+From bf782b0d9d36d3733d981e30852206280d4aad45 Mon Sep 17 00:00:00 2001
From: Ray Donnelly
Date: Wed, 2 Jan 2019 21:38:48 +0000
-Subject: [PATCH 17/30] venv: Revert a change from
+Subject: [PATCH 12/25] venv: Revert a change from
https://github.com/python/cpython/commit/1c3de541e64f75046b20cdd27bada1557e550bcd
https://bugs.python.org/issue35644
@@ -16,7 +16,7 @@ diff --git a/Lib/venv/__init__.py b/Lib/venv/__init__.py
index 8009deb3ea..e4fd6db818 100644
--- a/Lib/venv/__init__.py
+++ b/Lib/venv/__init__.py
-@@ -220,7 +220,12 @@ class EnvBuilder:
+@@ -220,7 +220,12 @@ def symlink_or_copy(self, src, dst, relative_symlinks_ok=False):
basename = 'venvwlauncher'
src = os.path.join(os.path.dirname(src), basename + ext)
else:
@@ -30,7 +30,7 @@ index 8009deb3ea..e4fd6db818 100644
if not os.path.exists(src):
if not bad_src:
logger.warning('Unable to copy %r', src)
-@@ -238,9 +243,9 @@ class EnvBuilder:
+@@ -238,9 +243,9 @@ def setup_python(self, context):
binpath = context.bin_path
path = context.env_exe
copier = self.symlink_or_copy
@@ -42,5 +42,5 @@ index 8009deb3ea..e4fd6db818 100644
os.chmod(path, 0o755)
for suffix in ('python', 'python3', f'python3.{sys.version_info[1]}'):
--
-2.23.0
+2.30.2
diff --git a/recipe/patches/0013-Fix-cross-compilation-on-Debian-based-distros.patch b/recipe/patches/0013-Fix-cross-compilation-on-Debian-based-distros.patch
deleted file mode 100644
index e3835a636..000000000
--- a/recipe/patches/0013-Fix-cross-compilation-on-Debian-based-distros.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From cad5792683f4a18298adcc214ffa33c9f8ee0c42 Mon Sep 17 00:00:00 2001
-From: Ray Donnelly
-Date: Sun, 26 Aug 2018 17:10:08 +0100
-Subject: [PATCH 13/30] Fix cross-compilation on Debian-based distros
-
----
- setup.py | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/setup.py b/setup.py
-index 41cd6e171c..f2769081e8 100644
---- a/setup.py
-+++ b/setup.py
-@@ -749,7 +749,8 @@ class PyBuildExt(build_ext):
- # only change this for cross builds for 3.3, issues on Mageia
- if CROSS_COMPILING:
- self.add_cross_compiling_paths()
-- self.add_multiarch_paths()
-+ else:
-+ self.add_multiarch_paths()
- self.add_ldflags_cppflags()
-
- def init_inc_lib_dirs(self):
---
-2.23.0
-
diff --git a/recipe/patches/0019-Use-ranlib-from-env-if-env-variable-is-set.patch b/recipe/patches/0013-Use-ranlib-from-env-if-env-variable-is-set.patch
similarity index 71%
rename from recipe/patches/0019-Use-ranlib-from-env-if-env-variable-is-set.patch
rename to recipe/patches/0013-Use-ranlib-from-env-if-env-variable-is-set.patch
index 5cb8d52d2..eea87f8bb 100644
--- a/recipe/patches/0019-Use-ranlib-from-env-if-env-variable-is-set.patch
+++ b/recipe/patches/0013-Use-ranlib-from-env-if-env-variable-is-set.patch
@@ -1,17 +1,17 @@
-From e3eae5df830e7c53d0d6fd38b55bff648aeec37a Mon Sep 17 00:00:00 2001
+From 3989fd7293619a15ac4a6e957063f4c6a468a872 Mon Sep 17 00:00:00 2001
From: Isuru Fernando
Date: Sun, 3 Nov 2019 15:09:45 -0600
-Subject: [PATCH 19/30] Use ranlib from env if env variable is set
+Subject: [PATCH 13/25] Use ranlib from env if env variable is set
---
Lib/distutils/sysconfig.py | 3 +++
1 file changed, 3 insertions(+)
diff --git a/Lib/distutils/sysconfig.py b/Lib/distutils/sysconfig.py
-index f56ebe6c3a..8658c84797 100644
+index 3414a761e7..181f66708e 100644
--- a/Lib/distutils/sysconfig.py
+++ b/Lib/distutils/sysconfig.py
-@@ -240,6 +240,9 @@ def customize_compiler(compiler):
+@@ -263,6 +263,9 @@ def customize_compiler(compiler):
linker_exe=cc,
archiver=archiver)
@@ -22,5 +22,5 @@ index f56ebe6c3a..8658c84797 100644
--
-2.23.0
+2.30.2
diff --git a/recipe/patches/0020-Add-CondaEcosystemModifyDllSearchPath.patch b/recipe/patches/0014-Add-CondaEcosystemModifyDllSearchPath.patch
similarity index 78%
rename from recipe/patches/0020-Add-CondaEcosystemModifyDllSearchPath.patch
rename to recipe/patches/0014-Add-CondaEcosystemModifyDllSearchPath.patch
index c97841f70..7fe3e350b 100644
--- a/recipe/patches/0020-Add-CondaEcosystemModifyDllSearchPath.patch
+++ b/recipe/patches/0014-Add-CondaEcosystemModifyDllSearchPath.patch
@@ -1,7 +1,45 @@
-From 9eb3eea71dcbe3c9c2649169bd35614998b1c650 Mon Sep 17 00:00:00 2001
+From 984f25110b2516e7a72f06bc2d608ff18b8b3993 Mon Sep 17 00:00:00 2001
From: Ray Donnelly
Date: Tue, 24 Dec 2019 18:37:17 +0100
-Subject: [PATCH 20/30] Add CondaEcosystemModifyDllSearchPath()
+Subject: [PATCH 14/25] Add CondaEcosystemModifyDllSearchPath()
+
+There are 2 modes depending on CONDA_DLL_SEARCH_MODIFICATION env variable
+
+- unset CONDA_DLL_SEARCH_MODIFICATION (Default)
+
+ In this mode, the python interpreter works as if the python interpreter
+ was called with the following conda directories.
+
+ os.add_dll_directory(join(sys.prefix, 'bin'))
+ os.add_dll_directory(join(sys.prefix, 'Scripts'))
+ os.add_dll_directory(join(sys.prefix, 'Library', 'bin'))
+ os.add_dll_directory(join(sys.prefix, 'Library', 'usr', 'bin'))
+ os.add_dll_directory(join(sys.prefix, 'Library', 'mingw-w64', 'bin'))
+
+ Search order
+ - The directory that contains the DLL (if looking for a dependency)
+ - Application (python.exe) directory
+ - Directories added with os.add_dll_directory
+ - The 5 conda directories
+ - C:\Windows\System32
+
+ Note that the default behaviour changed in conda python 3.10 to
+ make os.add_dll_directory work in user code.
+
+- CONDA_DLL_SEARCH_MODIFICATION=1
+
+ Search order is roughly,
+
+ - The directory that contains the DLL (if looking for a dependency)
+ - Application (python.exe) directory
+ - C:\Windows
+ - Current working directory
+ - The 5 conda directories
+ - PATH
+ - Directories added with os.add_dll_directory
+ - Old PATH entries (Deficiency in current patch)
+ - Old working directories (Deficiency in current patch)
+ - C:\Windows\System32
This changes the DLL search order so that C:\Windows\System32 does not
get searched in before entries in PATH.
@@ -14,33 +52,16 @@ Made fwprintfs breakpointable
From Shaun Walbridge:
Fix CondaEcosystemModifyDllSearchPath for users of the Python DLL
+
+Co-authored-by: Isuru Fernando
---
- Lib/ctypes/__init__.py | 8 +
- Modules/main.c | 400 ++++++++++++++++++++++++++++++++++++++++-
- Python/dynload_win.c | 7 +-
- 3 files changed, 412 insertions(+), 3 deletions(-)
+ Modules/main.c | 363 +++++++++++++++++++++++++++++++++++++++++++
+ Python/dynload_win.c | 4 +
+ Python/pylifecycle.c | 5 +-
+ 3 files changed, 371 insertions(+), 1 deletion(-)
-diff --git a/Lib/ctypes/__init__.py b/Lib/ctypes/__init__.py
-index 4afa4ebd42..83fc43d874 100644
---- a/Lib/ctypes/__init__.py
-+++ b/Lib/ctypes/__init__.py
-@@ -364,6 +364,14 @@ class CDLL(object):
- if '/' in name or '\\' in name:
- self._name = nt._getfullpathname(self._name)
- mode |= nt._LOAD_LIBRARY_SEARCH_DLL_LOAD_DIR
-+ # PATH is how DLL lookup has always worked in the past
-+ # in Python on Windows. IMHO both the above mode flags
-+ # are not wanted and cause many serious regressions within
-+ # the conda ecosystem on Windows. We should however
-+ # propagate any PATH changes that have happened to Python
-+ # library and that is not yet implemented.
-+ LOAD_WITH_ALTERED_SEARCH_PATH = 0x00000008
-+ mode = LOAD_WITH_ALTERED_SEARCH_PATH
-
- class _FuncPtr(_CFuncPtr):
- _flags_ = flags
diff --git a/Modules/main.c b/Modules/main.c
-index 4a76f4461b..10343115b8 100644
+index 2684d23067..f0bcb0616f 100644
--- a/Modules/main.c
+++ b/Modules/main.c
@@ -17,6 +17,10 @@
@@ -54,25 +75,7 @@ index 4a76f4461b..10343115b8 100644
#endif
/* End of includes for exit_sigint() */
-@@ -28,6 +32,8 @@
- extern "C" {
- #endif
-
-+char *CondaEcosystemGetWarnings();
-+
- /* --- pymain_init() ---------------------------------------------- */
-
- static PyStatus
-@@ -192,7 +198,7 @@ pymain_header(const PyConfig *config)
- return;
- }
-
-- fprintf(stderr, "Python %s on %s\n", Py_GetVersion(), Py_GetPlatform());
-+ fprintf(stderr, "Python %s on %s\n%s", Py_GetVersion(), Py_GetPlatform(), CondaEcosystemGetWarnings());
- if (config->site_import) {
- fprintf(stderr, "%s\n", COPYRIGHT);
- }
-@@ -687,10 +693,402 @@ Py_RunMain(void)
+@@ -680,10 +684,369 @@ Py_RunMain(void)
return exitcode;
}
@@ -137,7 +140,6 @@ index 4a76f4461b..10343115b8 100644
+static SDD pSetDllDirectory = NULL;
+static ADD pAddDllDirectory = NULL;
+static int sv_failed_to_find_dll_fns = 0;
-+static int sv_conda_not_activated = 0;
+/* sv_executable_dirname is gotten but not used ATM. */
+static wchar_t sv_executable_dirname[1024];
+/* Have hidden this behind a define because it is clearly not code that
@@ -167,11 +169,13 @@ index 4a76f4461b..10343115b8 100644
+static wchar_t *sv_added_windows_directory = NULL;
+static wchar_t *sv_added_cwd = NULL;
+
-+int CondaEcosystemModifyDllSearchPath_Init(int argc, wchar_t * const argv[])
++int CondaEcosystemModifyDllSearchPath_Init()
+{
+ int debug_it = _wgetenv(L"CONDA_DLL_SEARCH_MODIFICATION_DEBUG") ? 1 : 0;
++ wchar_t* enable = _wgetenv(L"CONDA_DLL_SEARCH_MODIFICATION_ENABLE");
+ int res = 0;
+#if defined(HARDCODE_CONDA_PATHS)
++ long long j;
+ CONDA_PATH *p_conda_path;
+#endif /* defined(HARDCODE_CONDA_PATHS) */
+
@@ -210,32 +214,6 @@ index 4a76f4461b..10343115b8 100644
+ mbstowcs_s(&convertedChars, sv_windows_directory, strlen(tmp_ascii)+1, tmp_ascii, _TRUNCATE);
+ sv_windows_directory[sizeof(sv_windows_directory) / sizeof(sv_windows_directory[0]) - 1] = L'\0';
+ }
-+
-+ if (conda_prefix == NULL || wcscmp(sv_executable_dirname, conda_prefix))
-+ {
-+ if (build_prefix == NULL || wcscmp(sv_executable_dirname, build_prefix))
-+ {
-+ if (prefix == NULL || wcscmp(sv_executable_dirname, prefix))
-+ {
-+ int found_conda = 0;
-+ int argi;
-+ /* If any of the args contain 'conda' .. I am very sorry and there's probably a better way. */
-+ for (argi = 1; argi < argc; ++argi)
-+ {
-+ if (wcscmp(argv[argi], L"conda") == 0)
-+ {
-+ found_conda = 1;
-+ break;
-+ }
-+ }
-+ if (found_conda == 0)
-+ {
-+ sv_conda_not_activated = 1;
-+ res = 1;
-+ }
-+ }
-+ }
-+ }
+ }
+
+ if (pSetDefaultDllDirectories == NULL || pSetDllDirectory == NULL || pAddDllDirectory == NULL)
@@ -246,22 +224,17 @@ index 4a76f4461b..10343115b8 100644
+ sv_failed_to_find_dll_fns = 1;
+ res = 2;
+ }
-+ return res;
-+}
-+
-+char* CondaEcosystemGetWarnings()
-+{
-+ static char warnings[1024] = { 0 };
-+ if (sv_conda_not_activated == 1 && warnings[0] == '\0')
-+ {
-+ sprintf(warnings, "\n"
-+ "Warning:\n"
-+ "This Python interpreter is in a conda environment, but the environment has\n"
-+ "not been activated. Libraries may fail to load. To activate this environment\n"
-+ "please see https://conda.io/activation\n"
-+ "\n");
++#if defined(HARDCODE_CONDA_PATHS)
++ else if (enable == NULL || !wcscmp(enable, L"0")) {
++ for (j = NUM_CONDA_PATHS-1, p_conda_path = &condaPaths[NUM_CONDA_PATHS-1]; j > -1; --j, --p_conda_path)
++ {
++ if (debug_it)
++ fwprintf(stderr, L"CondaEcosystemModifyDllSearchPath() :: AddDllDirectory(%ls - ExePrefix)\n", p_conda_path->p_name);
++ pAddDllDirectory(p_conda_path->p_name);
++ }
+ }
-+ return &warnings[0];
++#endif /* defined(HARDCODE_CONDA_PATHS) */
++ return res;
+}
+
+int CondaEcosystemModifyDllSearchPath(int add_windows_directory, int add_cwd) {
@@ -269,16 +242,17 @@ index 4a76f4461b..10343115b8 100644
+ const wchar_t *path_env = _wgetenv(L"PATH");
+ wchar_t current_working_directory[1024];
+ const wchar_t *p_cwd = NULL;
-+ ssize_t entry_num = 0;
-+ ssize_t i;
++ long long entry_num = 0;
++ long long i;
+ wchar_t **path_entries;
+ wchar_t *path_end;
-+ ssize_t num_entries = 1;
++ long long num_entries = 1;
+#if defined(HARDCODE_CONDA_PATHS)
-+ ssize_t j;
++ long long j;
+ CONDA_PATH *p_conda_path;
+ int foundCondaPath[NUM_CONDA_PATHS] = {0, 0, 0, 0, 0};
+#endif /* defined(HARDCODE_CONDA_PATHS) */
++ wchar_t *enable;
+
+ int SetDllDirectoryValue = LOAD_LIBRARY_SEARCH_DEFAULT_DIRS;
+ if (sv_failed_to_find_dll_fns)
@@ -291,7 +265,8 @@ index 4a76f4461b..10343115b8 100644
+ if (pSetDefaultDllDirectories == NULL || pSetDllDirectory == NULL || pAddDllDirectory == NULL)
+ return 1;
+
-+ if (_wgetenv(L"CONDA_DLL_SEARCH_MODIFICATION_ENABLE") == NULL)
++ enable = _wgetenv(L"CONDA_DLL_SEARCH_MODIFICATION_ENABLE");
++ if (enable == NULL || !wcscmp(enable, L"0"))
+ return 0;
+ if (_wgetenv(L"CONDA_DLL_SEARCH_MODIFICATION_NEVER_ADD_WINDOWS_DIRECTORY"))
+ add_windows_directory = 0;
@@ -456,11 +431,6 @@ index 4a76f4461b..10343115b8 100644
+
+ return 0;
+}
-+#else
-+char* CondaEcosystemGetWarnings()
-+{
-+ return "";
-+}
+#endif
+
@@ -476,10 +446,10 @@ index 4a76f4461b..10343115b8 100644
if (_PyStatus_IS_EXIT(status)) {
pymain_free();
diff --git a/Python/dynload_win.c b/Python/dynload_win.c
-index 8431c5b3b2..1b3e275614 100644
+index 5702ab2cd7..e2efd4c8ea 100644
--- a/Python/dynload_win.c
+++ b/Python/dynload_win.c
-@@ -187,10 +187,13 @@ dl_funcptr _PyImport_FindSharedFuncptrWindows(const char *prefix,
+@@ -190,6 +190,10 @@ dl_funcptr _PyImport_FindSharedFuncptrWindows(const char *prefix,
to avoid DLL preloading attacks and enable use of the
AddDllDirectory function. We add SEARCH_DLL_LOAD_DIR to
ensure DLLs adjacent to the PYD are preferred. */
@@ -489,12 +459,23 @@ index 8431c5b3b2..1b3e275614 100644
+
Py_BEGIN_ALLOW_THREADS
hDLL = LoadLibraryExW(wpathname, NULL,
-- LOAD_LIBRARY_SEARCH_DEFAULT_DIRS |
-- LOAD_LIBRARY_SEARCH_DLL_LOAD_DIR);
-+ LOAD_WITH_ALTERED_SEARCH_PATH);
- Py_END_ALLOW_THREADS
+ LOAD_LIBRARY_SEARCH_DEFAULT_DIRS |
+diff --git a/Python/pylifecycle.c b/Python/pylifecycle.c
+index eeaf20b461..a32aa666e4 100644
+--- a/Python/pylifecycle.c
++++ b/Python/pylifecycle.c
+@@ -101,7 +101,10 @@ _PyRuntime_Initialize(void)
+ return _PyStatus_OK();
+ }
+ runtime_initialized = 1;
+-
++#ifdef MS_WINDOWS
++ extern int CondaEcosystemModifyDllSearchPath_Init();
++ CondaEcosystemModifyDllSearchPath_Init();
++#endif
+ return _PyRuntimeState_Init(&_PyRuntime);
+ }
- /* restore old error mode settings */
--
-2.23.0
+2.30.2
diff --git a/recipe/patches/0021-Add-d1trimfile-SRC_DIR-to-make-pdbs-more-relocatable.patch b/recipe/patches/0015-Add-d1trimfile-SRC_DIR-to-make-pdbs-more-relocatable.patch
similarity index 78%
rename from recipe/patches/0021-Add-d1trimfile-SRC_DIR-to-make-pdbs-more-relocatable.patch
rename to recipe/patches/0015-Add-d1trimfile-SRC_DIR-to-make-pdbs-more-relocatable.patch
index 48c6557cb..aa34b7312 100644
--- a/recipe/patches/0021-Add-d1trimfile-SRC_DIR-to-make-pdbs-more-relocatable.patch
+++ b/recipe/patches/0015-Add-d1trimfile-SRC_DIR-to-make-pdbs-more-relocatable.patch
@@ -1,17 +1,17 @@
-From 0d70da5df95503fdaf6d5847733370eb22baf6c7 Mon Sep 17 00:00:00 2001
+From 0578dabecccde87a9be2f91a574d24b2c66059a5 Mon Sep 17 00:00:00 2001
From: Ray Donnelly
Date: Tue, 31 Dec 2019 20:46:36 +0100
-Subject: [PATCH 21/30] Add /d1trimfile:%SRC_DIR% to make pdbs more relocatable
+Subject: [PATCH 15/25] Add /d1trimfile:%SRC_DIR% to make pdbs more relocatable
---
Lib/distutils/_msvccompiler.py | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/Lib/distutils/_msvccompiler.py b/Lib/distutils/_msvccompiler.py
-index af8099a407..8f73453a6c 100644
+index af8099a407..0b245adb30 100644
--- a/Lib/distutils/_msvccompiler.py
+++ b/Lib/distutils/_msvccompiler.py
-@@ -346,6 +346,13 @@ class MSVCCompiler(CCompiler) :
+@@ -346,6 +346,13 @@ def compile(self, sources,
# without asking the user to browse for it
src = os.path.abspath(src)
@@ -19,13 +19,13 @@ index af8099a407..8f73453a6c 100644
+ # relocatable:
+ # https://developercommunity.visualstudio.com/comments/623156/view.html
+ d1trimfile_opts = []
-+ if 'SRC_DIR' in os.environ:
++ if 'SRC_DIR' in os.environ and os.path.basename(self.cc) == "cl.exe":
+ d1trimfile_opts.append("/d1trimfile:" + os.environ['SRC_DIR'])
+
if ext in self._c_extensions:
input_opt = "/Tc" + src
elif ext in self._cpp_extensions:
-@@ -390,7 +397,7 @@ class MSVCCompiler(CCompiler) :
+@@ -390,7 +397,7 @@ def compile(self, sources,
raise CompileError("Don't know how to compile {} to {}"
.format(src, obj))
@@ -35,5 +35,5 @@ index af8099a407..8f73453a6c 100644
args.append('/EHsc')
args.append(input_opt)
--
-2.23.0
+2.30.2
diff --git a/recipe/patches/0015-Unvendor-openssl.patch b/recipe/patches/0015-Unvendor-openssl.patch
deleted file mode 100644
index 278336143..000000000
--- a/recipe/patches/0015-Unvendor-openssl.patch
+++ /dev/null
@@ -1,103 +0,0 @@
-From 3d0b31d720a7eda8a597c0d433b976c245a532f4 Mon Sep 17 00:00:00 2001
-From: Nehal J Wani
-Date: Sat, 24 Nov 2018 20:38:02 -0600
-Subject: [PATCH 15/30] Unvendor openssl
-
----
- PCbuild/_ssl.vcxproj | 3 ---
- PCbuild/_ssl.vcxproj.filters | 3 ---
- PCbuild/openssl.props | 2 +-
- PCbuild/python.props | 6 +++---
- PCbuild/python.vcxproj | 3 +++
- PCbuild/pythonw.vcxproj | 3 +++
- 6 files changed, 10 insertions(+), 10 deletions(-)
-
-diff --git a/PCbuild/_ssl.vcxproj b/PCbuild/_ssl.vcxproj
-index 4907f49b66..b2c23d5e8c 100644
---- a/PCbuild/_ssl.vcxproj
-+++ b/PCbuild/_ssl.vcxproj
-@@ -99,9 +99,6 @@
-
-
-
--
-- _CRT_SECURE_NO_WARNINGS;$(PreprocessorDefinitions)
--
-
-
-
-diff --git a/PCbuild/_ssl.vcxproj.filters b/PCbuild/_ssl.vcxproj.filters
-index 716a69a41a..8aef9e03fc 100644
---- a/PCbuild/_ssl.vcxproj.filters
-+++ b/PCbuild/_ssl.vcxproj.filters
-@@ -12,9 +12,6 @@
-
- Source Files
-
--
-- Source Files
--
-
-
-
-diff --git a/PCbuild/openssl.props b/PCbuild/openssl.props
-index a7e16793c7..af1350cae7 100644
---- a/PCbuild/openssl.props
-+++ b/PCbuild/openssl.props
-@@ -5,7 +5,7 @@
- $(opensslIncludeDir);%(AdditionalIncludeDirectories)
-
-
-- $(opensslOutDir);%(AdditionalLibraryDirectories)
-+ $(opensslDir)\lib;%(AdditionalLibraryDirectories)
- ws2_32.lib;libcrypto.lib;libssl.lib;%(AdditionalDependencies)
-
-
-diff --git a/PCbuild/python.props b/PCbuild/python.props
-index 5f4926efa2..9c2838b162 100644
---- a/PCbuild/python.props
-+++ b/PCbuild/python.props
-@@ -62,9 +62,9 @@
- $(ExternalsDir)libffi\
- $(ExternalsDir)libffi\$(ArchName)\
- $(libffiOutDir)include
-- $(ExternalsDir)openssl-1.1.1k\
-- $(ExternalsDir)openssl-bin-1.1.1k-1\$(ArchName)\
-- $(opensslOutDir)include
-+ $(OPENSSL_DIR)\
-+ $(opensslDir)bin
-+ $(opensslDir)include
- $(ExternalsDir)\nasm-2.11.06\
- $(ExternalsDir)\zlib-1.2.11\
-
-diff --git a/PCbuild/python.vcxproj b/PCbuild/python.vcxproj
-index 2094420a8d..ffb2673018 100644
---- a/PCbuild/python.vcxproj
-+++ b/PCbuild/python.vcxproj
-@@ -105,6 +105,9 @@
-
-
-
-+
-+ _CRT_SECURE_NO_WARNINGS;$(PreprocessorDefinitions)
-+
-
-
-
-diff --git a/PCbuild/pythonw.vcxproj b/PCbuild/pythonw.vcxproj
-index e7216dec3a..ab572d2020 100644
---- a/PCbuild/pythonw.vcxproj
-+++ b/PCbuild/pythonw.vcxproj
-@@ -97,6 +97,9 @@
-
-
-
-+
-+ _CRT_SECURE_NO_WARNINGS;$(PreprocessorDefinitions)
-+
-
-
-
---
-2.23.0
-
diff --git a/recipe/patches/0022-Doing-d1trimfile.patch b/recipe/patches/0016-Doing-d1trimfile.patch
similarity index 90%
rename from recipe/patches/0022-Doing-d1trimfile.patch
rename to recipe/patches/0016-Doing-d1trimfile.patch
index 4e15505b5..ba42e706b 100644
--- a/recipe/patches/0022-Doing-d1trimfile.patch
+++ b/recipe/patches/0016-Doing-d1trimfile.patch
@@ -1,68 +1,53 @@
-From 383752963a4ce4c08d052b28842e843567ae4079 Mon Sep 17 00:00:00 2001
+From 9aa46bd471a32c46bcae1f2ce65d69ddb5fb52fe Mon Sep 17 00:00:00 2001
From: Ray Donnelly
Date: Tue, 31 Dec 2019 21:47:47 +0100
-Subject: [PATCH 22/30] Doing d1trimfile
+Subject: [PATCH 16/25] Doing d1trimfile
---
- PC/bdist_wininst/bdist_wininst.vcxproj | 4 ++++
- PCbuild/_asyncio.vcxproj | 20 ++++++++++++++++++++
- PCbuild/_bz2.vcxproj | 4 ++++
- PCbuild/_ctypes.vcxproj | 4 ++++
- PCbuild/_ctypes_test.vcxproj | 20 ++++++++++++++++++++
- PCbuild/_decimal.vcxproj | 4 ++++
- PCbuild/_elementtree.vcxproj | 4 ++++
- PCbuild/_freeze_importlib.vcxproj | 4 ++++
- PCbuild/_hashlib.vcxproj | 12 ++++++++++++
- PCbuild/_lzma.vcxproj | 4 ++++
- PCbuild/_msi.vcxproj | 12 ++++++++++++
- PCbuild/_multiprocessing.vcxproj | 12 ++++++++++++
- PCbuild/_overlapped.vcxproj | 12 ++++++++++++
- PCbuild/_queue.vcxproj | 20 ++++++++++++++++++++
- PCbuild/_socket.vcxproj | 12 ++++++++++++
- PCbuild/_sqlite3.vcxproj | 4 ++++
- PCbuild/_ssl.vcxproj | 12 ++++++++++++
- PCbuild/_testbuffer.vcxproj | 20 ++++++++++++++++++++
- PCbuild/_testcapi.vcxproj | 20 ++++++++++++++++++++
- PCbuild/_testconsole.vcxproj | 4 ++++
- PCbuild/_testembed.vcxproj | 4 ++++
- PCbuild/_testimportmultiple.vcxproj | 20 ++++++++++++++++++++
- PCbuild/_testinternalcapi.vcxproj | 20 ++++++++++++++++++++
- PCbuild/_testmultiphase.vcxproj | 4 ++++
- PCbuild/_tkinter.vcxproj | 4 ++++
- PCbuild/liblzma.vcxproj | 4 ++++
- PCbuild/pyexpat.vcxproj | 4 ++++
- PCbuild/pylauncher.vcxproj | 4 ++++
- PCbuild/pyshellext.vcxproj | 4 ++++
- PCbuild/python.vcxproj | 4 ++++
- PCbuild/python3dll.vcxproj | 4 ++++
- PCbuild/python_uwp.vcxproj | 2 +-
- PCbuild/pythoncore.vcxproj | 2 +-
- PCbuild/pythonw.vcxproj | 12 ++++++++++++
- PCbuild/pythonw_uwp.vcxproj | 2 +-
- PCbuild/pywlauncher.vcxproj | 4 ++++
- PCbuild/select.vcxproj | 12 ++++++++++++
- PCbuild/unicodedata.vcxproj | 20 ++++++++++++++++++++
- PCbuild/venvlauncher.vcxproj | 4 ++++
- PCbuild/venvwlauncher.vcxproj | 4 ++++
- PCbuild/winsound.vcxproj | 12 ++++++++++++
- PCbuild/xxlimited.vcxproj | 4 ++++
- 42 files changed, 359 insertions(+), 3 deletions(-)
+ PCbuild/_asyncio.vcxproj | 20 ++++++++++++++++++++
+ PCbuild/_bz2.vcxproj | 4 ++++
+ PCbuild/_ctypes.vcxproj | 4 ++++
+ PCbuild/_ctypes_test.vcxproj | 20 ++++++++++++++++++++
+ PCbuild/_decimal.vcxproj | 4 ++++
+ PCbuild/_elementtree.vcxproj | 4 ++++
+ PCbuild/_freeze_importlib.vcxproj | 4 ++++
+ PCbuild/_hashlib.vcxproj | 12 ++++++++++++
+ PCbuild/_lzma.vcxproj | 4 ++++
+ PCbuild/_msi.vcxproj | 12 ++++++++++++
+ PCbuild/_multiprocessing.vcxproj | 12 ++++++++++++
+ PCbuild/_overlapped.vcxproj | 12 ++++++++++++
+ PCbuild/_queue.vcxproj | 20 ++++++++++++++++++++
+ PCbuild/_socket.vcxproj | 12 ++++++++++++
+ PCbuild/_sqlite3.vcxproj | 4 ++++
+ PCbuild/_ssl.vcxproj | 12 ++++++++++++
+ PCbuild/_testbuffer.vcxproj | 20 ++++++++++++++++++++
+ PCbuild/_testcapi.vcxproj | 20 ++++++++++++++++++++
+ PCbuild/_testconsole.vcxproj | 4 ++++
+ PCbuild/_testembed.vcxproj | 4 ++++
+ PCbuild/_testimportmultiple.vcxproj | 20 ++++++++++++++++++++
+ PCbuild/_testinternalcapi.vcxproj | 20 ++++++++++++++++++++
+ PCbuild/_testmultiphase.vcxproj | 4 ++++
+ PCbuild/_tkinter.vcxproj | 4 ++++
+ PCbuild/liblzma.vcxproj | 4 ++++
+ PCbuild/pyexpat.vcxproj | 4 ++++
+ PCbuild/pylauncher.vcxproj | 4 ++++
+ PCbuild/pyshellext.vcxproj | 4 ++++
+ PCbuild/python.vcxproj | 4 ++++
+ PCbuild/python3dll.vcxproj | 4 ++++
+ PCbuild/python_uwp.vcxproj | 2 +-
+ PCbuild/pythoncore.vcxproj | 2 +-
+ PCbuild/pythonw.vcxproj | 12 ++++++++++++
+ PCbuild/pythonw_uwp.vcxproj | 2 +-
+ PCbuild/pywlauncher.vcxproj | 4 ++++
+ PCbuild/select.vcxproj | 12 ++++++++++++
+ PCbuild/unicodedata.vcxproj | 20 ++++++++++++++++++++
+ PCbuild/venvlauncher.vcxproj | 4 ++++
+ PCbuild/venvwlauncher.vcxproj | 4 ++++
+ PCbuild/winsound.vcxproj | 12 ++++++++++++
+ PCbuild/xxlimited.vcxproj | 6 ++++++
+ PCbuild/xxlimited_35.vcxproj | 6 ++++++
+ 42 files changed, 363 insertions(+), 3 deletions(-)
-diff --git a/PC/bdist_wininst/bdist_wininst.vcxproj b/PC/bdist_wininst/bdist_wininst.vcxproj
-index 390bf4e627..5bd953b8d5 100644
---- a/PC/bdist_wininst/bdist_wininst.vcxproj
-+++ b/PC/bdist_wininst/bdist_wininst.vcxproj
-@@ -91,6 +91,10 @@
- _CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;%(PreprocessorDefinitions)
- MultiThreadedDebug
- MultiThreaded
-+ /d1trimfile:%SRC_DIR%
-+ /d1trimfile:%SRC_DIR%
-+ /d1trimfile:%SRC_DIR%
-+ /d1trimfile:%SRC_DIR%
-
-
- $(PySourcePath)PC\bdist_wininst;%(AdditionalIncludeDirectories)
diff --git a/PCbuild/_asyncio.vcxproj b/PCbuild/_asyncio.vcxproj
index ed1e1bc0a4..47d322be5f 100644
--- a/PCbuild/_asyncio.vcxproj
@@ -156,12 +141,12 @@ index 8a01e743a4..1ad658d5f9 100644
diff --git a/PCbuild/_decimal.vcxproj b/PCbuild/_decimal.vcxproj
-index 4c71cdb6d1..8af8f06ba7 100644
+index 0916f1a2d3..17a4cbfcd7 100644
--- a/PCbuild/_decimal.vcxproj
+++ b/PCbuild/_decimal.vcxproj
@@ -99,6 +99,10 @@
CONFIG_64;ANSI;%(PreprocessorDefinitions)
- CONFIG_64;%(PreprocessorDefinitions)
+ CONFIG_64;MASM;%(PreprocessorDefinitions)
..\Modules\_decimal;..\Modules\_decimal\libmpdec;%(AdditionalIncludeDirectories)
+ /d1trimfile:%SRC_DIR%
+ /d1trimfile:%SRC_DIR%
@@ -186,7 +171,7 @@ index 4a125b243b..20cc09d63f 100644
diff --git a/PCbuild/_freeze_importlib.vcxproj b/PCbuild/_freeze_importlib.vcxproj
-index a0fe49c464..50d634de77 100644
+index e437412a16..c4d5886b9f 100644
--- a/PCbuild/_freeze_importlib.vcxproj
+++ b/PCbuild/_freeze_importlib.vcxproj
@@ -89,6 +89,10 @@
@@ -362,13 +347,13 @@ index 8fd75f90e7..b403828291 100644
diff --git a/PCbuild/_sqlite3.vcxproj b/PCbuild/_sqlite3.vcxproj
-index 3e7b2262e8..fe5f680e5b 100644
+index fcdee1be60..ec2680955f 100644
--- a/PCbuild/_sqlite3.vcxproj
+++ b/PCbuild/_sqlite3.vcxproj
-@@ -95,6 +95,10 @@
+@@ -94,6 +94,10 @@
+
$(sqlite3Dir)\include;%(AdditionalIncludeDirectories)
- MODULE_NAME="sqlite3";%(PreprocessorDefinitions)
+ /d1trimfile:%SRC_DIR%
+ /d1trimfile:%SRC_DIR%
+ /d1trimfile:%SRC_DIR%
@@ -629,7 +614,7 @@ index 550e084230..0ea871bddb 100644
version.lib;%(AdditionalDependencies)
diff --git a/PCbuild/pyshellext.vcxproj b/PCbuild/pyshellext.vcxproj
-index 655054e372..53820b57ad 100644
+index ea432d6bc9..13bc692103 100644
--- a/PCbuild/pyshellext.vcxproj
+++ b/PCbuild/pyshellext.vcxproj
@@ -92,6 +92,10 @@
@@ -644,7 +629,7 @@ index 655054e372..53820b57ad 100644
version.lib;shlwapi.lib;%(AdditionalDependencies)
diff --git a/PCbuild/python.vcxproj b/PCbuild/python.vcxproj
-index ffb2673018..617b52f568 100644
+index 5dac66b4d0..ef27a30506 100644
--- a/PCbuild/python.vcxproj
+++ b/PCbuild/python.vcxproj
@@ -91,6 +91,10 @@
@@ -659,12 +644,12 @@ index ffb2673018..617b52f568 100644
Console
diff --git a/PCbuild/python3dll.vcxproj b/PCbuild/python3dll.vcxproj
-index ef344bed49..cf9b5380fd 100644
+index ec22e6fc76..80dff0a3d9 100644
--- a/PCbuild/python3dll.vcxproj
+++ b/PCbuild/python3dll.vcxproj
-@@ -97,6 +97,10 @@
-
+@@ -93,6 +93,10 @@
+ PYTHON_DLL_NAME="$(PyDllName)";%(PreprocessorDefinitions)
false
+ /d1trimfile:%SRC_DIR%
+ /d1trimfile:%SRC_DIR%
@@ -672,7 +657,7 @@ index ef344bed49..cf9b5380fd 100644
+ /d1trimfile:%SRC_DIR%
- $(OutDir)$(TargetName)stub.lib
+ true
diff --git a/PCbuild/python_uwp.vcxproj b/PCbuild/python_uwp.vcxproj
index fb27e9e712..f8dc841ef1 100644
--- a/PCbuild/python_uwp.vcxproj
@@ -687,7 +672,7 @@ index fb27e9e712..f8dc841ef1 100644
windowsapp.lib;%(AdditionalDependencies)
diff --git a/PCbuild/pythoncore.vcxproj b/PCbuild/pythoncore.vcxproj
-index 2625d0293d..686acc2a0c 100644
+index 0382977d6c..8da161b446 100644
--- a/PCbuild/pythoncore.vcxproj
+++ b/PCbuild/pythoncore.vcxproj
@@ -99,7 +99,7 @@
@@ -700,7 +685,7 @@ index 2625d0293d..686acc2a0c 100644
$(zlibDir);%(AdditionalIncludeDirectories)
_USRDLL;Py_BUILD_CORE;Py_BUILD_CORE_BUILTIN;Py_ENABLE_SHARED;MS_DLL_ID="$(SysWinVer)";%(PreprocessorDefinitions)
diff --git a/PCbuild/pythonw.vcxproj b/PCbuild/pythonw.vcxproj
-index ab572d2020..1115e75445 100644
+index 247ea10d5c..5bd4bbbc3a 100644
--- a/PCbuild/pythonw.vcxproj
+++ b/PCbuild/pythonw.vcxproj
@@ -91,6 +91,18 @@
@@ -858,20 +843,39 @@ index 32cedc9b44..c9abee1d69 100644
diff --git a/PCbuild/xxlimited.vcxproj b/PCbuild/xxlimited.vcxproj
-index 776335a15c..6e9e556e81 100644
+index 1c776fb0da..36dec23c20 100644
--- a/PCbuild/xxlimited.vcxproj
+++ b/PCbuild/xxlimited.vcxproj
-@@ -95,6 +95,10 @@
+@@ -93,6 +93,12 @@
+ <_ProjectFileVersion>10.0.30319.1
+
-
- %(PreprocessorDefinitions);Py_LIMITED_API=0x03060000
++
+ /d1trimfile:%SRC_DIR%
+ /d1trimfile:%SRC_DIR%
+ /d1trimfile:%SRC_DIR%
+ /d1trimfile:%SRC_DIR%
-
++
+
+ wsock32.lib;%(AdditionalDependencies)
+
+diff --git a/PCbuild/xxlimited_35.vcxproj b/PCbuild/xxlimited_35.vcxproj
+index dd830b3b6a..fef2c5b9f4 100644
+--- a/PCbuild/xxlimited_35.vcxproj
++++ b/PCbuild/xxlimited_35.vcxproj
+@@ -93,6 +93,12 @@
+ <_ProjectFileVersion>10.0.30319.1
+
+
++
++ /d1trimfile:%SRC_DIR%
++ /d1trimfile:%SRC_DIR%
++ /d1trimfile:%SRC_DIR%
++ /d1trimfile:%SRC_DIR%
++
wsock32.lib;%(AdditionalDependencies)
+
--
-2.23.0
+2.30.2
diff --git a/recipe/patches/0017-cross-compile-darwin.patch b/recipe/patches/0017-cross-compile-darwin.patch
new file mode 100644
index 000000000..2cf03c164
--- /dev/null
+++ b/recipe/patches/0017-cross-compile-darwin.patch
@@ -0,0 +1,107 @@
+From e48ead349e578354f47b5fcddb58cd8253af543d Mon Sep 17 00:00:00 2001
+From: Ray Donnelly
+Date: Fri, 2 Oct 2020 00:03:12 +0200
+Subject: [PATCH 17/25] cross compile darwin
+
+By Isuru Fernando.
+---
+ Lib/platform.py | 7 ++++++-
+ configure | 5 ++++-
+ configure.ac | 5 ++++-
+ setup.py | 6 +++---
+ 4 files changed, 17 insertions(+), 6 deletions(-)
+
+diff --git a/Lib/platform.py b/Lib/platform.py
+index 134fbae6b1..fbf27ac7d3 100755
+--- a/Lib/platform.py
++++ b/Lib/platform.py
+@@ -411,7 +411,12 @@ def win32_ver(release='', version='', csd='', ptype=''):
+ def _mac_ver_xml():
+ fn = '/System/Library/CoreServices/SystemVersion.plist'
+ if not os.path.exists(fn):
+- return None
++ if 'SDKROOT' in os.environ:
++ fn = os.environ['SDKROOT'] + fn
++ if not os.path.exists(fn):
++ return None
++ else:
++ return None
+
+ try:
+ import plistlib
+diff --git a/configure b/configure
+index f227dd88c0..2e2a4a6628 100755
+--- a/configure
++++ b/configure
+@@ -3383,6 +3383,9 @@ if test "$cross_compiling" = yes; then
+ _host_cpu=$host_cpu
+ esac
+ ;;
++ *-*-darwin*)
++ _host_cpu=$host_cpu
++ ;;
+ *-*-cygwin*)
+ _host_cpu=
+ ;;
+@@ -6227,7 +6230,7 @@ esac
+ fi
+ fi
+
+-if test "$cross_compiling" = yes; then
++if test "$cross_compiling" = yes -a "$ac_sys_system" != "Darwin"; then
+ case "$READELF" in
+ readelf|:)
+ as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
+diff --git a/configure.ac b/configure.ac
+index f70a69b2f9..f58eb5c607 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -448,6 +448,9 @@ if test "$cross_compiling" = yes; then
+ _host_cpu=$host_cpu
+ esac
+ ;;
++ *-*-darwin*)
++ _host_cpu=$host_cpu
++ ;;
+ *-*-cygwin*)
+ _host_cpu=
+ ;;
+@@ -1204,7 +1207,7 @@ then
+ fi
+
+ AC_CHECK_TOOLS([READELF], [readelf], [:])
+-if test "$cross_compiling" = yes; then
++if test "$cross_compiling" = yes -a "$ac_sys_system" != "Darwin"; then
+ case "$READELF" in
+ readelf|:)
+ AC_MSG_ERROR([readelf for the host is required for cross builds])
+diff --git a/setup.py b/setup.py
+index 783d20bdcd..36119d3ba9 100644
+--- a/setup.py
++++ b/setup.py
+@@ -83,7 +83,7 @@ def get_platform():
+ HOST_PLATFORM = get_platform()
+ MS_WINDOWS = (HOST_PLATFORM == 'win32')
+ CYGWIN = (HOST_PLATFORM == 'cygwin')
+-MACOS = (HOST_PLATFORM == 'darwin')
++MACOS = (HOST_PLATFORM.startswith('darwin'))
+ AIX = (HOST_PLATFORM.startswith('aix'))
+ VXWORKS = ('vxworks' in HOST_PLATFORM)
+
+@@ -1079,11 +1079,11 @@ def detect_readline_curses(self):
+ readline_lib = 'readline'
+ do_readline = self.compiler.find_library_file(self.lib_dirs,
+ readline_lib)
+- if CROSS_COMPILING:
++ if CROSS_COMPILING and not MACOS:
+ ret = run_command("%s -d %s | grep '(NEEDED)' > %s"
+ % (sysconfig.get_config_var('READELF'),
+ do_readline, tmpfile))
+- elif find_executable('ldd'):
++ elif find_executable('ldd') and not MACOS:
+ ret = run_command("ldd %s > %s" % (do_readline, tmpfile))
+ else:
+ ret = 1
+--
+2.30.2
+
diff --git a/recipe/patches/0032-Fix-TZPATH-on-windows.patch b/recipe/patches/0018-Fix-TZPATH-on-windows.patch
similarity index 60%
rename from recipe/patches/0032-Fix-TZPATH-on-windows.patch
rename to recipe/patches/0018-Fix-TZPATH-on-windows.patch
index 6c36da77d..69415b9a6 100644
--- a/recipe/patches/0032-Fix-TZPATH-on-windows.patch
+++ b/recipe/patches/0018-Fix-TZPATH-on-windows.patch
@@ -1,25 +1,24 @@
-From 1218ca492f4781ffc680e4a450ca1933ddcb29f4 Mon Sep 17 00:00:00 2001
+From d64b1b58f71445c38ce4fa004fa11fff941aaa0d Mon Sep 17 00:00:00 2001
From: Isuru Fernando
Date: Wed, 7 Oct 2020 10:08:30 -0500
-Subject: [PATCH] Fix TZPATH on windows
+Subject: [PATCH 18/25] Fix TZPATH on windows
---
- Lib/sysconfig.py | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
+ Lib/sysconfig.py | 1 +
+ 1 file changed, 1 insertion(+)
diff --git a/Lib/sysconfig.py b/Lib/sysconfig.py
-index bf04ac541e..11e81d4f44 100644
+index 95b48f6429..ce1bb8177b 100644
--- a/Lib/sysconfig.py
+++ b/Lib/sysconfig.py
-@@ -546,7 +546,7 @@ def get_config_vars(*args):
+@@ -611,6 +611,7 @@ def get_config_vars(*args):
if os.name == 'nt':
_init_non_posix(_CONFIG_VARS)
-- _CONFIG_VARS['TZPATH'] = ''
+ _CONFIG_VARS['TZPATH'] = os.path.join(_PREFIX, "share", "zoneinfo")
if os.name == 'posix':
_init_posix(_CONFIG_VARS)
# For backward compatibility, see issue19555
--
-2.28.0
+2.30.2
diff --git a/recipe/patches/0018-Win-Add-back-the-DLLSuffix-used-to-find-the-openssl-.patch b/recipe/patches/0018-Win-Add-back-the-DLLSuffix-used-to-find-the-openssl-.patch
deleted file mode 100644
index a87388da6..000000000
--- a/recipe/patches/0018-Win-Add-back-the-DLLSuffix-used-to-find-the-openssl-.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From d307ed7b926b06f9ec4e2ceb6da38ce7c6c68c2a Mon Sep 17 00:00:00 2001
-From: Marius van Niekerk
-Date: Thu, 31 Oct 2019 16:46:21 -0400
-Subject: [PATCH 18/30] Win: Add back the DLLSuffix used to find the openssl
- dlls and debug files
-
----
- PCbuild/openssl.props | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/PCbuild/openssl.props b/PCbuild/openssl.props
-index af1350cae7..eeb8677517 100644
---- a/PCbuild/openssl.props
-+++ b/PCbuild/openssl.props
-@@ -11,6 +11,7 @@
-
-
- <_DLLSuffix>-1_1
-+ <_DLLSuffix Condition="$(Platform) == 'x64'">$(_DLLSuffix)-x64
- <_DLLSuffix Condition="$(Platform) == 'ARM'">$(_DLLSuffix)-arm
- <_DLLSuffix Condition="$(Platform) == 'ARM64'">$(_DLLSuffix)-arm64
-
---
-2.23.0
-
diff --git a/recipe/patches/0033-gh24324.patch b/recipe/patches/0019-Make-dyld-search-work-with-SYSTEM_VERSION_COMPAT-1.patch
similarity index 55%
rename from recipe/patches/0033-gh24324.patch
rename to recipe/patches/0019-Make-dyld-search-work-with-SYSTEM_VERSION_COMPAT-1.patch
index 65710f85e..caa05abd4 100644
--- a/recipe/patches/0033-gh24324.patch
+++ b/recipe/patches/0019-Make-dyld-search-work-with-SYSTEM_VERSION_COMPAT-1.patch
@@ -1,7 +1,7 @@
-From afddfa8176cf8969055c6319504069b250723d3d Mon Sep 17 00:00:00 2001
+From d1f9a04d55e2711f9393c024ca75a6f6856ca686 Mon Sep 17 00:00:00 2001
From: Isuru Fernando
Date: Mon, 25 Jan 2021 03:28:08 -0600
-Subject: [PATCH] Make dyld search work with SYSTEM_VERSION_COMPAT=1
+Subject: [PATCH 19/25] Make dyld search work with SYSTEM_VERSION_COMPAT=1
In macOS Big Sur, if the executable was compiled with `MACOSX_DEPLOYMENT_TARGET=10.15`
or below, then SYSTEM_VERSION_COMPAT=1 is the default which means that Big Sur
@@ -15,15 +15,18 @@ as that part is compiled with `MACOSX_DEPLOYMENT_TARGET=11.0`)
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Modules/_ctypes/callproc.c b/Modules/_ctypes/callproc.c
-index 56ccc2f1e0b5d..2a75f62421c44 100644
+index f8f8efa4ee..5ec32375b2 100644
--- a/Modules/_ctypes/callproc.c
+++ b/Modules/_ctypes/callproc.c
-@@ -1449,7 +1449,7 @@ static PyObject *py_dyld_shared_cache_contains_path(PyObject *self, PyObject *ar
- PyObject *name, *name2;
- char *name_str;
-
-- if (__builtin_available(macOS 11.0, iOS 14.0, tvOS 14.0, watchOS 7.0, *)) {
-+ if (__builtin_available(macOS 10.16, iOS 14.0, tvOS 14.0, watchOS 7.0, *)) {
- int r;
-
- if (!PyArg_ParseTuple(args, "O", &name))
+@@ -1445,7 +1445,7 @@ copy_com_pointer(PyObject *self, PyObject *args)
+ #ifdef __APPLE__
+ #ifdef HAVE_DYLD_SHARED_CACHE_CONTAINS_PATH
+ #define HAVE_DYLD_SHARED_CACHE_CONTAINS_PATH_RUNTIME \
+- __builtin_available(macOS 11.0, iOS 14.0, tvOS 14.0, watchOS 7.0, *)
++ __builtin_available(macOS 10.16, iOS 14.0, tvOS 14.0, watchOS 7.0, *)
+ #else
+ // Support the deprecated case of compiling on an older macOS version
+ static void *libsystem_b_handle;
+--
+2.30.2
+
diff --git a/recipe/patches/0034-distutils-fix-ldshared.patch b/recipe/patches/0020-Fix-LDSHARED-when-CC-is-overriden-on-Linux-too.patch
similarity index 61%
rename from recipe/patches/0034-distutils-fix-ldshared.patch
rename to recipe/patches/0020-Fix-LDSHARED-when-CC-is-overriden-on-Linux-too.patch
index 74aa24f18..6e5df261e 100644
--- a/recipe/patches/0034-distutils-fix-ldshared.patch
+++ b/recipe/patches/0020-Fix-LDSHARED-when-CC-is-overriden-on-Linux-too.patch
@@ -1,8 +1,17 @@
+From 4f632363a25ecea58a75e7223d689591143e6224 Mon Sep 17 00:00:00 2001
+From: Isuru Fernando
+Date: Mon, 16 Aug 2021 02:18:50 -0700
+Subject: [PATCH 20/25] Fix LDSHARED when CC is overriden on Linux too
+
+---
+ Lib/distutils/sysconfig.py | 5 ++---
+ 1 file changed, 2 insertions(+), 3 deletions(-)
+
diff --git a/Lib/distutils/sysconfig.py b/Lib/distutils/sysconfig.py
-index 37feae5df7..47cb61854f 100644
+index 181f66708e..07bb42df04 100644
--- a/Lib/distutils/sysconfig.py
+++ b/Lib/distutils/sysconfig.py
-@@ -199,10 +199,9 @@ def customize_compiler(compiler):
+@@ -222,10 +222,9 @@ def customize_compiler(compiler):
if 'CC' in os.environ:
newcc = os.environ['CC']
@@ -15,3 +24,6 @@ index 37feae5df7..47cb61854f 100644
# command for LDSHARED as well
ldshared = newcc + ldshared[len(cc):]
cc = newcc
+--
+2.30.2
+
diff --git a/recipe/patches/0021-Unvendor-bzip2.patch b/recipe/patches/0021-Unvendor-bzip2.patch
new file mode 100644
index 000000000..bb33de7bf
--- /dev/null
+++ b/recipe/patches/0021-Unvendor-bzip2.patch
@@ -0,0 +1,90 @@
+From 8a771b759d8de0c5646482149cd128ff2720a184 Mon Sep 17 00:00:00 2001
+From: Isuru Fernando
+Date: Mon, 16 Aug 2021 02:56:27 -0700
+Subject: [PATCH 21/25] Unvendor bzip2
+
+---
+ PCbuild/_bz2.vcxproj | 15 +++++----------
+ PCbuild/_bz2.vcxproj.filters | 26 +-------------------------
+ 2 files changed, 6 insertions(+), 35 deletions(-)
+
+diff --git a/PCbuild/_bz2.vcxproj b/PCbuild/_bz2.vcxproj
+index 0402f7a9aa..569c7c5de9 100644
+--- a/PCbuild/_bz2.vcxproj
++++ b/PCbuild/_bz2.vcxproj
+@@ -94,7 +94,7 @@
+
+
+
+- $(bz2Dir);%(AdditionalIncludeDirectories)
++ $(condaDir)\include;%(AdditionalIncludeDirectories)
+ WIN32;_FILE_OFFSET_BITS=64;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;%(PreprocessorDefinitions)
+ 4244;4267;%(DisableSpecificWarnings)
+ /d1trimfile:%SRC_DIR%
+@@ -102,20 +102,15 @@
+ /d1trimfile:%SRC_DIR%
+ /d1trimfile:%SRC_DIR%
+
++
++ $(condaDir)\lib\bzip2.lib;%(AdditionalDependencies)
++
+
+
+
+-
+-
+-
+-
+-
+-
+-
+
+
+-
+-
++
+
+
+
+diff --git a/PCbuild/_bz2.vcxproj.filters b/PCbuild/_bz2.vcxproj.filters
+index 7c0b516253..c1f960608c 100644
+--- a/PCbuild/_bz2.vcxproj.filters
++++ b/PCbuild/_bz2.vcxproj.filters
+@@ -21,33 +21,9 @@
+
+ Source Files
+
+-
+- Source Files\bzip2
+-
+-
+- Source Files\bzip2
+-
+-
+- Source Files\bzip2
+-
+-
+- Source Files\bzip2
+-
+-
+- Source Files\bzip2
+-
+-
+- Source Files\bzip2
+-
+-
+- Source Files\bzip2
+-
+
+
+-
+- Header Files\bzip2
+-
+-
++
+ Header Files\bzip2
+
+
+--
+2.30.2
+
diff --git a/recipe/patches/0022-Unvendor-libffi.patch b/recipe/patches/0022-Unvendor-libffi.patch
new file mode 100644
index 000000000..234a1d565
--- /dev/null
+++ b/recipe/patches/0022-Unvendor-libffi.patch
@@ -0,0 +1,41 @@
+From 6216a72288a3eece7373e0601fabaedb2ba0545a Mon Sep 17 00:00:00 2001
+From: Isuru Fernando
+Date: Mon, 16 Aug 2021 03:07:40 -0700
+Subject: [PATCH 22/25] Unvendor libffi
+
+---
+ PCbuild/libffi.props | 15 +++------------
+ 1 file changed, 3 insertions(+), 12 deletions(-)
+
+diff --git a/PCbuild/libffi.props b/PCbuild/libffi.props
+index 975c4a0d35..97fb5966bf 100644
+--- a/PCbuild/libffi.props
++++ b/PCbuild/libffi.props
+@@ -2,20 +2,11 @@
+
+
+
+- $(libffiIncludeDir);%(AdditionalIncludeDirectories)
++ $(condaDir)\include;%(AdditionalIncludeDirectories)
+
+
+- $(libffiOutDir);%(AdditionalLibraryDirectories)
+- libffi-7.lib;%(AdditionalDependencies)
++ $(condaDir)\lib;%(AdditionalLibraryDirectories)
++ ffi.lib;%(AdditionalDependencies)
+
+
+-
+- <_LIBFFIDLL Include="$(libffiOutDir)\libffi-7.dll" />
+-
+-
+-
+-
+-
+-
+-
+
+\ No newline at end of file
+--
+2.30.2
+
diff --git a/recipe/patches/0023-Unvendor-tcltk.patch b/recipe/patches/0023-Unvendor-tcltk.patch
new file mode 100644
index 000000000..bbc5e678a
--- /dev/null
+++ b/recipe/patches/0023-Unvendor-tcltk.patch
@@ -0,0 +1,31 @@
+From da827e1f68368f92227427f5ac44ea854fb08101 Mon Sep 17 00:00:00 2001
+From: Isuru Fernando
+Date: Fri, 20 Aug 2021 10:23:51 -0700
+Subject: [PATCH 23/25] Unvendor tcltk
+
+---
+ PCbuild/tcltk.props | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/PCbuild/tcltk.props b/PCbuild/tcltk.props
+index 1101796bb3..3906f356e1 100644
+--- a/PCbuild/tcltk.props
++++ b/PCbuild/tcltk.props
+@@ -14,10 +14,10 @@
+ 4
+ 3
+ 6
+- $(ExternalsDir)tcl-core-$(TclMajorVersion).$(TclMinorVersion).$(TclPatchLevel).$(TclRevision)\
+- $(ExternalsDir)tk-$(TkMajorVersion).$(TkMinorVersion).$(TkPatchLevel).$(TkRevision)\
+- $(ExternalsDir)tix-$(TixMajorVersion).$(TixMinorVersion).$(TixPatchLevel).$(TixRevision)\
+- $(ExternalsDir)tcltk-$(TclMajorVersion).$(TclMinorVersion).$(TclPatchLevel).$(TclRevision)\$(ArchName)\
++ $(condaDir)
++ $(condaDir)
++ $(condaDir)
++ $(condaDir)
+
+ tcl$(TclMajorVersion)$(TclMinorVersion)t$(TclDebugExt).dll
+ tcl$(TclMajorVersion)$(TclMinorVersion)t$(TclDebugExt).lib
+--
+2.30.2
+
diff --git a/recipe/patches/0023-egg-debugging-with-Windows-debug-builds.patch b/recipe/patches/0023-egg-debugging-with-Windows-debug-builds.patch
deleted file mode 100644
index aac507ba3..000000000
--- a/recipe/patches/0023-egg-debugging-with-Windows-debug-builds.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-From d5081f47837fe8de279c06c4b26ce2a6da02a3f2 Mon Sep 17 00:00:00 2001
-From: Ray Donnelly
-Date: Wed, 12 Feb 2020 21:35:50 +0100
-Subject: [PATCH 23/30] egg debugging with Windows debug builds
-
----
- Lib/zipimport.py | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/Lib/zipimport.py b/Lib/zipimport.py
-index 5ef0a17c2a..4e8d8da1f6 100644
---- a/Lib/zipimport.py
-+++ b/Lib/zipimport.py
-@@ -463,6 +463,7 @@ def _read_directory(archive):
- path = _bootstrap_external._path_join(archive, name)
- t = (path, compress, data_size, file_size, file_offset, time, date, crc)
- files[name] = t
-+ _bootstrap._verbose_message('zipimport: name : {}', name)
- count += 1
- _bootstrap._verbose_message('zipimport: found {} names in {!r}', count, archive)
- return files
---
-2.23.0
-
diff --git a/recipe/patches/0024-Add-CONDA_DLL_SEARCH_MODIFICATION_KEEP_GIL-to-aid-de.patch b/recipe/patches/0024-Add-CONDA_DLL_SEARCH_MODIFICATION_KEEP_GIL-to-aid-de.patch
deleted file mode 100644
index 323cc698e..000000000
--- a/recipe/patches/0024-Add-CONDA_DLL_SEARCH_MODIFICATION_KEEP_GIL-to-aid-de.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-From b994e0849ac776321ff1e91c6c8cdd6a31d107ab Mon Sep 17 00:00:00 2001
-From: Ray Donnelly
-Date: Tue, 18 Feb 2020 17:38:32 +0100
-Subject: [PATCH 24/30] Add CONDA_DLL_SEARCH_MODIFICATION_KEEP_GIL to aid
- debugging extension module load issues
-
-LIEF (before it was fixed) crashed because Python code gets called from its static initialization
-code (CreateModule2 gets called, more?) and it now drops the GIL during DLL init.
-
-So we add a flag in-case this comes up again: CONDA_DLL_SEARCH_MODIFICATION_KEEP_GIL which might
-be useful when debugging strange extension module import issues.
-
-There really isn't any way to get the ProcAddress without allowing static initialization to happen
----
- Python/dynload_win.c | 22 ++++++++++++++++++----
- 1 file changed, 18 insertions(+), 4 deletions(-)
-
-diff --git a/Python/dynload_win.c b/Python/dynload_win.c
-index 1b3e275614..071c2623b1 100644
---- a/Python/dynload_win.c
-+++ b/Python/dynload_win.c
-@@ -179,6 +179,11 @@ dl_funcptr _PyImport_FindSharedFuncptrWindows(const char *prefix,
- {
- HINSTANCE hDLL = NULL;
- unsigned int old_mode;
-+ /* The fix in https://bugs.python.org/issue33895 breaks 'import lief'. The fix means that any static initialization
-+ cannot call into Python (or if it does it needs to aquire the GIL itself.
-+ Other worse ideas:
-+ DONT_RESOLVE_DLL_REFERENCES :: https://devblogs.microsoft.com/oldnewthing/20050214-00/?p=36463 */
-+ int drop_gil = _wgetenv(L"CONDA_DLL_SEARCH_MODIFICATION_KEEP_GIL") ? 0 : 1;
-
- /* Don't display a message box when Python can't load a DLL */
- old_mode = SetErrorMode(SEM_FAILCRITICALERRORS);
-@@ -191,10 +196,15 @@ dl_funcptr _PyImport_FindSharedFuncptrWindows(const char *prefix,
- extern int CondaEcosystemModifyDllSearchPath(int, int);
- CondaEcosystemModifyDllSearchPath(1, 1);
-
-- Py_BEGIN_ALLOW_THREADS
-- hDLL = LoadLibraryExW(wpathname, NULL,
-- LOAD_WITH_ALTERED_SEARCH_PATH);
-- Py_END_ALLOW_THREADS
-+ if (drop_gil) {
-+ Py_BEGIN_ALLOW_THREADS
-+ hDLL = LoadLibraryExW(wpathname, NULL,
-+ LOAD_WITH_ALTERED_SEARCH_PATH);
-+ Py_END_ALLOW_THREADS
-+ } else {
-+ hDLL = LoadLibraryExW(wpathname, NULL,
-+ LOAD_WITH_ALTERED_SEARCH_PATH);
-+ }
-
- /* restore old error mode settings */
- SetErrorMode(old_mode);
---
-2.23.0
-
diff --git a/recipe/patches/0024-unvendor-xz.patch b/recipe/patches/0024-unvendor-xz.patch
new file mode 100644
index 000000000..59af786aa
--- /dev/null
+++ b/recipe/patches/0024-unvendor-xz.patch
@@ -0,0 +1,46 @@
+From e838a402624f2c6cfabb8de3c07c0a426aa34d6e Mon Sep 17 00:00:00 2001
+From: Isuru Fernando
+Date: Sat, 25 Sep 2021 10:07:05 -0700
+Subject: [PATCH 24/25] unvendor xz
+
+---
+ PCbuild/_lzma.vcxproj | 10 +++-------
+ 1 file changed, 3 insertions(+), 7 deletions(-)
+
+diff --git a/PCbuild/_lzma.vcxproj b/PCbuild/_lzma.vcxproj
+index 0565132363..e8b2704cee 100644
+--- a/PCbuild/_lzma.vcxproj
++++ b/PCbuild/_lzma.vcxproj
+@@ -93,15 +93,15 @@
+
+
+
+- $(lzmaDir)src/liblzma/api;%(AdditionalIncludeDirectories)
+- WIN32;_FILE_OFFSET_BITS=64;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;LZMA_API_STATIC;%(PreprocessorDefinitions)
++ $(condaDir)\include;%(AdditionalIncludeDirectories)
++ WIN32;_FILE_OFFSET_BITS=64;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;%(PreprocessorDefinitions)
+ /d1trimfile:%SRC_DIR%
+ /d1trimfile:%SRC_DIR%
+ /d1trimfile:%SRC_DIR%
+ /d1trimfile:%SRC_DIR%
+
+
+- $(OutDir)liblzma$(PyDebugExt).lib;%(AdditionalDependencies)
++ $(condaDir)\lib\liblzma.lib;%(AdditionalDependencies)
+
+
+
+@@ -115,10 +115,6 @@
+ {cf7ac3d1-e2df-41d2-bea6-1e2556cdea26}
+ false
+
+-
+- {12728250-16eC-4dc6-94d7-e21dd88947f8}
+- false
+-
+
+
+
+--
+2.30.2
+
diff --git a/recipe/patches/0025-cross-compile-darwin.patch b/recipe/patches/0025-cross-compile-darwin.patch
deleted file mode 100644
index 0615e85a1..000000000
--- a/recipe/patches/0025-cross-compile-darwin.patch
+++ /dev/null
@@ -1,93 +0,0 @@
-From b00423aa4195fc140328219d36b12cee4d24e17f Mon Sep 17 00:00:00 2001
-From: Ray Donnelly
-Date: Fri, 2 Oct 2020 00:03:12 +0200
-Subject: [PATCH 25/30] cross compile darwin
-
-By Isuru Fernando.
----
- Lib/platform.py | 7 ++++++-
- configure | 8 ++++++--
- setup.py | 2 +-
- 3 files changed, 13 insertions(+), 4 deletions(-)
-
-diff --git a/Lib/platform.py b/Lib/platform.py
-index e9f50ab622..408587d36c 100755
---- a/Lib/platform.py
-+++ b/Lib/platform.py
-@@ -409,7 +409,12 @@ def win32_ver(release='', version='', csd='', ptype=''):
- def _mac_ver_xml():
- fn = '/System/Library/CoreServices/SystemVersion.plist'
- if not os.path.exists(fn):
-- return None
-+ if 'SDKROOT' in os.environ:
-+ fn = os.environ['SDKROOT'] + fn
-+ if not os.path.exists(fn):
-+ return None
-+ else:
-+ return None
-
- try:
- import plistlib
-diff --git a/configure b/configure
-index a8e2400a15..f13bc8cbe0 100755
---- a/configure
-+++ b/configure
-@@ -3339,6 +3339,8 @@ fi
- $as_echo "\"$MACHDEP\"" >&6; }
-
-
-+if test -z "${_PYTHON_HOST_PLATFORM}"
-+then
- if test "$cross_compiling" = yes; then
- case "$host" in
- *-*-linux*)
-@@ -3363,6 +3365,7 @@ if test "$cross_compiling" = yes; then
- 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
-@@ -6210,7 +6213,7 @@ fi
- 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
-@@ -9326,7 +9329,7 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- 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)
-@@ -9353,6 +9356,7 @@ fi
- 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/setup.py b/setup.py
-index f2769081e8..a95162b43a 100644
---- a/setup.py
-+++ b/setup.py
-@@ -61,7 +61,7 @@ CROSS_COMPILING = ("_PYTHON_HOST_PLATFORM" in os.environ)
- HOST_PLATFORM = get_platform()
- MS_WINDOWS = (HOST_PLATFORM == 'win32')
- CYGWIN = (HOST_PLATFORM == 'cygwin')
--MACOS = (HOST_PLATFORM == 'darwin')
-+MACOS = (HOST_PLATFORM.startswith('darwin'))
- AIX = (HOST_PLATFORM.startswith('aix'))
- VXWORKS = ('vxworks' in HOST_PLATFORM)
-
---
-2.23.0
-
diff --git a/recipe/patches/0025-unvendor-zlib.patch b/recipe/patches/0025-unvendor-zlib.patch
new file mode 100644
index 000000000..b36bf1e5c
--- /dev/null
+++ b/recipe/patches/0025-unvendor-zlib.patch
@@ -0,0 +1,164 @@
+From fd2ed84332de0815cc0e26171fbc5093ef28ffde Mon Sep 17 00:00:00 2001
+From: Isuru Fernando
+Date: Wed, 29 Sep 2021 15:21:55 -0700
+Subject: [PATCH 25/25] unvendor zlib
+
+---
+ PCbuild/pythoncore.vcxproj | 31 ++------------
+ PCbuild/pythoncore.vcxproj.filters | 66 ------------------------------
+ 2 files changed, 4 insertions(+), 93 deletions(-)
+
+diff --git a/PCbuild/pythoncore.vcxproj b/PCbuild/pythoncore.vcxproj
+index 8da161b446..8f9852511a 100644
+--- a/PCbuild/pythoncore.vcxproj
++++ b/PCbuild/pythoncore.vcxproj
+@@ -82,7 +82,7 @@
+
+ true
+ true
+- true
++ true
+ false
+
+
+@@ -101,12 +101,13 @@
+
+ /d1trimfile:%SRC_DIR%
+ $(PySourcePath)Python;%(AdditionalIncludeDirectories)
+- $(zlibDir);%(AdditionalIncludeDirectories)
++ $(condaDir)\include;%(AdditionalIncludeDirectories)
+ _USRDLL;Py_BUILD_CORE;Py_BUILD_CORE_BUILTIN;Py_ENABLE_SHARED;MS_DLL_ID="$(SysWinVer)";%(PreprocessorDefinitions)
+ _Py_HAVE_ZLIB;%(PreprocessorDefinitions)
+
+
+- version.lib;shlwapi.lib;ws2_32.lib;pathcch.lib;%(AdditionalDependencies)
++ version.lib;shlwapi.lib;ws2_32.lib;pathcch.lib;zlib.lib;%(AdditionalDependencies)
++ $(condaDir)\lib;%(AdditionalLibraryDirectories)
+
+
+
+@@ -301,19 +302,6 @@
+
+
+
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+
+
+
+@@ -496,17 +484,6 @@
+
+
+
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+
+
+
+diff --git a/PCbuild/pythoncore.vcxproj.filters b/PCbuild/pythoncore.vcxproj.filters
+index 55b57ef29d..2fc1a57161 100644
+--- a/PCbuild/pythoncore.vcxproj.filters
++++ b/PCbuild/pythoncore.vcxproj.filters
+@@ -606,39 +606,6 @@
+
+ Include\internal
+
+-
+- Modules\zlib
+-
+-
+- Modules\zlib
+-
+-
+- Modules\zlib
+-
+-
+- Modules\zlib
+-
+-
+- Modules\zlib
+-
+-
+- Modules\zlib
+-
+-
+- Modules\zlib
+-
+-
+- Modules\zlib
+-
+-
+- Modules\zlib
+-
+-
+- Modules\zlib
+-
+-
+- Modules\zlib
+-
+
+
+
+@@ -1151,39 +1118,6 @@
+
+ Modules
+
+-
+- Modules\zlib
+-
+-
+- Modules\zlib
+-
+-
+- Modules\zlib
+-
+-
+- Modules\zlib
+-
+-
+- Modules\zlib
+-
+-
+- Modules\zlib
+-
+-
+- Modules\zlib
+-
+-
+- Modules\zlib
+-
+-
+- Modules\zlib
+-
+-
+- Modules\zlib
+-
+-
+- Modules\zlib
+-
+
+ Python
+
+--
+2.30.2
+
diff --git a/recipe/patches/README.md b/recipe/patches/README.md
new file mode 100644
index 000000000..c1e51062a
--- /dev/null
+++ b/recipe/patches/README.md
@@ -0,0 +1,17 @@
+### How to re-generate patches
+```bash
+old=v3.9.6
+new=v3.10.0
+git clone git@github.com:python/cpython && cd cpython
+git reset --hard $old
+for f in ../recipe/patches/*.patch; do
+ git am $f;
+done
+head=$(git rev-parse HEAD)
+git reset --hard $new
+git cherry-pick $old...$head # fix conflicts and make sure the editor doesn't add end of file line ending
+git format-patch $new
+for f in *.patch; do
+ python ../recipe/patches/make-mixed-crlf-patch.py $f;
+done
+```
diff --git a/recipe/patches/make-mixed-crlf-patch.py b/recipe/patches/make-mixed-crlf-patch.py
new file mode 100644
index 000000000..9e714118c
--- /dev/null
+++ b/recipe/patches/make-mixed-crlf-patch.py
@@ -0,0 +1,52 @@
+import sys
+import re
+import tempfile
+import shutil
+
+
+# Reads from argv[1] line-by-line, writes to same file. The patch
+# header lines are given LF line endings and the rest CRLF line endings.
+# Does not currently deal with the prelude (up to the -- in git patches).
+
+def main(argv):
+ filename = argv[1]
+ lines = []
+ with open(filename, 'rb') as fi:
+ try:
+ for line in fi:
+ line = line.decode('utf-8').strip('\n').strip('\r\n')
+ lines.append(line)
+ except:
+ pass
+ is_git_diff = False
+ for line in lines:
+ if line.startswith('diff --git'):
+ is_git_diff = True
+ in_real_patch = False if is_git_diff else True
+
+ text = "\n".join(lines)
+
+ if ".bat" not in text and ".vcxproj" not in text and ".props" not in text:
+ return
+
+ with open(filename, 'wb') as fo:
+ for i, line in enumerate(lines):
+ if not in_real_patch:
+ fo.write((line + '\n').encode('utf-8'))
+ if line.startswith('diff --git'):
+ in_real_patch = True
+ else:
+ if line.startswith('diff ') or \
+ line.startswith('diff --git') or \
+ line.startswith('--- ') or \
+ line.startswith('+++ ') or \
+ line.startswith('@@ ') or \
+ line.startswith('index ') or \
+ (i < len(lines) - 1 and lines[i+1].startswith("\ No newline at end of file")):
+ fo.write((line + '\n').encode('utf-8'))
+ else:
+ fo.write((line + '\r\n').encode('utf-8'))
+
+
+if __name__ == '__main__':
+ main(sys.argv)
diff --git a/recipe/run_test.py b/recipe/run_test.py
index c5bdfa117..f5d7f7cfa 100644
--- a/recipe/run_test.py
+++ b/recipe/run_test.py
@@ -1,3 +1,4 @@
+import os
import platform
import sys
import subprocess
@@ -59,7 +60,6 @@
import math
import mmap
import operator
-import parser
import pyexpat
import select
import time
@@ -93,13 +93,10 @@
import _tkinter
print('TK_VERSION: %s' % _tkinter.TK_VERSION)
print('TCL_VERSION: %s' % _tkinter.TCL_VERSION)
- if sys.platform == 'win32':
- TCLTK_VER = '8.6'
- else:
- TCLTK_VER = os.getenv("tk")
+ TCLTK_VER = os.getenv("tk")
assert _tkinter.TK_VERSION == _tkinter.TCL_VERSION == TCLTK_VER
import ssl
print('OPENSSL_VERSION:', ssl.OPENSSL_VERSION)
-if sys.platform != 'win32':
- assert '1.1.1' in ssl.OPENSSL_VERSION
+CONDA_OPENSSL_VERSION = os.getenv("openssl")
+assert CONDA_OPENSSL_VERSION in ssl.OPENSSL_VERSION
diff --git a/recipe/tests/prefix-replacement/build-and-test.sh b/recipe/tests/prefix-replacement/build-and-test.sh
index 95f9f3e01..633b741a3 100644
--- a/recipe/tests/prefix-replacement/build-and-test.sh
+++ b/recipe/tests/prefix-replacement/build-and-test.sh
@@ -1,30 +1,43 @@
#!/usr/bin/env bash
-set -x
+set -ex
-${CC} a.c $(python3-config --cflags) $(python3-config --ldflags) -o ${CONDA_PREFIX}/bin/embedded-python-static
-if ${READELF} -d ${CONDA_PREFIX}/bin/embedded-python-static | rg libpython; then
- echo "ERROR :: Embedded python linked to shared python library. It is expected to link to the static library."
-fi
-${CONDA_PREFIX}/bin/embedded-python-static
+if [[ "$PKG_NAME" == "libpython-static" ]]; then
+ # see bpo44182 for why -L${CONDA_PREFIX}/lib is added
+ ${CC} a.c $(python3-config --cflags) $(python3-config --embed --ldflags) -L${CONDA_PREFIX}/lib -o ${CONDA_PREFIX}/bin/embedded-python-static
+ if [[ "$target_platform" == linux-* ]]; then
+ if ${READELF} -d ${CONDA_PREFIX}/bin/embedded-python-static | rg libpython; then
+ echo "ERROR :: Embedded python linked to shared python library. It is expected to link to the static library."
+ fi
+ elif [[ "$target_platform" == osx-* ]]; then
+ if ${OTOOL} -l ${CONDA_PREFIX}/bin/embedded-python-static | rg libpython; then
+ echo "ERROR :: Embedded python linked to shared python library. It is expected to link to the static library."
+ fi
+ fi
+ ${CONDA_PREFIX}/bin/embedded-python-static
-# I thought this would prefer the shared library for Python. I was wrong:
-# EMBED_LDFLAGS=$(python3-config --ldflags)
-# re='^(.*)(-lpython[^ ]*)(.*)$'
-# if [[ ${EMBED_LDFLAGS} =~ $re ]]; then
-# EMBED_LDFLAGS="${BASH_REMATCH[1]} ${BASH_REMATCH[3]} -Wl,-Bdynamic ${BASH_REMATCH[2]}"
-# fi
-# ${CC} a.c $(python3-config --cflags) ${EMBED_LDFLAGS} -o ${CONDA_PREFIX}/bin/embedded-python-shared
+ # I thought this would prefer the shared library for Python. I was wrong:
+ # EMBED_LDFLAGS=$(python3-config --ldflags)
+ # re='^(.*)(-lpython[^ ]*)(.*)$'
+ # if [[ ${EMBED_LDFLAGS} =~ $re ]]; then
+ # EMBED_LDFLAGS="${BASH_REMATCH[1]} ${BASH_REMATCH[3]} -Wl,-Bdynamic ${BASH_REMATCH[2]}"
+ # fi
+ # ${CC} a.c $(python3-config --cflags) ${EMBED_LDFLAGS} -o ${CONDA_PREFIX}/bin/embedded-python-shared
+
+ # Brute-force way of linking to the shared library, sorry!
+ rm -rf ${CONDA_PREFIX}/lib/libpython*.a
+fi
-# Brute-force way of linking to the shared library, sorry!
-rm -rf ${CONDA_PREFIX}/lib/libpython*.a
+${CC} a.c $(python3-config --cflags) \
+ $(python3-config --embed --ldflags) \
+ -L${CONDA_PREFIX}/lib -Wl,-rpath,${CONDA_PREFIX}/lib \
+ -o ${CONDA_PREFIX}/bin/embedded-python-shared
-${CC} a.c $(python3-config --cflags) $(python3-config --ldflags) -o ${CONDA_PREFIX}/bin/embedded-python-shared
-if [[ -n ${READELF} ]]; then
+if [[ "$target_platform" == linux-* ]]; then
if ! ${READELF} -d ${CONDA_PREFIX}/bin/embedded-python-shared | rg libpython; then
echo "ERROR :: Embedded python linked to static python library. We tried to force it to use the shared library."
fi
-elif [[ -n ${OTOOL} ]]; then
+elif [[ "$target_platform" == osx-* ]]; then
if ! ${OTOOL} -l ${CONDA_PREFIX}/bin/embedded-python-shared | rg libpython; then
echo "ERROR :: Embedded python linked to static python library. We tried to force it to use the shared library."
fi