Skip to content
Snippets Groups Projects

Improve Python package metadata

Closed Duncan Macleod requested to merge python-metadata into master
1 file
+ 19
3
Compare changes
  • Side-by-side
  • Inline
+ 19
3
@@ -70,9 +70,25 @@ print(numpy.get_include(), end=';')
)
# create a egg-info file for pip
set(EGG_INFO_FILE_NAME "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-${${PROJECT_NAME}_VERSION}-py${Python3_VERSION_XY}.egg-info")
file(TOUCH ${EGG_INFO_FILE_NAME})
install(FILES ${EGG_INFO_FILE_NAME} DESTINATION ${TARGET_SP_DIR})
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-3.0-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}/
)
# -- setup duplicate python module with old name --
install(
Loading