-
Notifications
You must be signed in to change notification settings - Fork 544
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
Build python binding as regular package #506
Build python binding as regular package #506
Conversation
Can one of the admins verify this patch? |
ok to test |
@aguenette can you have a look? |
@KernelA , this is a great add-on for libpointmatcher! We are not set up to use GitHub workflow yet, but the timing is good as our legacy CI tool seems to stop working. Hopefully, by mid-summer, we will have transitioned to GitHub workflow. Don't give up, your PR will be processed ;) |
@pomerlef, ok. I think there is some work. For example, extracting version from CMake file as base version for the python package. We must sync it manually, at the moment. |
@KernelA By the way awesome work. It is a great addition to libpointmatcher. |
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've finish my review and added my recommandation. Good job @KernelA, this is going to be very useful for the build system automation.
Remark: I've tested the GitHub workflow using nektos/act.
Note to self: we will have to refactor the jobs steps eventualy to reduce build time if we want to add support for other ubuntu versions and computer architecture (boost
and libnabo
install could go in a docker container) but this pull request is a great starting point.
Thanks @KernelA
python/setup.py
Outdated
|
||
version = None | ||
|
||
with open(path_to_file, "r", encoding="utf-8") as f: |
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.
Fetching the pointmatcher version dynamicaly will be a very usefull tool for the build system automation.
(!) Limitation: This approach to fetching the POINTMATCHER_VERSION
only work if the user execute
python -m build --wheel
It will break when using the default
python -m build
because the build command will build sdist in a first step and then build wheel fetching from a temporary dir /tmp/build-via-sdist-*/pypointmatcher-*
.
I recommand
- to keep this approach for now but wrapped in a try/except clause with an explicit error message pinpointing its origin since it is not obvious when it happen in a install stacktrace which is usualy prety long;
- to add an explicit comment on those limitations in the code to advise futur developer;
- and to add a warning in the
doc/CompilationPython.md
package install procedure.
@RedLeader962, thank you for feedback! I did make changes according to review. Will wait a build status: |
8dbd1aa
to
ec4f26c
Compare
ec4f26c
to
2ec527e
Compare
The last build status: |
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.
This pull request contains:
Release page example
We can install python binding as regular python package via pip. I think it simplifies package using and will lead to more broadly using.
The workflow contains code for windows building, but I cannot compile it with MS MPI. Changes in the source code are needed.