Skip to content

Commit

Permalink
Remove setup_win_python38.py and use init.py from conda, update CMake…
Browse files Browse the repository at this point in the history
…Lists.txt accordingly. Could break windows python tests
  • Loading branch information
aymanhab committed Jun 27, 2023
1 parent a54bf40 commit eaa9531
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 20 deletions.
5 changes: 0 additions & 5 deletions Bindings/Python/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -255,11 +255,6 @@ OpenSimPutFileInPythonPackage("${CMAKE_CURRENT_SOURCE_DIR}/setup.py" ".")
OpenSimPutFileInPythonPackage("${CMAKE_CURRENT_SOURCE_DIR}/__init__.py" opensim)

OpenSimPutFileInPythonPackage("${CMAKE_CURRENT_SOURCE_DIR}/report.py" opensim)
# for Python 3.8+/Windows we use a special script
# setup_win_python38.py to set additional dll directory in __init__.py on client machine
if (WIN32)
OpenSimPutFileInPythonPackage("${CMAKE_CURRENT_SOURCE_DIR}/setup_win_python38.py" ".")
endif()

# Test files. If you require more test resource files, list them here.
foreach(test_file
Expand Down
5 changes: 1 addition & 4 deletions Bindings/Python/__init__.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
import sys
import os
if (sys.version_info.major == 3 and sys.version_info.minor >= 8 and sys.platform.startswith('win')):
if (os.path.exists(os.path.join(sys.prefix, 'conda-meta'))):
if (sys.platform.startswith('win')):
os.add_dll_directory(os.path.dirname(os.path.realpath(__file__)))
else:
os.add_dll_directory(DLL_PATH)

from .simbody import *
from .common import *
Expand Down
11 changes: 0 additions & 11 deletions Bindings/Python/setup_win_python38.py

This file was deleted.

0 comments on commit eaa9531

Please sign in to comment.