Create cx_python_egg_metadata.cmake
Minor correction, this is already being handled correctly in Fr
(not frameCPP
), please see https://git.ligo.org/virgo/virgoapp/Fr/-/blob/2c3a471d51144a091738e89ea5a116c1e0991881/Python/CMakeLists.txt#L72-L91 for a cmake block that creates the necessary metadata files, and then installs them:
# create a egg-info file for pip
set(EGG_INFO_DIR "${PROJECT_NAME}-${${PROJECT_NAME}_VERSION}-py${Python3_VERSION_XY}.egg-info")
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/PKG-INFO" "\
Metadata-Version: 2.1
Name: ${PROJECT_NAME}
Version: ${PROJECT_VERSION}
Summary: ${PROJECT_DESCRIPTION}
Author: Benoit Mours
Author-email: benoit.mours@iphc.cnrs.fr
Home-Page: ${PROJECT_HOMEPAGE_URL}
License: LGPL-2.1-or-later
Provides: ${PROJECT_NAME}
")
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/requires.txt" "\
numpy
")
install(
FILES ${CMAKE_CURRENT_BINARY_DIR}/PKG-INFO ${CMAKE_CURRENT_BINARY_DIR}/requires.txt
DESTINATION ${TARGET_SP_DIR}/${EGG_INFO_DIR}/
This block is a bit old, but still does the job - a new implementation may be in line for some upgrades, feel free to ping me for a review once someone has attempted an implementation.