From 8733e67eb1c9d417149c66215fa6dcc49c6cbc2b Mon Sep 17 00:00:00 2001 From: Isuru Fernando Date: Mon, 29 Apr 2024 18:45:53 -0500 Subject: [PATCH] remove versioned libraries --- recipe/build_openmm.sh | 11 ++--------- recipe/gh4498.patch | 22 ++++++++++++++++++++++ recipe/meta.yaml | 1 + 3 files changed, 25 insertions(+), 9 deletions(-) create mode 100644 recipe/gh4498.patch diff --git a/recipe/build_openmm.sh b/recipe/build_openmm.sh index cb1c88c..13b785d 100644 --- a/recipe/build_openmm.sh +++ b/recipe/build_openmm.sh @@ -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 @@ -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} \ @@ -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 \ @@ -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 \ diff --git a/recipe/gh4498.patch b/recipe/gh4498.patch new file mode 100644 index 0000000..b701bf3 --- /dev/null +++ b/recipe/gh4498.patch @@ -0,0 +1,22 @@ +From 0bb2d3787c4987f0a563736dbc4859154b2aadc2 Mon Sep 17 00:00:00 2001 +From: peastman +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) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 4821cb0..3481da0 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -19,6 +19,7 @@ source: git_rev: "ec797ac" patches: - 0001-wheels.patch + - gh4498.patch build: number: {{ build }}