-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Recover changes to build PyPI package #1276
base: master
Are you sure you want to change the base?
Conversation
Please be aware that the nightly builds are currently broken, preventing us from uploading new packages.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think a top level Makefile is perhaps not a good idea. It will be confusing because one would assume it will be able to build the whole project.
A prewritten Makefile also spoils the flexibility we got from CMake in the sense that users will not be able to chose their build program as they want.
If possible, we should do this in the CMake files (in the respective directory) as a custom target so that it works with other build tools like Ninja, MSBuild.
@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 |
Sounds good 😊 any suggestions on how to do it? |
Of course 🙂. Something like this in the 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 |
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:cmake -S . -B build/ -DCMAKE_INSTALL_PREFIX=install/ -DOM_OMS_ENABLE_PIP=ON cmake --build build/ --target install
Run the Makefile:
Upload the package using twine: