File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ project(OMSimulator)
88option (OMS_ENABLE_OMSimulator "Enable OMSimulator component" ON )
99option (OMS_ENABLE_OMSimulatorGui "Enable OMSimulator GUI component" OFF )
1010option (OMS_ENABLE_PIP "Enable pip component" OFF )
11+ option (OMS_ENABLE_LOCAL_PIP "Prepare pip package using local OMSimulator build" OFF )
1112option (OMS_ENABLE_TESTSUITE "Enable the OMSimulator testsuite" OFF )
1213option (OMS_ENABLE_COVERAGE "Instrument the OMSimulator C++ sources for code coverage" OFF )
1314
@@ -86,7 +87,7 @@ if(OMS_ENABLE_OMSimulatorGui)
8687 add_subdirectory (src/OMSimulatorGui )
8788endif ()
8889
89- if (OMS_ENABLE_PIP)
90+ if (OMS_ENABLE_PIP OR OMS_ENABLE_LOCAL_PIP )
9091 add_subdirectory (src/pip )
9192endif ()
9293
Original file line number Diff line number Diff line change 11project (pip)
22
3+ if (OMS_ENABLE_LOCAL_PIP)
4+ set (OMS_PIP_CMDCLASS "" )
5+ else ()
6+ set (OMS_PIP_CMDCLASS
7+ "[tool.setuptools.cmdclass]
8+ build_py = \" build_helpers.OMSInstaller\" "
9+ )
10+ endif ()
11+
312configure_file ("${CMAKE_CURRENT_SOURCE_DIR } /build_helpers.py" "${CMAKE_CURRENT_BINARY_DIR } /build_helpers.py" @ONLY )
413configure_file ("${CMAKE_CURRENT_SOURCE_DIR } /pyproject.toml" "${CMAKE_CURRENT_BINARY_DIR } /pyproject.toml" @ONLY )
514
@@ -9,3 +18,10 @@ install(FILES "${CMAKE_CURRENT_BINARY_DIR}/pyproject.toml" DESTINATION ${CMAKE_C
918install (FILES "${CMAKE_CURRENT_SOURCE_DIR } /MANIFEST.in" DESTINATION ${CMAKE_CURRENT_SOURCE_DIR } /install/)
1019install (FILES "${CMAKE_CURRENT_SOURCE_DIR } /README.md" DESTINATION ${CMAKE_CURRENT_SOURCE_DIR } /install/)
1120install (FILES "${CMAKE_SOURCE_DIR } /OSMC-License.txt" DESTINATION ${CMAKE_CURRENT_SOURCE_DIR } /install/)
21+
22+ if (OMS_ENABLE_LOCAL_PIP)
23+ message (STATUS "Local pip package enabled" )
24+ install (DIRECTORY "${CMAKE_INSTALL_PREFIX } /${CMAKE_INSTALL_LIBDIR} /OMSimulator/" DESTINATION "${CMAKE_CURRENT_SOURCE_DIR } /install/OMSimulator/" )
25+ # Copy the platform-specific OMSimulator shared library
26+ install (FILES "$<TARGET_FILE :OMSimulatorLib >" DESTINATION "${CMAKE_CURRENT_SOURCE_DIR } /install/OMSimulator/" )
27+ endif ()
Original file line number Diff line number Diff line change @@ -32,5 +32,7 @@ Download = "https://pypi.org/project/OMSimulator/#files"
3232packages = [" OMSimulator" ] # # dynamically created
3333zip-safe = false
3434
35- [tool .setuptools .cmdclass ]
36- build_py = " build_helpers.OMSInstaller"
35+ [tool .setuptools .package-data ]
36+ OMSimulator = [" **/*" ]
37+
38+ @OMS_PIP_CMDCLASS@
You can’t perform that action at this time.
0 commit comments