Skip to content

Commit

Permalink
try a shell build on windowx
Browse files Browse the repository at this point in the history
  • Loading branch information
mikedh committed Mar 8, 2024
1 parent 69c5c01 commit 2fb878b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion build.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def build_windows(lib_name: str = "openctm.dll") -> dict:
# remove any prior built artifacts from the library
subprocess.check_call(["git", "clean", "-xdf"], cwd=ctm_lib)
# run in the windows environment
subprocess.check_call(["make", "-f", "Makefile.msvc"], cwd=ctm_lib)
subprocess.check_call(' '.join(["make", "-f", "Makefile.msvc"]), cwd=ctm_lib, shell=True)

with open(os.path.join(ctm_lib, lib_name), "rb") as f:
return {lib_name: f.read()}
Expand Down
3 changes: 2 additions & 1 deletion openctm/binding.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@
elif os.name == "posix":
# hardcode the support library to the location from the wheel
_ctm_lib = ctypes.CDLL(os.path.join(_cwd, "libopenctm.so"))

elif os.name == 'darwin':
_ctm_lib = ctypes.CDLL(os.path.join(_cwd, "libopenctm.dylib"))

def load_ctm(file_obj, file_type=None, **kwargs):
"""
Expand Down

0 comments on commit 2fb878b

Please sign in to comment.