diff --git a/.github/workflows/genai_python_lib.yml b/.github/workflows/genai_python_lib.yml index 75ba0172f6..f80544072b 100644 --- a/.github/workflows/genai_python_lib.yml +++ b/.github/workflows/genai_python_lib.yml @@ -24,11 +24,9 @@ jobs: - run: sudo ./ov/install_dependencies/install_openvino_dependencies.sh - run: source ./ov/setupvars.sh && cmake -DCMAKE_BUILD_TYPE=Release -S ./ -B ./build/ - run: source ./ov/setupvars.sh && cmake --build ./build/ --config Release -j - # GitHub Actions already provides what is listed in ./requirements-build.txt but the internal - # build system doesn't. Install ./requirements-build.txt to detect possible conflicts. - - run: source ./ov/setupvars.sh && python -m pip install ./thirdparty/openvino_tokenizers/[transformers] -r ./requirements-build.txt -r ./tests/python_tests/requirements.txt --extra-index-url https://storage.openvinotoolkit.org/simple/wheels/pre-release --upgrade-strategy eager + - run: source ./ov/setupvars.sh && python -m pip install ./thirdparty/openvino_tokenizers/[transformers] -r ./tests/python_tests/requirements.txt --extra-index-url https://storage.openvinotoolkit.org/simple/wheels/pre-release --upgrade-strategy eager - run: source ./ov/setupvars.sh && PYTHONPATH=./build/:$PYTHONPATH python -m pytest ./tests/python_tests/test_generate_api.py -m precommit - - run: source ./ov/setupvars.sh && python -m pip install . --config-settings=build-dir="build" --verbose + - run: source ./ov/setupvars.sh && python -m pip install . --verbose - run: python -m pytest ./tests/python_tests/test_generate_api.py -m precommit macos_genai_python_lib: @@ -49,11 +47,9 @@ jobs: - run: brew install coreutils scons - run: source ./ov/setupvars.sh && cmake -DCMAKE_BUILD_TYPE=Release -S ./ -B ./build/ - run: source ./ov/setupvars.sh && cmake --build ./build/ --config Release -j - # GitHub Actions already provides what is listed in ./requirements-build.txt but the internal - # build system doesn't. Install ./requirements-build.txt to detect possible conflicts. - - run: source ./ov/setupvars.sh && python -m pip install ./thirdparty/openvino_tokenizers/[transformers] -r ./requirements-build.txt -r ./tests/python_tests/requirements.txt --extra-index-url https://storage.openvinotoolkit.org/simple/wheels/pre-release --upgrade-strategy eager + - run: source ./ov/setupvars.sh && python -m pip install ./thirdparty/openvino_tokenizers/[transformers] -r ./tests/python_tests/requirements.txt --extra-index-url https://storage.openvinotoolkit.org/simple/wheels/pre-release --upgrade-strategy eager - run: source ./ov/setupvars.sh && PYTHONPATH=./build/:$PYTHONPATH python -m pytest ./tests/python_tests/test_generate_api.py -m precommit - - run: source ./ov/setupvars.sh && python -m pip install . --config-settings=build-dir="build" --verbose + - run: source ./ov/setupvars.sh && python -m pip install . --verbose - run: python -c "from openvino_genai import LLMPipeline" - run: python -m pytest ./tests/python_tests/test_generate_api.py -m precommit @@ -78,8 +74,8 @@ jobs: - run: mklink /D ov w_openvino_toolkit_windows_2024.2.0.dev20240529_x86_64 - run: call ./ov/setupvars.bat && cmake -DCMAKE_BUILD_TYPE=Release -S ./ -B ./build/ - run: call ./ov/setupvars.bat && cmake --build ./build/ --config Release -j - - run: call ./ov/setupvars.bat && python -m pip install ./thirdparty/openvino_tokenizers/[transformers] -r ./requirements-build.txt -r ./tests/python_tests/requirements.txt --extra-index-url https://storage.openvinotoolkit.org/simple/wheels/pre-release --upgrade-strategy eager + - run: call ./ov/setupvars.bat && python -m pip install ./thirdparty/openvino_tokenizers/[transformers] -r ./tests/python_tests/requirements.txt --extra-index-url https://storage.openvinotoolkit.org/simple/wheels/pre-release --upgrade-strategy eager # cmd evaluates variables in a different way. Setting PYTHONPATH before setupvars.bat instead of doing that after solves that. - run: set "PYTHONPATH=./build/" && call ./ov/setupvars.bat && python -m pytest ./tests/python_tests/test_generate_api.py -m precommit - - run: call ./ov/setupvars.bat && python -m pip install . --config-settings=build-dir="build" --verbose + - run: call ./ov/setupvars.bat && python -m pip install . --verbose - run: python -m pytest ./tests/python_tests/test_generate_api.py -m precommit diff --git a/.gitignore b/.gitignore index 2e39ce5394..10035877da 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,5 @@ # build/artifact dirs -_* [Bb]uild*/ -cmake-build* # but ensure we don't skip __init__.py and __main__.py !__init__.py @@ -15,16 +13,13 @@ cmake-build* .DS_Store **/tags compile_commands.json -bin/ .local_vimrc .gdb_history .vimspector.json doc/ -docs/build_documentation/work_dir/ temp/ .repo/ CMakeLists.txt.user -docs/IE_PLUGIN_DG/html/ CMakeUserPresets.json *.project diff --git a/CMakeLists.txt b/CMakeLists.txt index 9a5bf78ff1..e8dafd95ff 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -17,37 +17,30 @@ elseif(NOT GENERATOR_IS_MULTI_CONFIG_VAR AND NOT DEFINED CMAKE_BUILD_TYPE) set(CMAKE_BUILD_TYPE Release CACHE STRING "Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel ...") endif() -project(OpenVINOGenAI VERSION 2024.2.0.0) +project(OpenVINOGenAI + VERSION 2024.2.0.0 + DESCRIPTION "OpenVINO GenAI" + HOMEPAGE_URL "https://github.com/openvinotoolkit/openvino.genai" + LANGUAGES CXX) -option(CPACK_INCLUDE_TOPLEVEL_DIRECTORY "Boolean toggle to include/exclude top level directory." OFF) -if(WIN32) - set(CPACK_GENERATOR "ZIP" CACHE STRING "List of CPack generators to use.") +# Find OpenVINODeveloperPackage first to compile with SDL flags +find_package(OpenVINODeveloperPackage QUIET + PATHS "${OpenVINO_DIR}") +if(NOT OpenVINODeveloperPackage_FOUND) + find_package(OpenVINO REQUIRED COMPONENTS Runtime) endif() -add_subdirectory(./thirdparty/) +include(cmake/features.cmake) + +add_subdirectory(thirdparty) add_subdirectory(src) -add_subdirectory(samples/cpp/beam_search_causal_lm/) -add_subdirectory(samples/cpp/chat_sample/) -add_subdirectory(samples/cpp/greedy_causal_lm/) -add_subdirectory(samples/cpp/multinomial_causal_lm/) -add_subdirectory(samples/cpp/prompt_lookup_decoding_lm/) -add_subdirectory(samples/cpp/speculative_decoding_lm/) - -install(DIRECTORY - ./samples/cpp/beam_search_causal_lm - ./samples/cpp/chat_sample - ./samples/cpp/greedy_causal_lm - ./samples/cpp/multinomial_causal_lm - # Don't install prompt_lookup_decoding_lm and speculative_decoding_lm because they don't use openvino_genai library and arent verifyed yet. - DESTINATION samples/cpp/ COMPONENT cpp_samples_genai) -install(DIRECTORY - ./samples/python/beam_search_causal_lm - ./samples/python/chat_sample - ./samples/python/greedy_causal_lm - ./samples/python/multinomial_causal_lm - DESTINATION samples/python/ COMPONENT cpp_samples_genai - USE_SOURCE_PERMISSIONS) -install(FILES ./samples/requirements.txt DESTINATION ./samples/ COMPONENT cpp_samples_genai) +add_subdirectory(samples) + install(FILES LICENSE DESTINATION licensing COMPONENT licensing_genai RENAME LICENSE-GENAI) install(FILES third-party-programs.txt DESTINATION licensing COMPONENT licensing_genai RENAME third-party-programs-genai.txt) + +set(CPACK_INCLUDE_TOPLEVEL_DIRECTORY OFF) +if(WIN32 AND NOT DEFINED CPACK_GENERATOR) + set(CPACK_GENERATOR "ZIP") +endif() include(CPack) diff --git a/cmake/features.cmake b/cmake/features.cmake new file mode 100644 index 0000000000..0434b21ee9 --- /dev/null +++ b/cmake/features.cmake @@ -0,0 +1,5 @@ +# Copyright (C) 2018-2024 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 +# + +option(ENABLE_PYTHON "Enable Python API build" ON) diff --git a/src/cpp/OpenVINOGenAIConfig.cmake.in b/cmake/templates/OpenVINOGenAIConfig.cmake.in similarity index 100% rename from src/cpp/OpenVINOGenAIConfig.cmake.in rename to cmake/templates/OpenVINOGenAIConfig.cmake.in diff --git a/src/python/openvino_genai/__version__.py b/cmake/templates/__version__.py.in similarity index 51% rename from src/python/openvino_genai/__version__.py rename to cmake/templates/__version__.py.in index 472f83a46f..ce8e01a246 100644 --- a/src/python/openvino_genai/__version__.py +++ b/cmake/templates/__version__.py.in @@ -1,5 +1,5 @@ # Copyright (C) 2024 Intel Corporation # SPDX-License-Identifier: Apache-2.0 -# Will be overwritten by pyproject.toml or cmake. -__version__ = "0.0.0.0" +# Will be overwritten by cmake. +__version__ = "@OpenVINOGenAI_VERSION@" diff --git a/pyproject.toml b/pyproject.toml index 7656a64778..6cc7440046 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -19,28 +19,27 @@ dependencies = [ "openvino_tokenizers~=2024.2.0.0" ] -[tool.scikit-build] -cmake.build-type = "Release" -cmake.source-dir = "./" -cmake.targets = ["py_generate_pipeline"] # Adding genai would trigger a Release build and Debug build after it. py_generate_pipeline depends on genai and genai will be built anyway. It's not been investigated why both build types are triggered. -cmake.version = ">=3.23" -install.components = ["wheel_genai"] -sdist.cmake = true -wheel.packages = ["src/python/openvino_genai"] -wheel.install-dir = "openvino_genai" -wheel.build-tag = "000" -wheel.license-files = ["LICENSE", "SECURITY.md", "third-party-programs.txt"] +[tool.py-build-cmake.module] +directory = "src/python" -[[tool.scikit-build.generate]] -path = "openvino_genai/__version__.py" -template = ''' -__version__ = "${version}" -''' +[tool.py-build-cmake.sdist] +exclude = ["llm_bench", "samples", "tests", "thirdparty"] + +[tool.py-build-cmake.cmake] +minimum_version = "3.23" +build_type = "Release" +config = ["Release"] +find_python3 = true +build_args = ["--parallel", "--target", "py_generate_pipeline"] +install_args = ["--strip"] +install_components = ["wheel_genai"] [build-system] -# TODO: add build.tool-args = ["--parallel"] after scikit-build-core is updated to 0.9.4+. -requires = ["scikit-build-core~=0.8.0"] # See https://github.com/openvinotoolkit/openvino_tokenizers/pull/123 -build-backend = "scikit_build_core.build" +requires = [ + "py-build-cmake@git+https://github.com/tttapa/py-build-cmake@7ab73da351c7140f06d727a8705bece4cf544cd9", + "cmake~=3.23" +] +build-backend = "py_build_cmake.build" [tool.pytest.ini_options] markers = [ diff --git a/requirements-build.txt b/requirements-build.txt index fd84d414c5..8885e223ea 100644 --- a/requirements-build.txt +++ b/requirements-build.txt @@ -1,2 +1 @@ -build~=1.2.1 -cmake~=3.29 +cmake~=3.29 \ No newline at end of file diff --git a/samples/CMakeLists.txt b/samples/CMakeLists.txt new file mode 100644 index 0000000000..9e35946472 --- /dev/null +++ b/samples/CMakeLists.txt @@ -0,0 +1,29 @@ +# Copyright (C) 2018-2024 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 +# + +add_subdirectory(cpp/beam_search_causal_lm) +add_subdirectory(cpp/chat_sample) +add_subdirectory(cpp/greedy_causal_lm) +add_subdirectory(cpp/multinomial_causal_lm) +add_subdirectory(cpp/prompt_lookup_decoding_lm) +add_subdirectory(cpp/speculative_decoding_lm) + +install(FILES requirements.txt DESTINATION samples + COMPONENT cpp_samples_genai) + +install(DIRECTORY + cpp/beam_search_causal_lm + cpp/chat_sample + cpp/greedy_causal_lm + cpp/multinomial_causal_lm + # Don't install prompt_lookup_decoding_lm and speculative_decoding_lm because they don't use openvino_genai library and arent verifyed yet. + DESTINATION samples/cpp COMPONENT cpp_samples_genai) + +install(DIRECTORY + python/beam_search_causal_lm + python/chat_sample + python/greedy_causal_lm + python/multinomial_causal_lm + DESTINATION samples/python COMPONENT cpp_samples_genai + USE_SOURCE_PERMISSIONS) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index d154836878..d9f3cc64db 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -2,12 +2,8 @@ # SPDX-License-Identifier: Apache-2.0 # -# Find OpenVINODeveloperPackage first to compile with SDL flags -find_package(OpenVINODeveloperPackage QUIET - PATHS "${OpenVINO_DIR}") -if(NOT OpenVINODeveloperPackage_FOUND) - find_package(OpenVINO REQUIRED COMPONENTS Runtime) -endif() - add_subdirectory(cpp) -add_subdirectory(python) + +if(ENABLE_PYTHON) + add_subdirectory(python) +endif() diff --git a/src/cpp/CMakeLists.txt b/src/cpp/CMakeLists.txt index 46bb2578e2..7f3e9a1144 100644 --- a/src/cpp/CMakeLists.txt +++ b/src/cpp/CMakeLists.txt @@ -58,25 +58,20 @@ set_target_properties(${TARGET_NAME} PROPERTIES RUNTIME_OUTPUT_DIRECTORY "$<1:${CMAKE_BINARY_DIR}/openvino_genai/>" ) # Extract two last digits from CMAKE_PROJECT_VERSION_MAJOR because SOVERSION can only contain up to 4 symbols. -string(REGEX MATCH [=[[0-9][0-9]$]=] MAJOR_SUFFIX ${CMAKE_PROJECT_VERSION_MAJOR}) -if(SKBUILD AND LINUX) +string(REGEX MATCH [=[[0-9][0-9]$]=] MAJOR_SUFFIX ${OpenVINOGenAI_VERSION_MAJOR}) +if(DEFINED PY_BUILD_CMAKE_PACKAGE_NAME AND LINUX) # Don't pack symlinks but append version hash to the name for wheel set_target_properties(${TARGET_NAME} PROPERTIES - SUFFIX ${CMAKE_SHARED_LIBRARY_SUFFIX}.${MAJOR_SUFFIX}${CMAKE_PROJECT_VERSION_MINOR}${CMAKE_PROJECT_VERSION_PATCH}) -elseif(SKBUILD AND APPELE) + SUFFIX ${CMAKE_SHARED_LIBRARY_SUFFIX}.${MAJOR_SUFFIX}${OpenVINOGenAI_VERSION_MINOR}${OpenVINOGenAI_VERSION_PATCH}) +elseif(DEFINED PY_BUILD_CMAKE_PACKAGE_NAME AND APPELE) set_target_properties(${TARGET_NAME} PROPERTIES - SUFFIX .${MAJOR_SUFFIX}${CMAKE_PROJECT_VERSION_MINOR}${CMAKE_PROJECT_VERSION_PATCH}${CMAKE_SHARED_LIBRARY_SUFFIX}) + SUFFIX .${MAJOR_SUFFIX}${OpenVINOGenAI_VERSION_MINOR}${OpenVINOGenAI_VERSION_PATCH}${CMAKE_SHARED_LIBRARY_SUFFIX}) else() set_target_properties(${TARGET_NAME} PROPERTIES VERSION ${CMAKE_PROJECT_VERSION} - SOVERSION ${MAJOR_SUFFIX}${CMAKE_PROJECT_VERSION_MINOR}${CMAKE_PROJECT_VERSION_PATCH}) + SOVERSION ${MAJOR_SUFFIX}${OpenVINOGenAI_VERSION_MINOR}${OpenVINOGenAI_VERSION_PATCH}) endif() -find_package(Python3 REQUIRED COMPONENTS Interpreter Development) -install(TARGETS ${TARGET_NAME} - LIBRARY DESTINATION python/openvino_genai/ COMPONENT pygenai_${Python_VERSION_MAJOR}_${Python_VERSION_MINOR} - RUNTIME DESTINATION python/openvino_genai/ COMPONENT pygenai_${Python_VERSION_MAJOR}_${Python_VERSION_MINOR}) - # - Windows: `\runtime\bin\intel64\Release\` # - MacOS_x86: `/runtime/lib/intel64/Release` # - MacOS_arm64: `/runtime/lib/arm64/Release/` @@ -98,17 +93,24 @@ endif() if(MSVC OR APPLE) set(ARCH_DIR ${ARCH_DIR}/${CMAKE_BUILD_TYPE}) endif() + install(TARGETS ${TARGET_NAME} EXPORT OpenVINOGenAITargets - LIBRARY DESTINATION runtime/lib/${ARCH_DIR} COMPONENT core_genai - NAMELINK_COMPONENT core_genai_dev - ARCHIVE DESTINATION runtime/lib/${ARCH_DIR} COMPONENT core_genai_dev - RUNTIME DESTINATION runtime/bin/${ARCH_DIR} COMPONENT core_genai - INCLUDES DESTINATION runtime/include) -install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/include/ DESTINATION runtime/include COMPONENT core_genai_dev) -install(EXPORT OpenVINOGenAITargets FILE OpenVINOGenAITargets.cmake NAMESPACE openvino:: DESTINATION runtime/cmake) -include(CMakePackageConfigHelpers) -configure_package_config_file(OpenVINOGenAIConfig.cmake.in "${CMAKE_BINARY_DIR}/OpenVINOGenAIConfig.cmake" INSTALL_DESTINATION runtime/cmake) -install(FILES "${CMAKE_BINARY_DIR}/OpenVINOGenAIConfig.cmake" "${CMAKE_BINARY_DIR}/OpenVINOGenAIConfig.cmake" DESTINATION runtime/cmake COMPONENT core_genai_dev) + LIBRARY DESTINATION runtime/lib/${ARCH_DIR} COMPONENT core_genai + NAMELINK_COMPONENT core_genai_dev + ARCHIVE DESTINATION runtime/lib/${ARCH_DIR} COMPONENT core_genai_dev + RUNTIME DESTINATION runtime/bin/${ARCH_DIR} COMPONENT core_genai + INCLUDES DESTINATION runtime/include) + +install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/include/ + DESTINATION runtime/include COMPONENT core_genai_dev) +install(EXPORT OpenVINOGenAITargets FILE OpenVINOGenAITargets.cmake + NAMESPACE openvino:: DESTINATION runtime/cmake) + include(CMakePackageConfigHelpers) -write_basic_package_version_file("${CMAKE_BINARY_DIR}/OpenVINOGenAIConfigVersion.cmake" VERSION ${CMAKE_PROJECT_VERSION} COMPATIBILITY AnyNewerVersion) +configure_package_config_file("${OpenVINOGenAI_SOURCE_DIR}/cmake/templates/OpenVINOGenAIConfig.cmake.in" + "${CMAKE_BINARY_DIR}/OpenVINOGenAIConfig.cmake" INSTALL_DESTINATION runtime/cmake) +write_basic_package_version_file("${CMAKE_BINARY_DIR}/OpenVINOGenAIConfigVersion.cmake" + VERSION ${OpenVINOGenAI_VERSION} COMPATIBILITY AnyNewerVersion) +install(FILES "${CMAKE_BINARY_DIR}/OpenVINOGenAIConfig.cmake" "${CMAKE_BINARY_DIR}/OpenVINOGenAIConfigVersion.cmake" + DESTINATION runtime/cmake COMPONENT core_genai_dev) export(EXPORT OpenVINOGenAITargets FILE "${CMAKE_BINARY_DIR}/OpenVINOGenAITargets.cmake" NAMESPACE openvino::) diff --git a/src/python/CMakeLists.txt b/src/python/CMakeLists.txt index 6ce4905faf..d5e11d392d 100644 --- a/src/python/CMakeLists.txt +++ b/src/python/CMakeLists.txt @@ -11,16 +11,31 @@ FetchContent_Declare( FetchContent_GetProperties(pybind11) if(NOT pybind11_POPULATED) FetchContent_Populate(pybind11) + # search for FindPython3.cmake instead of legacy modules + set(PYBIND11_FINDPYTHON ON) + # the following two calls are required for cross-compilation + if(OpenVINODeveloperPackage_DIR) + ov_find_python3(REQUIRED) + ov_detect_python_module_extension() + else() + if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.18) + find_package(Python3 REQUIRED COMPONENTS Interpreter Development.Module) + else() + find_package(Python3 REQUIRED COMPONENTS Interpreter Development) + endif() + endif() add_subdirectory(${pybind11_SOURCE_DIR} ${pybind11_BINARY_DIR}) endif() pybind11_add_module(py_generate_pipeline py_generate_pipeline.cpp) -target_link_libraries(py_generate_pipeline PRIVATE openvino::genai nlohmann_json::nlohmann_json) +target_link_libraries(py_generate_pipeline PRIVATE openvino::genai) set_target_properties(py_generate_pipeline PROPERTIES LIBRARY_OUTPUT_DIRECTORY "$<1:${CMAKE_BINARY_DIR}/openvino_genai/>" ) file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/openvino_genai/__init__.py" DESTINATION "${CMAKE_BINARY_DIR}/openvino_genai/") -write_file("${CMAKE_BINARY_DIR}/openvino_genai/__version__.py" "__version__ = \"${CMAKE_PROJECT_VERSION}\"") + +configure_file("${OpenVINOGenAI_SOURCE_DIR}/cmake/templates/__version__.py.in" + "${CMAKE_BINARY_DIR}/openvino_genai/__version__.py" @ONLY) # setting RPATH / LC_RPATH depending on platform if(LINUX) @@ -29,7 +44,7 @@ if(LINUX) elseif(APPLE) # to find libopenvino_genai.dylib in the same folder set(rpaths "@loader_path") - if(DEFINED SKBUILD) + if(DEFINED PY_BUILD_CMAKE_PACKAGE_NAME) # in case we build pip package, we need to refer to libopenvino.dylib from 'openvino' package list(APPEND rpaths "@loader_path/../openvino/libs") endif() @@ -39,12 +54,28 @@ if(rpaths) set_target_properties(py_generate_pipeline PROPERTIES INSTALL_RPATH "${rpaths}") endif() -find_package(Python3 REQUIRED COMPONENTS Interpreter Development) -install(FILES "${CMAKE_BINARY_DIR}/openvino_genai/__init__.py" "${CMAKE_BINARY_DIR}/openvino_genai/__version__.py" DESTINATION python/openvino_genai/ COMPONENT pygenai_${Python_VERSION_MAJOR}_${Python_VERSION_MINOR}) -install(TARGETS openvino_genai py_generate_pipeline LIBRARY DESTINATION python/openvino_genai/ COMPONENT pygenai_${Python_VERSION_MAJOR}_${Python_VERSION_MINOR}) +install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/openvino_genai/__init__.py" + "${CMAKE_BINARY_DIR}/openvino_genai/__version__.py" + DESTINATION python/openvino_genai + COMPONENT pygenai_${Python_VERSION_MAJOR}_${Python_VERSION_MINOR}) +install(TARGETS py_generate_pipeline + LIBRARY DESTINATION python/openvino_genai + COMPONENT pygenai_${Python_VERSION_MAJOR}_${Python_VERSION_MINOR}) + +install(FILES "${CMAKE_BINARY_DIR}/openvino_genai/__version__.py" + DESTINATION openvino_genai + COMPONENT wheel_genai + EXCLUDE_FROM_ALL) + +install(FILES "${OpenVINOGenAI_SOURCE_DIR}/LICENSE" + "${OpenVINOGenAI_SOURCE_DIR}/third-party-programs.txt" + "${OpenVINOGenAI_SOURCE_DIR}/SECURITY.md" + DESTINATION "${PY_BUILD_CMAKE_PACKAGE_NAME}-${PY_BUILD_CMAKE_PACKAGE_VERSION}.dist-info" + COMPONENT wheel_genai + EXCLUDE_FROM_ALL) # wheel_genai component is used for wheel generation in pyproject.toml. # Exclude wheel_genai from normal packaging because there's pygenai_X_Y component for that. install(TARGETS openvino_genai py_generate_pipeline - LIBRARY DESTINATION . COMPONENT wheel_genai EXCLUDE_FROM_ALL - RUNTIME DESTINATION . COMPONENT wheel_genai EXCLUDE_FROM_ALL) + LIBRARY DESTINATION openvino_genai COMPONENT wheel_genai EXCLUDE_FROM_ALL + RUNTIME DESTINATION openvino_genai COMPONENT wheel_genai EXCLUDE_FROM_ALL)