Skip to content

Commit

Permalink
FCKIT_VENV: upgrade pip before installing packages
Browse files Browse the repository at this point in the history
  • Loading branch information
awnawab committed Nov 6, 2024
1 parent 73e0e1b commit 7f6c3d8
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions cmake/fckit_install_venv.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@
macro( fckit_install_venv )

list( APPEND PIP_OPTIONS "--disable-pip-version-check" )
if( HAVE_FCKIT_VENV_EDITABLE )
# Use checked-out source instead of installing into venv
list( APPEND PIP_OPTIONS "-e" )
endif()

# Create a virtualenv
set( VENV_PATH ${CMAKE_CURRENT_BINARY_DIR}/fckit_venv )
Expand Down Expand Up @@ -45,6 +41,13 @@ macro( fckit_install_venv )
set( _pkg_name "fckit_yaml_reader/[tests]")
endif()

execute_process( COMMAND ${Python3_EXECUTABLE} -m pip install --upgrade ${PIP_OPTIONS} pip OUTPUT_QUIET )

if( HAVE_FCKIT_VENV_EDITABLE )
# Use checked-out source instead of installing into venv
list( APPEND PIP_OPTIONS "-e" )
endif()

ecbuild_info( "Install fckit_yaml_reader in virtual environment ${VENV_PATH}" )
execute_process( COMMAND ${Python3_EXECUTABLE} -m pip install ${PIP_OPTIONS} ${CMAKE_CURRENT_SOURCE_DIR}/src/fckit/${_pkg_name} OUTPUT_QUIET )

Expand Down

0 comments on commit 7f6c3d8

Please sign in to comment.