Skip to content

Commit

Permalink
Merge pull request OpenChemistry#1279 from cryos/python-module
Browse files Browse the repository at this point in the history
Python module
  • Loading branch information
cryos authored Apr 30, 2023
2 parents 093ade3 + 0742f76 commit 61558e8
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 11 deletions.
10 changes: 0 additions & 10 deletions avogadro/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,6 @@ function(avogadro_add_library name)
"$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}>"
"$<INSTALL_INTERFACE:${INSTALL_INCLUDE_DIR}>")

# Now install everything.
# SKBUILD is set for binary wheel
if (SKBUILD)
# For MACOSX
set_target_properties(${name} PROPERTIES INSTALL_NAME_DIR "@rpath")
set(INSTALL_RUNTIME_DIR avogadro)
set(INSTALL_LIBRARY_DIR avogadro)
set(INSTALL_ARCHIVE_DIR avogadro)
endif()

# Install the target and its headers.
install(TARGETS ${name}
EXPORT "AvogadroLibsTargets"
Expand Down
2 changes: 1 addition & 1 deletion python/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ set(wrapper_SRCS
set(_python_module_install_dir "avogadro")
# SKBUILD is set for binary wheel
if (NOT SKBUILD)
set(_python_module_install_dir "${INSTALL_LIBRARY_DIR}/avogadro")
set(_python_module_install_dir "${Python_STDARCH}/avogadro")
endif()

set(CMAKE_MODULE_LINKER_FLAGS "")
Expand Down
3 changes: 3 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ def wheel_args():
'-DUSE_HDF5:BOOL=FALSE',
'-DUSE_LIBARCHIVE:BOOL=FALSE',
'-DUSE_LIBMSYM:BOOL=FALSE',
'-DINSTALL_RUNTIME_DIR:PATH=avogadro',
'-DINSTALL_LIBRARY_DIR:PATH=avogadro',
'-DINSTALL_ARCHIVE_DIR:PATH=avogadro',
] + extra_cmake_args() + wheel_args()

# Add pybind11 if it is installed
Expand Down

0 comments on commit 61558e8

Please sign in to comment.