-
Notifications
You must be signed in to change notification settings - Fork 729
Open
Description
I maintain the pocketsphinx package for Fedora, and I am presently trying to package the recent 5.0.0. release. I cannot figure out how to cause cmake to install the Python module in the correct place. I wrote the following patch, which aims to fix this:
diff -u --recursive pocketsphinx-5.0.0-vanilla/cython/CMakeLists.txt pocketsphinx-5.0.0/cython/CMakeLists.txt
--- pocketsphinx-5.0.0-vanilla/cython/CMakeLists.txt 2022-10-05 08:52:38.000000000 -0500
+++ pocketsphinx-5.0.0/cython/CMakeLists.txt 2023-05-15 17:00:54.298758625 -0500
@@ -19,7 +19,7 @@
_pocketsphinx INTERFACE ${CMAKE_BINARY_DIR}/include
)
python_extension_module(_pocketsphinx)
-install(TARGETS _pocketsphinx LIBRARY DESTINATION cython/pocketsphinx)
+install(TARGETS _pocketsphinx LIBRARY DESTINATION ${CMAKE_INSTALL_PYDIR}/pocketsphinx)
if(NOT USE_INSTALLED_POCKETSPHINX)
- install(DIRECTORY ${PROJECT_SOURCE_DIR}/model DESTINATION cython/pocketsphinx)
+ install(DIRECTORY ${PROJECT_SOURCE_DIR}/model DESTINATION ${CMAKE_INSTALL_PYDIR}/pocketsphinx)
endif()
With this patch applied, I can build pocketsphinx by providiing cmake with this argument: -DCMAKE_INSTALL_PYDIR="/usr/lib64/python3.11/site-packages/". Does this make sense? I would be happy to establish a pull request, but I wasn't sure I was going about this right.
Metadata
Metadata
Assignees
Labels
No labels