Skip to content

Commit

Permalink
remove versioned libraries
Browse files Browse the repository at this point in the history
  • Loading branch information
isuruf committed Apr 29, 2024
1 parent 5792545 commit 8733e67
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 9 deletions.
11 changes: 2 additions & 9 deletions recipe/build_openmm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -88,12 +88,6 @@ export OPENMM_LIB_PATH=$PREFIX/lib
export OPENMM_INCLUDE_PATH=$PREFIX/include
$PYTHON -m pip wheel . --wheel-dir=dist

if [[ "$target_platform" == "osx-"* ]]; then
LIBNAME=libOpenMM.8.1.dylib
else
LIBNAME=libOpenMM.so.8.1
fi

# vendor include directories and libraries
for whl in $PWD/dist/*.whl; do
pushd $PREFIX
Expand All @@ -111,7 +105,6 @@ for whl in $PWD/dist/*.whl; do
include/AmoebaOpenMM* \
include/lepton \
lib/libOpenMM${SHLIB_EXT} \
lib/${LIBNAME} \
lib/libOpenMMRPMD${SHLIB_EXT} \
lib/libOpenMMAmoeba${SHLIB_EXT} \
lib/libOpenMMDrude${SHLIB_EXT} \
Expand All @@ -131,7 +124,7 @@ function repair() {
auditwheel repair dist/*.whl \
-w $PWD/fixed_wheels \
--plat manylinux2014_${ARCH} \
--exclude ${LIBNAME} \
--exclude libOpenMM.so \
--exclude libOpenMMCUDA.so \
--exclude libOpenMMOpenCL.so \
--exclude libOpenMMDrude.so \
Expand All @@ -150,7 +143,7 @@ function repair() {
--sanitize-rpaths \
-v \
dist/*.whl \
--exclude ${LIBNAME} \
--exclude libOpenMM.dylib \
--exclude libOpenMMCUDA.dylib \
--exclude libOpenMMOpenCL.dylib \
--exclude libOpenMMDrude.dylib \
Expand Down
22 changes: 22 additions & 0 deletions recipe/gh4498.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
From 0bb2d3787c4987f0a563736dbc4859154b2aadc2 Mon Sep 17 00:00:00 2001
From: peastman <[email protected]>
Date: Fri, 5 Apr 2024 09:42:32 -0700
Subject: [PATCH] Do not build versioned libraries

---
CMakeLists.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 21e85c4e30..d6712054ff 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -281,7 +281,7 @@ ENDIF (MSVC)

IF(OPENMM_BUILD_SHARED_LIB)
ADD_LIBRARY(${SHARED_TARGET} SHARED ${SOURCE_FILES} ${SOURCE_INCLUDE_FILES} ${API_ABS_INCLUDE_FILES})
- SET_TARGET_PROPERTIES(${SHARED_TARGET} PROPERTIES LINK_FLAGS "${EXTRA_LINK_FLAGS}" COMPILE_FLAGS "${EXTRA_COMPILE_FLAGS} -DOPENMM_BUILDING_SHARED_LIBRARY -DLEPTON_BUILDING_SHARED_LIBRARY -DPTHREAD_BUILDING_SHARED_LIBRARY" SOVERSION "${OPENMM_MAJOR_VERSION}.${OPENMM_MINOR_VERSION}")
+ SET_TARGET_PROPERTIES(${SHARED_TARGET} PROPERTIES LINK_FLAGS "${EXTRA_LINK_FLAGS}" COMPILE_FLAGS "${EXTRA_COMPILE_FLAGS} -DOPENMM_BUILDING_SHARED_LIBRARY -DLEPTON_BUILDING_SHARED_LIBRARY -DPTHREAD_BUILDING_SHARED_LIBRARY")
ENDIF(OPENMM_BUILD_SHARED_LIB)

IF(OPENMM_BUILD_STATIC_LIB)
1 change: 1 addition & 0 deletions recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ source:
git_rev: "ec797ac"
patches:
- 0001-wheels.patch
- gh4498.patch

build:
number: {{ build }}
Expand Down

0 comments on commit 8733e67

Please sign in to comment.