Skip to content

Commit

Permalink
Install Python modules from requirements.txt
Browse files Browse the repository at this point in the history
The packages contained in python/requirements.txt will now be included
in the OpenStudio distribution by default.

ref #4992
  • Loading branch information
kbenne authored and jmarrec committed Oct 30, 2023
1 parent b3765a5 commit f4ab0f2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 3 additions & 3 deletions python/SetupPython.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ else()
endif()
endif()

if (PYTHON_INSTALL_NATIVE_MODULES)
execute_process(COMMAND ${CMAKE_COMMAND} -E env --unset=PIP_REQUIRE_VIRTUALENV ${Python_EXECUTABLE} -m pip install --target=${ENERGYPLUS_DIR}/python_standard_lib --upgrade jinja2 numpy pandas pip)
endif()
execute_process(COMMAND ${CMAKE_COMMAND} -E env --unset=PIP_REQUIRE_VIRTUALENV ${Python_EXECUTABLE}
-m pip install --target=${ENERGYPLUS_DIR}/python_standard_lib --upgrade -r ${PROJECT_SOURCE_DIR}/python/requirements.txt
)

get_filename_component(Python_PROGRAM_NAME ${Python_EXECUTABLE} NAME)

Expand Down
4 changes: 4 additions & 0 deletions python/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
jinja2 == 3.1.2
numpy == 1.24.4
pandas == 2.0.3
pytest == 7.4.2

0 comments on commit f4ab0f2

Please sign in to comment.