diff --git a/.github/workflows/python-whl-osx.yaml b/.github/workflows/python-whl-osx.yaml new file mode 100644 index 0000000000000..a69d7d5a49808 --- /dev/null +++ b/.github/workflows/python-whl-osx.yaml @@ -0,0 +1,86 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# + +name: Python 37 wheel osx +on: + pull_request: + branches: + - master + +jobs: + + build-wheel-10_15: + name: build-wheel-10_15 + runs-on: macos-latest + timeout-minutes: 15 + + steps: + - name: checkout + uses: actions/checkout@v1 + + - name: brew pakages + run: brew install boost boost-python3 protobuf python jsoncpp openssl zlib + + - name: build wheel file + run: | + cd pulsar-client-cpp + cmake . -DBUILD_TESTS=OFF \ + -DLINK_STATIC=ON \ + -DPYTHON_LIBRARY=/usr/local/Frameworks/Python.framework/Versions/3.7/lib/libpython3.7.dylib \ + -DPYTHON_INCLUDE_DIR=/usr/local/Frameworks/Python.framework/Versions/3.7/include/python3.7m + make _pulsar -j8 + cd python + python3 setup.py bdist_wheel + cd ../.. + + - uses: actions/upload-artifact@master + name: upload wheel artifact + with: + name: python-wheel-artifacts + path: pulsar-client-cpp/python/dist + + build-wheel-10_14: + name: build-wheel-10_14 + runs-on: macos-10.14 + timeout-minutes: 15 + + steps: + - name: checkout + uses: actions/checkout@v1 + + - name: brew pakages + run: brew install boost boost-python3 protobuf python jsoncpp openssl zlib + + - name: build wheel file + run: | + cd pulsar-client-cpp + cmake . -DBUILD_TESTS=OFF \ + -DLINK_STATIC=ON \ + -DPYTHON_LIBRARY=/usr/local/Frameworks/Python.framework/Versions/3.7/lib/libpython3.7.dylib \ + -DPYTHON_INCLUDE_DIR=/usr/local/Frameworks/Python.framework/Versions/3.7/include/python3.7m + make _pulsar -j8 + cd python + python3 setup.py bdist_wheel + cd ../.. + + - uses: actions/upload-artifact@master + name: upload wheel artifact + with: + name: python-wheel-artifacts + path: pulsar-client-cpp/python/dist \ No newline at end of file diff --git a/pulsar-client-cpp/CMakeLists.txt b/pulsar-client-cpp/CMakeLists.txt index 55740b2e32a88..7e83e6f51cfe8 100644 --- a/pulsar-client-cpp/CMakeLists.txt +++ b/pulsar-client-cpp/CMakeLists.txt @@ -161,8 +161,8 @@ if (BUILD_PYTHON_WRAPPER) endif (BUILD_PYTHON_WRAPPER) if (APPLE) - set(OPENSSL_INCLUDE_DIR /usr/local/opt/openssl/include/) - set(OPENSSL_ROOT_DIR /usr/local/opt/openssl/) + set(OPENSSL_INCLUDE_DIR /usr/local/opt/openssl@1.1/include/) + set(OPENSSL_ROOT_DIR /usr/local/opt/openssl@1.1/) endif () find_package(OpenSSL REQUIRED)