-
Notifications
You must be signed in to change notification settings - Fork 769
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
Example Datasets with Python Package #501
Conversation
I think this would not work for wheels. I propose we have a Python version of this function, which uses |
I actually checked that and it works with the wheel format. I am double checking right now. |
Yup, on running |
I mean we should not touch anything outside of the site-packages directory, per the standard guidelines for python packages. |
Indeed, @varunagrawal, does the code now refer to the site-packages? That would be powerful magic, and would be the only way it could work for people that use "pip install gtsam", right? |
It doesn't quite unfortunately, because the C++ function I have seen packages like |
I'll add the custom function in a bit. |
@varunagrawal Yeah let's not be relaxed. If there is no c++ way, is there a python way as Fan suggested? |
@dellaert there is no C++ way without some crazy magic due to the circular dependency (and even then it could break). I am creating the python version. Building the wheel as of this comment. |
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.
Cool!!
Updated the
setup.py
to include the example data files and datasets. Resolves #500.Note that we now install the data to a common "gtsam_example_data" directory, since we need CMake to know the path of the directory when building the
.so
file. This is the only way I've found to break this circular dependency (setup.py depends on .so and .so depends on where setup.py installs the data), so any better suggestions or recommendations are welcome!