Skip to content

Commit

Permalink
Merge pull request #54 from Klebert-Engineering/bugfix/macos-wheels
Browse files Browse the repository at this point in the history
Fix macOS Python RPATH
  • Loading branch information
josephbirkner authored May 17, 2021
2 parents f53b767 + 22dcb90 commit 2c10a23
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 13 deletions.
18 changes: 12 additions & 6 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,23 +52,29 @@ jobs:
architecture: x64
- run: python -m pip install setuptools wheel
- run: mkdir build
- name: Configure (macOS)
- name: Build (macOS)
if: matrix.os == 'macos-latest'
working-directory: build
run: |
python -m pip install delocate
brew install openssl
export OPENSSL_ROOT_DIR=$(brew --prefix openssl)
cmake -DPython3_ROOT_DIR=$pythonLocation -DPython3_FIND_FRAMEWORK=LAST ..
- name: Configure (Windows)
cmake -DPython3_ROOT_DIR=$pythonLocation \
-DPython3_FIND_FRAMEWORK=LAST \
-DHTTPLIB_USE_BROTLI_IF_AVAILABLE=OFF ..
cmake --build .
mv bin/wheel bin/wheel-auditme # Same as on Linux
mkdir bin/wheel && mv bin/wheel-auditme/zswag*.whl bin/wheel
../deps/python-cmake-wheel/repair-wheel-macos.bash \
"$(pwd)"/bin/wheel-auditme/pyzswagcl*.whl \
"$(pwd)"/bin/wheel pyzswagcl
- name: Build (Windows)
if: matrix.os == 'windows-latest'
working-directory: build
run: |
choco install --no-progress -y openssl
echo "cmake -DPython3_ROOT_DIR=$env:pythonLocation"
cmake "-DPython3_ROOT_DIR=$env:pythonLocation" -DPython3_FIND_REGISTRY=LAST ..
- name: Build
working-directory: build
run: |
cmake --build .
- name: Test
working-directory: build
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ enable_testing()

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(ZSWAG_VERSION 1.0.3)
set(ZSWAG_VERSION 1.0.4)

if (NOT MSVC)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
Expand Down
2 changes: 1 addition & 1 deletion deps/python-cmake-wheel
8 changes: 4 additions & 4 deletions libs/pyzswagcl/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
project(pyzswagcl)

pybind11_add_module(pyzswagcl
SHARED
py-zswagcl.cpp
py-openapi-client.cpp
py-openapi-client.h)
MODULE
py-zswagcl.cpp
py-openapi-client.cpp
py-openapi-client.h)

if (CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
target_compile_options(pyzswagcl PUBLIC /permissive-)
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ connexion
requests
zserio==2.3.0
pyyaml
pyzswagcl
pyzswagcl>=1.0.4

0 comments on commit 2c10a23

Please sign in to comment.