diff --git a/src/cpp/src/utils.cpp b/src/cpp/src/utils.cpp index 75ee194b78..dc123d04c4 100644 --- a/src/cpp/src/utils.cpp +++ b/src/cpp/src/utils.cpp @@ -147,9 +147,9 @@ GenAIEnvManager::GenAIEnvManager(const std::string& path) { #ifdef _WIN32 char* value = nullptr; size_t len = 0; - _dupenv_s(&value, &len, ov::genai::utils::get_tokenizers_env_name().c_str()); + _dupenv_s(&value, &len, ov::genai::utils::get_tokenizers_env_name()); if (value == nullptr) - _putenv_s(ov::genai::utils::get_tokenizers_env_name().c_str(), path.c_str()); + _putenv_s(ov::genai::utils::get_tokenizers_env_name(), path.c_str()); #else if (!getenv(ov::genai::utils::get_tokenizers_env_name())) setenv(ov::genai::utils::get_tokenizers_env_name(), path.c_str(), 1); diff --git a/src/python/CMakeLists.txt b/src/python/CMakeLists.txt index 5cfd890f47..7802561837 100644 --- a/src/python/CMakeLists.txt +++ b/src/python/CMakeLists.txt @@ -15,7 +15,9 @@ if(NOT pybind11_POPULATED) add_subdirectory(${pybind11_SOURCE_DIR} ${pybind11_BINARY_DIR}) endif() -pybind11_add_module(py_generate_pipeline py_generate_pipeline.cpp) +# to be able to use utils.hpp in pybind +include_directories(${CMAKE_SOURCE_DIR}/src/cpp/src/) +pybind11_add_module(py_generate_pipeline py_generate_pipeline.cpp ${CMAKE_SOURCE_DIR}/src/cpp/src/utils.cpp) target_link_libraries(py_generate_pipeline PRIVATE openvino::genai nlohmann_json::nlohmann_json) set_target_properties(py_generate_pipeline PROPERTIES LIBRARY_OUTPUT_DIRECTORY "$<1:${CMAKE_BINARY_DIR}/openvino_genai/>" @@ -50,6 +52,3 @@ install(TARGETS genai py_generate_pipeline LIBRARY DESTINATION . COMPONENT wheel_genai RUNTIME DESTINATION . COMPONENT wheel_genai EXCLUDE_FROM_ALL) - -# to be able to use utils.hpp in pybind -include_directories(${CMAKE_SOURCE_DIR}/src/cpp/src/)