OpenVINO™ is an open source toolkit for optimizing and deploying AI inference
C++ aicomputer-visiondeep-learningdeploy-aidiffusion-modelsgenerative-aigood-first-issueinferencellm-inferencenatural-language-processingnlpopenvinooptimize-aiperformance-boostrecommendation-systemspeech-recognitionstable-diffusiontransformersyolo
[PyOV] Remove leftover `pre-commit` related code (#31548)
Przemyslaw Wysocki574dfac7f360
diff --git a/src/bindings/python/CMakeLists.txt b/src/bindings/python/CMakeLists.txtindex 12acbc0af42..d0498603c2f 100644--- a/src/bindings/python/CMakeLists.txt+++ b/src/bindings/python/CMakeLists.txt@@ -414,38 +414,3 @@ if(OpenVINODeveloperPackage_FOUND)ov_cpack(${OV_CPACK_COMPONENTS_ALL})endif()--# only for developers, skip on CI-# to be removed once developers remove hook from their .git: CVS-168334-if(NOT (DEFINED ENV{CI} OR DEFINED ENV{TF_BUILD} OR DEFINED ENV{JENKINS_URL}))-- # check pybind11-stubgen package- execute_process(COMMAND ${Python3_EXECUTABLE} -m pip show pybind11-stubgen- OUTPUT_VARIABLE pybind11_stubgen_info OUTPUT_STRIP_TRAILING_WHITESPACE- RESULT_VARIABLE pybind11_stubgen_result)- string(REGEX MATCH "Version: ([\\.0-9]+)" pybind11_stubgen_version "${pybind11_stubgen_info}")- if(pybind11_stubgen_result OR NOT pybind11_stubgen_version)- message(WARNING "pybind11-stubgen package is not installed or version is not detected. This package is necessary for developing Python API.")- endif()-- # check pre-commit package- execute_process(COMMAND ${Python3_EXECUTABLE} -m pip show pre-commit- OUTPUT_VARIABLE precommit_pkg_info OUTPUT_STRIP_TRAILING_WHITESPACE- RESULT_VARIABLE precommit_pkg_result)- string(REGEX MATCH "Version: ([\\.0-9]+)" precommit_pkg_version "${precommit_pkg_info}")- if(precommit_pkg_result OR NOT precommit_pkg_version)- message(WARNING "pre-commit package is not installed or version is not detected. This package is necessary for developing Python API.")- endif()-- # uninstall the pre-commit hook for Python stub generation (now handled by GitHub Actions)- execute_process(COMMAND pre-commit uninstall- RESULT_VARIABLE precommit_uninstall_result- ERROR_VARIABLE precommit_uninstall_error- OUTPUT_STRIP_TRAILING_WHITESPACE- ERROR_STRIP_TRAILING_WHITESPACE)- if(NOT precommit_uninstall_result EQUAL "0")- message(WARNING "Failed to uninstall Python stub generation pre-commit hook: ${precommit_uninstall_error}")- else()- message(STATUS "Pre-commit hook for Python API stub generation has been uninstalled. Stubs are now generated by GitHub Actions workflow.")- endif()-endif()diff --git a/src/bindings/python/requirements_test.txt b/src/bindings/python/requirements_test.txtindex 2714b4cba5b..018f85ff429 100644--- a/src/bindings/python/requirements_test.txt+++ b/src/bindings/python/requirements_test.txt@@ -38,5 +38,4 @@ toxtypes-setuptoolswheelpybind11-stubgen<2.6-pre-commit<4.3pyright<=1.1.403