Open lochel opened 7 months ago
Please be aware that the nightly builds are currently broken, preventing us from uploading new packages.
Exception: Downloading artifact failed for https://build.openmodelica.org/omsimulator/nightly/linux-amd64/OMSimulator-linux-amd64-v2.1.1.post248-gf7c50c9.tar.gz
@mahge We can even remove the Makefile - it doesn't do much except for executing a python script.
@mahge We can even remove the Makefile - it doesn't do much except for executing a python script.
Then we can probably do it in the existing src/pip/CMakeLists.txt
.
Sounds good 😊 any suggestions on how to do it?
Sounds good 😊 any suggestions on how to do it?
Of course 🙂. Something like this in the src/pip/CMakeLists.txt
should be enough to create the packages. We can test it and adjust it as needed.
add_custom_target(omsimulator-pip-package
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/setup.py
COMMAND python3 setup.py sdist
COMMENT "Creating OMSimulator pip package."
)
This will create a target named omsimulator-pip-package
. One can then, for example, run make omsimulator-pip-package
in the build directory to create the packages.
This recoveres some changes to create a PyPI package for OMSimulator, but I'm uncertain about the current state of the changes. I would appreciate insights from @mahge on the best approach before proceeding further.
To generate the PyPI package, follow these steps:
Build the project using the
OM_OMS_ENABLE_PIP
option in CMake:Run the Makefile:
Upload the package using twine: