Skip to content
Permalink
Browse files
restore wheel matrix, remove verbosity, condition find_package(Python…
…3) on cmake version to address issue
  • Loading branch information
jmalkin committed May 4, 2022
1 parent 6327031 commit a1fb186e75d4545b4bb3de2623c19acccece57f8
Showing 3 changed files with 15 additions and 23 deletions.
@@ -40,18 +40,18 @@ jobs:
fail-fast: false
matrix:
config:
#- {
# name: "MacOS 10.15",
# os: macos-latest
# }
- {
name: "MacOS 10.15",
os: macos-latest
}
- {
name: "Ubuntu Latest",
os: ubuntu-latest
}
#- {
# name: "Windows Latest",
# os: windows-latest
# }
- {
name: "Windows Latest",
os: windows-latest
}

steps:
- name: Checkout
@@ -69,8 +69,7 @@ jobs:
run: python -m cibuildwheel --output-dir dist
env:
CIBW_BEFORE_BUILD: python -m pip install cmake>=3.18
CIBW_BUILD_VERBOSITY: 3
CIBW_SKIP: "*-win32 pp*-macosx* muslinux* *i686"
CIBW_SKIP: "*-win32 pp*-macosx*"
CIBW_ARCHS_MACOS: "x86_64 arm64 universal2"

- uses: actions/upload-artifact@v2
@@ -15,13 +15,11 @@
# specific language governing permissions and limitations
# under the License.

message("CMAKE_VERSION: " ${CMAKE_VERSION})
message("Python_EXECUTABLE: " ${Python_EXECUTABLE})
message("Python_ROOT_DIR: " ${Python_ROOT_DIR})

find_package(Python3 COMPONENTS Interpreter Development)

message("Python version: " ${Python_VERSION})
if(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.18.0")
find_package(Python3 COMPONENTS Interpreter Development.Module REQUIRED)
else()
find_package(Python3 COMPONENTS Interpreter Development REQUIRED)
endif()

# only Windows+MSVC seems to have trouble locating pybind11
if (MSVC)
@@ -33,9 +31,6 @@ if (MSVC)
endif()

find_package(pybind11 CONFIG REQUIRED)
message("PYBIND11_PYTHON_VERSION: " ${PYBIND11_PYTHON_VERSION})
message("pybind11_INCLUDE_DIR: " ${pybind11_INCLUDE_DIR})
message("pybind11_INCLUDE_DIRS: " ${pybind11_INCLUDE_DIRS})

pybind11_add_module(python MODULE EXCLUDE_FROM_ALL THIN_LTO)

@@ -51,9 +51,7 @@ def build_extension(self, ext):
cmake_args += ['-DWITH_PYTHON=True']
cmake_args += ['-DCMAKE_CXX_STANDARD=11']
# ensure we use a consistent python version
cmake_args += ['-DPython_EXECUTABLE=' + sys.executable]
cmake_args += ['-DPython_ROOT_DIR=' + os.path.dirname(sys.executable)]
cmake_args += ['--trace-expand']
cmake_args += ['-DPython3_EXECUTABLE=' + sys.executable]
cfg = 'Debug' if self.debug else 'Release'
build_args = ['--config', cfg]

0 comments on commit a1fb186

Please sign in to comment.