From b8af500ee60a181cd58c01a298a12abf6969ba04 Mon Sep 17 00:00:00 2001 From: "Scott Beddall (from Dev Box)" Date: Tue, 12 Mar 2024 15:28:01 -0700 Subject: [PATCH 1/8] resolve issue with cibuildwheel failure --- eng/ci_tools.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/ci_tools.txt b/eng/ci_tools.txt index 40e56bd3c236..ef225cec17cb 100644 --- a/eng/ci_tools.txt +++ b/eng/ci_tools.txt @@ -13,7 +13,7 @@ wrapt==1.12.1; python_version <= '3.10' wrapt==1.15.0; python_version >= '3.11' typing-extensions<=4.6.3 pyproject-api<1.6 -cibuildwheel==2.16.2 ; python_version > '3.8' +cibuildwheel==2.16.2 ; python_version >= '3.8' # requirements leveraged for testing pytest==7.3.1 From 0885996233b5275f1314c645467087e0c7306fbd Mon Sep 17 00:00:00 2001 From: "Scott Beddall (from Dev Box)" Date: Tue, 12 Mar 2024 15:31:32 -0700 Subject: [PATCH 2/8] pin the version of cibuildwheel everywhere --- eng/ci_tools.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/ci_tools.txt b/eng/ci_tools.txt index ef225cec17cb..3434d393e29f 100644 --- a/eng/ci_tools.txt +++ b/eng/ci_tools.txt @@ -13,7 +13,7 @@ wrapt==1.12.1; python_version <= '3.10' wrapt==1.15.0; python_version >= '3.11' typing-extensions<=4.6.3 pyproject-api<1.6 -cibuildwheel==2.16.2 ; python_version >= '3.8' +cibuildwheel==2.16.5 # requirements leveraged for testing pytest==7.3.1 From 16ecfd485e6f3ff16878344644370c7e08ad99cf Mon Sep 17 00:00:00 2001 From: "Scott Beddall (from Dev Box)" Date: Tue, 12 Mar 2024 15:41:17 -0700 Subject: [PATCH 3/8] add a freeze step --- eng/pipelines/templates/steps/build-package-artifacts.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/eng/pipelines/templates/steps/build-package-artifacts.yml b/eng/pipelines/templates/steps/build-package-artifacts.yml index c5f4298b76cf..3357dae4ce25 100644 --- a/eng/pipelines/templates/steps/build-package-artifacts.yml +++ b/eng/pipelines/templates/steps/build-package-artifacts.yml @@ -78,6 +78,7 @@ steps: condition: and(succeeded(), eq(variables['Agent.OS'], 'Linux')) - pwsh: | + python -m pip freeze sdk_build -d "$(Build.ArtifactStagingDirectory)" "$(TargetingString)" --service=${{parameters.ServiceDirectory}} --inactive displayName: 'Generate Packages' condition: succeededOrFailed() From 2f41ae50a670e9bf3779caa5bb3a72e803a63743 Mon Sep 17 00:00:00 2001 From: "Scott Beddall (from Dev Box)" Date: Tue, 12 Mar 2024 15:49:57 -0700 Subject: [PATCH 4/8] move pip freeze within the call --- tools/azure-sdk-tools/ci_tools/build.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/azure-sdk-tools/ci_tools/build.py b/tools/azure-sdk-tools/ci_tools/build.py index dabdb11cb021..55c66c39a9e2 100644 --- a/tools/azure-sdk-tools/ci_tools/build.py +++ b/tools/azure-sdk-tools/ci_tools/build.py @@ -183,6 +183,7 @@ def create_package( if enable_wheel: if setup_parsed.ext_modules: + run([sys.executable, "-m", "pip", "freeze"], check=True) run([sys.executable, "-m", "cibuildwheel", "--output-dir", dist], cwd=setup_parsed.folder, check=True) else: run([sys.executable, "setup.py", "bdist_wheel", "-d", dist], cwd=setup_parsed.folder, check=True) From 002ed80895500a18798d3b166300c7bd566e4a48 Mon Sep 17 00:00:00 2001 From: "Scott Beddall (from Dev Box)" Date: Tue, 12 Mar 2024 15:50:30 -0700 Subject: [PATCH 5/8] remove pip freeze call from just before sdk_build --- eng/pipelines/templates/steps/build-package-artifacts.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/eng/pipelines/templates/steps/build-package-artifacts.yml b/eng/pipelines/templates/steps/build-package-artifacts.yml index 3357dae4ce25..c5f4298b76cf 100644 --- a/eng/pipelines/templates/steps/build-package-artifacts.yml +++ b/eng/pipelines/templates/steps/build-package-artifacts.yml @@ -78,7 +78,6 @@ steps: condition: and(succeeded(), eq(variables['Agent.OS'], 'Linux')) - pwsh: | - python -m pip freeze sdk_build -d "$(Build.ArtifactStagingDirectory)" "$(TargetingString)" --service=${{parameters.ServiceDirectory}} --inactive displayName: 'Generate Packages' condition: succeededOrFailed() From e6f8a3091b0c61d2cc65febdffd2c53e30c7c19a Mon Sep 17 00:00:00 2001 From: "Scott Beddall (from Dev Box)" Date: Tue, 12 Mar 2024 16:13:44 -0700 Subject: [PATCH 6/8] additional debugging output --- .../templates/steps/build-package-artifacts.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/eng/pipelines/templates/steps/build-package-artifacts.yml b/eng/pipelines/templates/steps/build-package-artifacts.yml index c5f4298b76cf..d884f6b29f0f 100644 --- a/eng/pipelines/templates/steps/build-package-artifacts.yml +++ b/eng/pipelines/templates/steps/build-package-artifacts.yml @@ -44,6 +44,17 @@ steps: displayName: 'Tag scheduled builds' condition: and(eq(variables['Build.SourceBranchName'], variables['DefaultBranch']), eq(variables['Build.Reason'],'Schedule')) + - script: | + python -m pip freeze + displayName: Output pip + continueOnError: true + + - script: | + where cibuildwheel + which cibuildwheel + displayName: check for cibuildwheel + continueOnError: true + - task: UsePythonVersion@0 displayName: 'Use Python $(PythonVersion)' inputs: From ccb3f4127282e9ca91b1590abf62c617d50c1900 Mon Sep 17 00:00:00 2001 From: "Scott Beddall (from Dev Box)" Date: Tue, 12 Mar 2024 16:15:35 -0700 Subject: [PATCH 7/8] add a build-system requires to the pyproject.toml so that wheel will actually install? --- sdk/storage/azure-storage-extensions/pyproject.toml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sdk/storage/azure-storage-extensions/pyproject.toml b/sdk/storage/azure-storage-extensions/pyproject.toml index 52f10da89016..c5e1986ba549 100644 --- a/sdk/storage/azure-storage-extensions/pyproject.toml +++ b/sdk/storage/azure-storage-extensions/pyproject.toml @@ -13,6 +13,9 @@ bandit = false # these can be any number of suppressions. note that * present means that ALL warnings will be suppressed for this package suppressed_skip_warnings = ["*"] +[build-system] +requires = ["setuptools", "wheel", "cibuildwheel"] + [tool.cibuildwheel] build = ["cp38*", "pp38*", "pp39*", "pp310*"] test-requires = "pytest" From 6aee1fc21699a677f027d2d7b19b3a0bd66c0abe Mon Sep 17 00:00:00 2001 From: "Scott Beddall (from Dev Box)" Date: Wed, 13 Mar 2024 11:50:16 -0700 Subject: [PATCH 8/8] revert the investigatory changes --- .../templates/steps/build-package-artifacts.yml | 11 ----------- tools/azure-sdk-tools/ci_tools/build.py | 1 - 2 files changed, 12 deletions(-) diff --git a/eng/pipelines/templates/steps/build-package-artifacts.yml b/eng/pipelines/templates/steps/build-package-artifacts.yml index d884f6b29f0f..c5f4298b76cf 100644 --- a/eng/pipelines/templates/steps/build-package-artifacts.yml +++ b/eng/pipelines/templates/steps/build-package-artifacts.yml @@ -44,17 +44,6 @@ steps: displayName: 'Tag scheduled builds' condition: and(eq(variables['Build.SourceBranchName'], variables['DefaultBranch']), eq(variables['Build.Reason'],'Schedule')) - - script: | - python -m pip freeze - displayName: Output pip - continueOnError: true - - - script: | - where cibuildwheel - which cibuildwheel - displayName: check for cibuildwheel - continueOnError: true - - task: UsePythonVersion@0 displayName: 'Use Python $(PythonVersion)' inputs: diff --git a/tools/azure-sdk-tools/ci_tools/build.py b/tools/azure-sdk-tools/ci_tools/build.py index 55c66c39a9e2..dabdb11cb021 100644 --- a/tools/azure-sdk-tools/ci_tools/build.py +++ b/tools/azure-sdk-tools/ci_tools/build.py @@ -183,7 +183,6 @@ def create_package( if enable_wheel: if setup_parsed.ext_modules: - run([sys.executable, "-m", "pip", "freeze"], check=True) run([sys.executable, "-m", "cibuildwheel", "--output-dir", dist], cwd=setup_parsed.folder, check=True) else: run([sys.executable, "setup.py", "bdist_wheel", "-d", dist], cwd=setup_parsed.folder, check=True)