diff --git a/cmake/package_lite.cmake b/cmake/package_lite.cmake index ca713628437..1a1f9006226 100644 --- a/cmake/package_lite.cmake +++ b/cmake/package_lite.cmake @@ -455,6 +455,8 @@ if(PLATFORM_ARM64) ${RUNTIME_COMPONENT_NAME}) endif() if(MSLITE_ENABLE_CONVERTER) + install(FILES ${TOP_DIR}/mindspore/lite/include/converter.h DESTINATION ${CONVERTER_ROOT_DIR}/include + COMPONENT ${RUNTIME_COMPONENT_NAME}) install(DIRECTORY ${TOP_DIR}/mindspore/lite/include/registry/ DESTINATION ${CONVERTER_ROOT_DIR}/include/registry COMPONENT ${RUNTIME_COMPONENT_NAME}) install(FILES ${API_HEADER} DESTINATION ${CONVERTER_ROOT_DIR}/include/api @@ -720,6 +722,8 @@ elseif(WIN32) file(GLOB LIB_LIST ${CXX_DIR}/libstdc++-6.dll ${CXX_DIR}/libwinpthread-1.dll ${CXX_DIR}/libssp-0.dll ${CXX_DIR}/libgcc_s_*-1.dll) if(MSLITE_ENABLE_CONVERTER) + install(FILES ${TOP_DIR}/mindspore/lite/include/converter.h DESTINATION ${CONVERTER_ROOT_DIR}/include + COMPONENT ${RUNTIME_COMPONENT_NAME}) install(FILES ${TOP_DIR}/build/mindspore/tools/converter/converter_lite/converter_lite.exe DESTINATION ${CONVERTER_ROOT_DIR}/converter COMPONENT ${RUNTIME_COMPONENT_NAME}) install(FILES ${TOP_DIR}/build/mindspore/tools/converter/libmindspore_converter.dll @@ -846,6 +850,8 @@ else() if(MSLITE_ENABLE_CONVERTER) install(FILES ${TOP_DIR}/mindspore/lite/include/kernel_interface.h DESTINATION ${CONVERTER_ROOT_DIR}/include COMPONENT ${RUNTIME_COMPONENT_NAME}) + install(FILES ${TOP_DIR}/mindspore/lite/include/converter.h DESTINATION ${CONVERTER_ROOT_DIR}/include + COMPONENT ${RUNTIME_COMPONENT_NAME}) install(DIRECTORY ${TOP_DIR}/mindspore/lite/include/registry/ DESTINATION ${CONVERTER_ROOT_DIR}/include/registry COMPONENT ${RUNTIME_COMPONENT_NAME}) install(FILES ${API_HEADER} DESTINATION ${CONVERTER_ROOT_DIR}/include/api diff --git a/mindspore/lite/build_lite.sh b/mindspore/lite/build_lite.sh index 67a7f7ff91f..0140145aab2 100755 --- a/mindspore/lite/build_lite.sh +++ b/mindspore/lite/build_lite.sh @@ -188,6 +188,19 @@ build_python_wheel_package() { cp ${INSTALL_PREFIX}/${pkg_name}/tools/converter/lib/*.so* package/mindspore_lite/lib/ fi cp python/*.so package/mindspore_lite/lib/ + mkdir -pv package/mindspore_lite/include/registry/ + if [ -d "${INSTALL_PREFIX}/${pkg_name}/runtime/include/api" ]; then + cp -rf ${INSTALL_PREFIX}/${pkg_name}/runtime/include/api package/mindspore_lite/include/ + fi + if [ -d "${INSTALL_PREFIX}/${pkg_name}/runtime/include/mindapi" ]; then + cp -rf ${INSTALL_PREFIX}/${pkg_name}/runtime/include/mindapi package/mindspore_lite/include/ + fi + if [ -f "${INSTALL_PREFIX}/${pkg_name}/tools/converter/include/registry/converter_context.h" ]; then + cp ${INSTALL_PREFIX}/${pkg_name}/tools/converter/include/registry/converter_context.h package/mindspore_lite/include/registry/ + fi + if [ -f "${INSTALL_PREFIX}/${pkg_name}/tools/converter/include/converter.h" ]; then + cp ${INSTALL_PREFIX}/${pkg_name}/tools/converter/include/converter.h package/mindspore_lite/include/ + fi cp .commit_id package/mindspore_lite/ echo "__version__ = '${VERSION_STR}'" > package/mindspore_lite/version.py cp ../python/setup.py package/ diff --git a/mindspore/lite/python/setup.py b/mindspore/lite/python/setup.py index 26db0ecfdd8..66f6d9c2ce0 100644 --- a/mindspore/lite/python/setup.py +++ b/mindspore/lite/python/setup.py @@ -46,7 +46,9 @@ setup( long_description=readme, long_description_content_type="text/markdown", packages=find_packages(), - package_data={'': ['*.py', 'lib/*.so*', '.commit_id']}, + package_data={'': ['*.py', 'lib/*.so*', '.commit_id', 'include/api/*', 'include/api/callback/*', + 'include/api/metrics/*', 'include/mindapi/base/*', 'include/registry/converter_context.h', + 'include/converter.h']}, include_package_data=True, cmdclass={}, entry_points={},