This is an automated email from the ASF dual-hosted git repository.

xyz pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/pulsar-client-python.git


The following commit(s) were added to refs/heads/main by this push:
     new eafc672  Fix missing dependency of setuptools (#183)
eafc672 is described below

commit eafc6724381796e1f5d4e1afaad21dba715da9b9
Author: Zike Yang <[email protected]>
AuthorDate: Tue Dec 26 10:58:46 2023 +0800

    Fix missing dependency of setuptools (#183)
    
    ## Motivation
    
    There are some errors blocking the CI:
    
https://github.com/apache/pulsar-client-python/actions/runs/7321925272/job/19942911045?pr=181
    
https://github.com/apache/pulsar-client-python/actions/runs/7320564743/job/19942264377
    
    The python 3.12 has removed the setuptools for the default dependency by 
this PR: https://github.com/python/cpython/issues/95299
    
    > [gh-95299](https://github.com/python/cpython/issues/95299): Do not 
pre-install setuptools in virtual environments created with 
[venv](https://docs.python.org/3/library/venv.html#module-venv). This means 
that distutils, setuptools, pkg_resources, and easy_install will no longer 
available by default; to access these run pip install setuptools in the 
[activated](https://docs.python.org/3/library/venv.html#venv-explanation) 
virtual environment.
    
    ## Verification
    
    Verification CI: 
https://github.com/apache/pulsar-client-python/actions/runs/7325997832
    
    The result of CI shows that this fix could build the release wheel file 
successfully.
---
 .github/workflows/ci-build-release-wheels.yaml | 2 +-
 .github/workflows/ci-pr-validation.yaml        | 2 +-
 pkg/mac/build-dependencies.sh                  | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/.github/workflows/ci-build-release-wheels.yaml 
b/.github/workflows/ci-build-release-wheels.yaml
index 327a2a8..57ae562 100644
--- a/.github/workflows/ci-build-release-wheels.yaml
+++ b/.github/workflows/ci-build-release-wheels.yaml
@@ -199,7 +199,7 @@ jobs:
         shell: bash
         run: |
           cmake --build build --config Release --target install
-          python -m pip install wheel
+          python -m pip install wheel setuptools
           python setup.py bdist_wheel
           python -m pip install ./dist/*.whl
           python -c 'import pulsar; c = 
pulsar.Client("pulsar://localhost:6650"); c.close()'
diff --git a/.github/workflows/ci-pr-validation.yaml 
b/.github/workflows/ci-pr-validation.yaml
index 9e67402..40dcf5f 100644
--- a/.github/workflows/ci-pr-validation.yaml
+++ b/.github/workflows/ci-pr-validation.yaml
@@ -237,7 +237,7 @@ jobs:
         shell: bash
         run: |
           cmake --build build --config Release --target install
-          python -m pip install wheel
+          python -m pip install wheel setuptools
           python setup.py bdist_wheel
           python -m pip install ./dist/*.whl
           python -c 'import pulsar; c = 
pulsar.Client("pulsar://localhost:6650"); c.close()'
diff --git a/pkg/mac/build-dependencies.sh b/pkg/mac/build-dependencies.sh
index e317751..c6d22ab 100755
--- a/pkg/mac/build-dependencies.sh
+++ b/pkg/mac/build-dependencies.sh
@@ -29,7 +29,7 @@ PYTHON_VERSION_LONG=$2
 source pkg/mac/common.sh
 source build-support/dep-url.sh
 
-pip3 install pyyaml
+pip3 install pyyaml setuptools
 
 dep=$ROOT_DIR/build-support/dep-version.py
 PYBIND11_VERSION=$($dep pybind11)

Reply via email to