Skip to content

Commit d2fc0a9

Browse files
authored
Merge pull request #40 from esa/fix-macos-x86
Fix Deployment for macOS x86_64 wheels on PyPi
2 parents a65860e + fc28b11 commit d2fc0a9

File tree

9 files changed

+32
-30
lines changed

9 files changed

+32
-30
lines changed

.github/workflows/wheels.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ jobs:
2323
- uses: actions/checkout@v3
2424
############################# LINUX WHEELS #############################
2525
# In case of Linux we need to install compiler and build tools before building the wheels
26-
# We further only build the manylinux wheels, but not the musllinux wheels
26+
# We only build the manylinux wheels, but not the musllinux wheels (due to some compile problems)
27+
# We set-up QEMU to enable aarch64 builds in the GitHub Runner (which is x86_64 based)
2728
- name: Set up QEMU
2829
uses: docker/setup-qemu-action@v3
2930
with:
@@ -41,8 +42,10 @@ jobs:
4142
output-dir: dist
4243
if: matrix.os == 'ubuntu-latest'
4344
############################# MACOS WHEELS #############################
44-
# Building on macOS requires an installation of gcc since the default clang compiler
45-
# lacks certain features required for building the package
45+
# We use Apple Clang, the macOS GitHub Runner is nowadays arm64 based
46+
# The GCC compiler installable via brew does not support cross-compiling for x86_64. Hence, also Apple Claang
47+
# For the x86_64, we set the MACOSX_DEPLOYMENT_TARGET='10.13' (released 2017) in order to have support for C++17
48+
# We don't need this for the arm64 stuff since it works (and macOS on arm64 cam after C++17)
4649
- name: Build wheels (macOS ARM)
4750
uses: pypa/[email protected]
4851
env:
@@ -56,8 +59,8 @@ jobs:
5659
- name: Build wheels (macOS x86_64)
5760
uses: pypa/[email protected]
5861
env:
59-
CIBW_BEFORE_BUILD: brew install ninja gcc@12
60-
CIBW_ENVIRONMENT: "CC=gcc-12 CXX=g++-12"
62+
CIBW_BEFORE_BUILD: brew install ninja
63+
CIBW_ENVIRONMENT: 'MACOSX_DEPLOYMENT_TARGET="10.13"'
6164
CIBW_ARCHS_MACOS: "x86_64"
6265
CIBW_TEST_COMMAND: 'python -c "import polyhedral_gravity"'
6366
with:
@@ -66,6 +69,7 @@ jobs:
6669
if: matrix.os == 'macos-latest'
6770
############################# WINDOWS WHEELS #############################
6871
# Set up the Visual Studio environment on Windows (required, so that CMake finds the compiler)
72+
# We use the Microsoft Visual Studio Compiler to compile the wheel
6973
- uses: ilammy/msvc-dev-cmd@v1
7074
if: matrix.os == 'windows-latest'
7175
- name: Build wheels (Windows)

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -258,12 +258,12 @@ The project uses the following dependencies,
258258
all of them are **automatically** set-up via CMake:
259259

260260
- GoogleTest (1.13.0 or compatible), only required for testing
261-
- spdlog (1.11.0 or compatible), required for logging
261+
- spdlog (1.13.0 or compatible), required for logging
262262
- tetgen (1.6 or compatible), required for I/O
263-
- yaml-cpp (0.7.0 or compatible), required for I/O
263+
- yaml-cpp (0.8.0 or compatible), required for I/O
264264
- thrust (2.1.0 or compatible), required for parallelization and utility
265265
- xsimd (11.1.0 or compatible), required for vectorization of the `atan(..)`
266-
- pybind11 (2.10.4 or compatible), required for the Python interface, but not the C++ standalone
266+
- pybind11 (2.12.0 or compatible), required for the Python interface, but not the C++ standalone
267267

268268
The module will be build using a C++17 capable compiler,
269269
CMake. Just execute the following command in

cmake/pybind11.cmake

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ include(FetchContent)
22

33
message(STATUS "Setting up pybind11")
44

5-
find_package(pybind11 2.10.4 QUIET)
5+
find_package(pybind11 2.12.0 QUIET)
66

77
if (${pybind11_FOUND})
88

@@ -12,11 +12,10 @@ else()
1212

1313
message(STATUS "Using pybind11 from git repository")
1414

15-
#Fetches the version 2.10.4 from the official github of pybind11
1615
FetchContent_Declare(pybind11
1716
GIT_REPOSITORY https://github.com/pybind/pybind11
18-
GIT_TAG v2.10.4
19-
)
17+
GIT_TAG v2.12.0
18+
)
2019

2120
FetchContent_MakeAvailable(pybind11)
2221

cmake/spdlog.cmake

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ include(FetchContent)
22

33
message(STATUS "Setting up spdlog")
44

5-
find_package(spdlog 1.11.0 QUIET)
5+
find_package(spdlog 1.13.0 QUIET)
66

77
if (${spdlog_FOUND})
88

@@ -12,11 +12,10 @@ else()
1212

1313
message(STATUS "Using spdlog from git repository")
1414

15-
#Fetches the version 1.11.0 for spdlog
1615
FetchContent_Declare(spdlog
1716
GIT_REPOSITORY https://github.com/gabime/spdlog.git
18-
GIT_TAG v1.11.0
19-
)
17+
GIT_TAG v1.13.0
18+
)
2019

2120
# Disable stuff we don't need
2221
option(SPDLOG_BUILD_EXAMPLE "" OFF)

cmake/tbb.cmake

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ include(FetchContent)
22

33
message(STATUS "Setting up tbb via CMake")
44

5-
#Fetches the version v2021.5.0 from the official github of tbb
5+
#Fetches the version v2021.12.0 from the official github of tbb
66
FetchContent_Declare(tbb
77
GIT_REPOSITORY https://github.com/oneapi-src/oneTBB.git
8-
GIT_TAG v2021.5.0
9-
)
8+
GIT_TAG v2021.12.0
9+
)
1010

1111
# Disable tests & and do not treat tbb-compile errors as warnings
1212
option(TBB_TEST "Enable testing" OFF)

cmake/yaml.cmake

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,18 @@ include(FetchContent)
22

33
message(STATUS "Setting up yaml-cpp")
44

5-
find_package(yaml-cpp 0.7.0 QUIET)
5+
find_package(yaml-cpp 0.8.0 QUIET)
66

77
if (${yaml-cpp_FOUND})
88

99
message(STATUS "Using existing yaml-cpp installation")
1010

1111
else()
1212

13-
#Fetches the version 0.7.0 for yaml-cpp
13+
#Fetches the version 0.8.0 for yaml-cpp
1414
FetchContent_Declare(yaml-cpp
1515
GIT_REPOSITORY https://github.com/jbeder/yaml-cpp.git
16-
GIT_TAG yaml-cpp-0.7.0
16+
GIT_TAG 0.8.0
1717
)
1818

1919
# Disable everything we don't need

docs/background/mesh_integrity.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,13 @@ The :code:`Polyhedron` class checks the pointing direction of every single
5454
normal. This way, the `Polyhedron` ensures correct results even if a mistake occurs during the definition.
5555

5656
Since we are in 3D and might have concave and convex polyhedrons,
57-
the viable option is the `Möller–Trumbore intersection algorithm <https://en.wikipedia.org/wiki/Möller–Trumbore_intersection_algorithm>`__.
58-
It checks the amount of intersections the plane unit normal has with the polyhedron.
59-
If its an even number, the normals is :code:`OUTWARDS` pointing, otherwise :code:`INWARDS`.
57+
the most viable option is the `Möller–Trumbore intersection algorithm <https://en.wikipedia.org/wiki/Möller–Trumbore_intersection_algorithm>`__.
58+
It checks the amount of intersections each plane unit normal has with the polyhedron.
59+
If this is an even number, the normal is :code:`OUTWARDS` pointing, otherwise :code:`INWARDS`.
6060
In the *current implementation*, we implement a naiv version
6161
which takes :math:`O(n^2)` operations - which can get quite expensive for polyhedrons with many faces.
6262

63-
To make this as straightforward to use as possible, we provide four options
63+
To make this as straightforward to use, we provide four options
6464
for the construction of a polyhedron in the form of the enum :code:`PolyhedronIntegrity`:
6565

6666
+-----------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------+----------------+

docs/quickstart/installation.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,10 +105,10 @@ Dependencies (automatically set-up)
105105
Dependencies (all of them are automatically set-up via :code:`CMake`):
106106

107107
- GoogleTest (1.13.0 or compatible), only required for testing
108-
- spdlog (1.11.0 or compatible), required for logging
108+
- spdlog (1.13.0 or compatible), required for logging
109109
- tetgen (1.6 or compatible), required for I/O
110-
- yaml-cpp (0.7.0 or compatible), required for I/O
110+
- yaml-cpp (0.8.0 or compatible), required for I/O
111111
- thrust (2.1.0 or compatible), required for parallelization and utility
112112
- xsimd (11.1.0 or compatible), required for vectorization of the :code:`atan(..)`
113-
- pybind11 (2.10.4 or compatible), required for the Python interface, but not the C++ standalone
113+
- pybind11 (2.12.0 or compatible), required for the Python interface, but not the C++ standalone
114114

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ def build_extension(self, ext):
175175
# --------------------------------------------------------------------------------
176176
setup(
177177
name="polyhedral_gravity",
178-
version="3.1",
178+
version="3.2",
179179
author="Jonas Schuhmacher",
180180
author_email="[email protected]",
181181
description="Package to compute full gravity tensor of a given constant density polyhedron for arbitrary points "

0 commit comments

Comments
 (0)