Skip to content

Commit

Permalink
Merge pull request #10454 from jmarrec/develop
Browse files Browse the repository at this point in the history
Fix #10453 - python38.dll missing on windows installers
  • Loading branch information
Myoldmopar committed Mar 28, 2024
2 parents b826be0 + 0ece21d commit 9d7789a
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/windows_release.yml
Expand Up @@ -102,6 +102,15 @@ jobs:
mpm --find-updates
mpm --admin --find-updates
- name: Downgrade cmake to 3.28
run: |
cmake --version
choco install cmake --version=3.28.4 --installargs 'ADD_CMAKE_TO_PATH=System'
- name: Check cmake
run: |
cmake --version
# This will install all required packages and does that in a single thread. So later in cmake we can safely run in parallel
- name: Install required packages by building the Test document
shell: bash
Expand Down
1 change: 1 addition & 0 deletions cmake/PythonGetLibAndLinkUp.cmake
Expand Up @@ -25,4 +25,5 @@ if(WIN32)
endif()

# then copy the DLL in
message("COPYING ${RESOLVED_PYTHON_LIB} to ${BASE_PATH}")
execute_process(COMMAND "${CMAKE_COMMAND}" -E copy "${RESOLVED_PYTHON_LIB}" "${BASE_PATH}")
4 changes: 4 additions & 0 deletions src/EnergyPlus/CMakeLists.txt
Expand Up @@ -913,6 +913,8 @@ endif()
if(LINK_WITH_PYTHON)
# link the executable to the dll and bring it in
get_filename_component(RESOLVED_PYTHON_LIBRARY "${Python_LIBRARIES}" REALPATH)
message("Python_LIBRARIES=${Python_LIBRARIES}")
message("RESOLVED_PYTHON_LIBRARY=${RESOLVED_PYTHON_LIBRARY}")
if(WIN32)

# In case you have both release and debug Python libraries on your system, Python_LIBRARIES might be "optimized;C:/.../python38.lib;debug;C:/.../python38_d.lib"
Expand All @@ -931,6 +933,7 @@ if(LINK_WITH_PYTHON)
endforeach()
# else()
# No-op, already done above
message("RESOLVED_PYTHON_LIBRARY (optimized) =${RESOLVED_PYTHON_LIBRARY}")
endif()

# Windows is being ugly and linking against the Python DLL but not running
Expand All @@ -941,6 +944,7 @@ if(LINK_WITH_PYTHON)
COMMAND ${CMAKE_COMMAND} -DRESOLVED_PYTHON_LIB=${RESOLVED_PYTHON_LIBRARY} -DEXECUTABLE_PATH=$<TARGET_FILE:energyplusapi> -P
${PROJECT_SOURCE_DIR}/cmake/PythonGetLibAndLinkUp.cmake)
endif()

install(
CODE "execute_process(
COMMAND ${CMAKE_COMMAND}
Expand Down

5 comments on commit 9d7789a

@nrel-bot-2
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

develop (Myoldmopar) - x86_64-Linux-Ubuntu-22.04-gcc-11.4: OK (2790 of 2790 tests passed, 0 test warnings)

Build Badge Test Badge

@nrel-bot-3
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

develop (Myoldmopar) - x86_64-MacOS-10.18-clang-15.0.0: OK (2769 of 2769 tests passed, 0 test warnings)

Build Badge Test Badge

@nrel-bot
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

develop (Myoldmopar) - Win64-Windows-10-VisualStudio-16: OK (2768 of 2768 tests passed, 0 test warnings)

Build Badge Test Badge

@nrel-bot-2b
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

develop (Myoldmopar) - x86_64-Linux-Ubuntu-22.04-gcc-11.4-UnitTestsCoverage-Debug: OK (1980 of 1980 tests passed, 0 test warnings)

Build Badge Test Badge Coverage Badge

@nrel-bot-2
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

develop (Myoldmopar) - x86_64-Linux-Ubuntu-22.04-gcc-11.4-IntegrationCoverage-Debug: OK (791 of 791 tests passed, 0 test warnings)

Build Badge Test Badge Coverage Badge

Please sign in to comment.