Skip to content

Commit

Permalink
Try with scikit-build-core branch
Browse files Browse the repository at this point in the history
  • Loading branch information
JeanChristopheMorinPerso committed Nov 24, 2024
1 parent f40c842 commit 5f8b0e1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 53 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ jobs:
- name: Clone OpenTimelineIO
uses: actions/checkout@v4
with:
repository: AcademySoftwareFoundation/OpenTimelineIO
ref: v0.17.0
repository: JeanChristopheMorinPerso/OpenTimelineIO
ref: switch_to_scikit_build_core
path: OpenTimelineIO
submodules: 'recursive'

Expand All @@ -38,6 +38,8 @@ jobs:
output-dir: dist
env:
CIBW_PLATFORM: pyodide
CIBW_BUILD_FRONTEND: 'build'
CIBW_CONFIG_SETTINGS: 'exports=whole_archive'

# - run: |
# pip install pyodide-build==0.22.1
Expand Down
51 changes: 0 additions & 51 deletions patch.patch
Original file line number Diff line number Diff line change
@@ -1,54 +1,3 @@
diff --git a/pyproject.toml b/pyproject.toml
index 1cd8845..34a3940 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -5,3 +5,6 @@ requires = [
"cmake>=3.12",
]
build-backend = "setuptools.build_meta"
+
+[tool.cibuildwheel.pyodide]
+build-frontend = {name = "build", args = ["--exports", "whole_archive"]}
diff --git a/setup.py b/setup.py
index 658fde4..c40bb5a 100644
--- a/setup.py
+++ b/setup.py
@@ -18,6 +18,7 @@ import platform
import subprocess
import tempfile
import shutil
+import sysconfig

from setuptools import (
setup,
@@ -79,10 +80,13 @@ class OTIO_build_ext(setuptools.command.build_ext.build_ext):
if not os.path.exists(self.build_temp_dir):
os.makedirs(self.build_temp_dir)

- debug = (self.debug or bool(os.environ.get("OTIO_CXX_DEBUG_BUILD")))
- self.build_config = ('Debug' if debug else 'Release')
+ self.build_config = os.environ.get("OTIO_CXX_BUILD_TYPE")
+ if not self.build_config:
+ debug = (self.debug or bool(os.environ.get("OTIO_CXX_DEBUG_BUILD")))
+ self.build_config = ('Debug' if debug else 'Release')

- self.cmake_preflight_check()
+ # self.cmake_preflight_check()
+ self.announce(os.listdir(os.path.join(os.path.dirname(sys.executable), '..')), level=2)
self.cmake_generate()
self.cmake_install()

@@ -105,7 +109,9 @@ class OTIO_build_ext(setuptools.command.build_ext.build_ext):
# interpreter that was used to execute the setup.py.
# See https://cmake.org/cmake/help/v3.20/module/FindPython.html#artifacts-specification # noqa: E501
# Also, be careful, CMake is case sensitive ;)
- '-DPython_EXECUTABLE=' + sys.executable,
+ '-DPython_EXECUTABLE=' + os.path.join(sysconfig.get_config_var("prefix"), "bin", "python"),
+ '-DPYTHON_INCLUDE_DIR=' + sysconfig.get_path('include'),
+ '-DPython_INCLUDE_DIR=' + sysconfig.get_path('include'),
'-DOTIO_PYTHON_INSTALL:BOOL=ON',
'-DOTIO_CXX_INSTALL:BOOL=OFF',
'-DOTIO_SHARED_LIBS:BOOL=OFF',
diff --git a/src/py-opentimelineio/opentimelineio-bindings/CMakeLists.txt b/src/py-opentimelineio/opentimelineio-bindings/CMakeLists.txt
index d37da36..5559ce3 100644
--- a/src/py-opentimelineio/opentimelineio-bindings/CMakeLists.txt
Expand Down

0 comments on commit 5f8b0e1

Please sign in to comment.