Skip to content

fix: avoiding an extra system call #279

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 7, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions src/cmake/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# -*- coding: utf-8 -*-
import os
import platform
import subprocess
import sys

Expand All @@ -17,7 +16,7 @@
from skbuild.constants import CMAKE_INSTALL_DIR as SKBUILD_CMAKE_INSTALL_DIR
from skbuild.constants import set_skbuild_plat_name

if platform.system().lower() == "darwin":
if sys.platform.startswith("darwin"):
# Since building the project specifying --plat-name or CMAKE_OSX_* variables
# leads to different SKBUILD_DIR, the code below attempt to guess the most
# likely plat-name.
Expand All @@ -31,7 +30,7 @@
if os.path.exists(_cmake_data):
CMAKE_DATA = _cmake_data

if platform.system().lower() == "darwin":
if sys.platform.startswith("darwin"):
CMAKE_DATA = os.path.join(CMAKE_DATA, 'CMake.app', 'Contents')

CMAKE_BIN_DIR = os.path.join(CMAKE_DATA, 'bin')
Expand Down