Skip to content

Changes for PyPI wheels #161

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 6 commits into from
Nov 11, 2024
Merged
Show file tree
Hide file tree
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
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
# OpenMM PyTorch Plugin
#----------------------------------------------------

# The version number is set here and copied to anywhere it is needed.
SET(OPENMM_TORCH_VERSION 1.5 CACHE STRING "The version of OpenMM-Torch that will be built." FORCE)

CMAKE_MINIMUM_REQUIRED(VERSION 3.5)

# We need to know where OpenMM is installed so we can access the headers and libraries.
Expand Down
4 changes: 0 additions & 4 deletions platforms/cuda/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,5 @@ IF (APPLE)
ENDIF (APPLE)

INSTALL(TARGETS ${SHARED_TARGET} DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/plugins)
# Ensure that links to the main library will be resolved.
IF (APPLE)
INSTALL(CODE "EXECUTE_PROCESS(COMMAND install_name_tool -add_rpath @loader_path/.. ${CMAKE_INSTALL_PREFIX}/lib/plugins/lib${SHARED_TARGET}.dylib)")
ENDIF (APPLE)

SUBDIRS (tests)
4 changes: 0 additions & 4 deletions platforms/opencl/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,6 @@ SET_TARGET_PROPERTIES(${SHARED_TARGET} PROPERTIES
LINK_FLAGS "${EXTRA_COMPILE_FLAGS}")

INSTALL(TARGETS ${SHARED_TARGET} DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/plugins)
# Ensure that links to the main library will be resolved.
IF (APPLE)
INSTALL(CODE "EXECUTE_PROCESS(COMMAND install_name_tool -add_rpath @loader_path/.. ${CMAKE_INSTALL_PREFIX}/lib/plugins/lib${SHARED_TARGET}.dylib)")
ENDIF (APPLE)

SUBDIRS (tests)

4 changes: 0 additions & 4 deletions platforms/reference/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,5 @@ SET_TARGET_PROPERTIES(${SHARED_TARGET} PROPERTIES
LINK_FLAGS "${EXTRA_COMPILE_FLAGS}")

INSTALL(TARGETS ${SHARED_TARGET} DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/plugins)
# Ensure that links to the main library will be resolved.
IF (APPLE)
INSTALL(CODE "EXECUTE_PROCESS(COMMAND install_name_tool -add_rpath @loader_path/.. ${CMAKE_INSTALL_PREFIX}/lib/plugins/lib${SHARED_TARGET}.dylib)")
ENDIF (APPLE)

SUBDIRS (tests)
2 changes: 1 addition & 1 deletion python/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ add_custom_command(
-python -c++
-o "${WRAP_FILE}"
"-I${OPENMM_DIR}/include"
${torchincs}
${torchincs}
"${CMAKE_CURRENT_SOURCE_DIR}/openmmtorch.i"
DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/openmmtorch.i"
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
Expand Down
4 changes: 3 additions & 1 deletion python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import os
import platform

version = '@OPENMM_TORCH_VERSION@'
openmm_dir = '@OPENMM_DIR@'
torch_include_dirs = '@TORCH_INCLUDE_DIRS@'.split(';')
nn_plugin_header_dir = '@NN_PLUGIN_HEADER_DIR@'
Expand All @@ -27,7 +28,8 @@
)

setup(name='openmmtorch',
version='1.0',
version=version,
py_modules=['openmmtorch'],
ext_modules=[extension],
install_requires=['openmm', 'torch']
)
Loading