Skip to content

Commit

Permalink
fix: update build system with CMAKE_ARGS from scikit-build
Browse files Browse the repository at this point in the history
  • Loading branch information
henryiii authored and asmorkalov committed Jun 29, 2023
1 parent 0ec125d commit d82d7c2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 11 deletions.
8 changes: 5 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
[build-system]
requires = [
"setuptools==59.2.0", "wheel==0.37.0", "cmake>=3.1", "pip",
"scikit-build>=0.13.2",
"cmake>=3.1",
"numpy==1.13.3; python_version=='3.6' and platform_machine != 'aarch64' and platform_machine != 'arm64'",
"numpy==1.17.0; python_version=='3.7' and platform_machine != 'aarch64' and platform_machine != 'arm64'",
"numpy==1.17.5; python_version=='3.8' and platform_machine != 'aarch64' and platform_machine != 'arm64'",
Expand All @@ -10,5 +9,8 @@ requires = [
"numpy==1.19.3; python_version=='3.9' and platform_machine != 'aarch64' and platform_machine != 'arm64'",
"numpy==1.21.2; python_version=='3.10' and platform_system!='Darwin'",
"numpy==1.21.4; python_version=='3.10' and platform_system=='Darwin'",
"numpy==1.23.2; python_version>='3.11'"
"numpy==1.22.2; python_version>='3.11'",
"pip",
"scikit-build>=0.14.0",
"setuptools==59.2.0",
]
9 changes: 1 addition & 8 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,13 +256,6 @@ def main():
cmake_args.append("-DWITH_LAPACK=ON")
cmake_args.append("-DENABLE_PRECOMPILED_HEADERS=OFF")

# https://github.com/scikit-build/scikit-build/issues/479
if "CMAKE_ARGS" in os.environ:
import shlex

cmake_args.extend(shlex.split(os.environ["CMAKE_ARGS"]))
del shlex

# works via side effect
RearrangeCMakeOutput(
rearrange_cmake_output_data, files_outside_package_dir, package_data.keys()
Expand Down Expand Up @@ -314,7 +307,7 @@ def main():
)


class RearrangeCMakeOutput(object):
class RearrangeCMakeOutput:
"""
Patch SKBuild logic to only take files related to the Python package
and construct a file hierarchy that SKBuild expects (see below)
Expand Down

0 comments on commit d82d7c2

Please sign in to comment.