-
Notifications
You must be signed in to change notification settings - Fork 795
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
Auto-install Python Package #277
Merged
Merged
Changes from 24 commits
Commits
Show all changes
32 commits
Select commit
Hold shift + click to select a range
1725a57
cmake function to install python package once make install is completed
varunagrawal 93a00a3
add new make command for installing python wrapper
varunagrawal ca46ebf
added comments and removed unnecessary code
varunagrawal 56539c9
Merge branch 'develop' into feature/python-install
varunagrawal 6972a5c
updated comments in shell script
varunagrawal 530016e
added Windows batch script to install python wrapped package
varunagrawal efde078
pure CMake script to install Python wrapper after compiling
varunagrawal 9698b03
removed extra line
varunagrawal 5feaf6d
reset to previous version
varunagrawal 2475e6c
Load Cython requirements file instead of reading it in cmake
varunagrawal 453d3a7
Added cmake variable GTSAM_CYTHON_INSTALL_FULLPATH to include build t…
varunagrawal 4f6f821
Vastly improved setup.py template
varunagrawal 192184b
Specify working directory from where to call setup.py
varunagrawal 54c2903
make python-install command depends on gtsam target
varunagrawal 806e5b1
cleaner version of execution script which only needs 'make install'
varunagrawal 16532bf
run setup.py after installing the gtsam_eigency module
varunagrawal 55701d5
Merge branch 'develop' into feature/python-install
varunagrawal 192bf87
newline added to end of CMake file
varunagrawal 9cbabb2
Set high level Cython/Eigency variables to reduce duplication
varunagrawal 06476c8
Create and use cython build directory
varunagrawal c84060a
Use the high level cython variables, improve install process
varunagrawal 7a725bf
Remove redundant postfix checking since the postfix is already added …
varunagrawal 54f2acd
updated cython wrapper README
varunagrawal 8859b96
In-place cython build
varunagrawal 74591ee
fixed CYTHON_INSTALL_PATH cmake variable wrt cache
varunagrawal 59968fd
Python Wrapper CMake update
varunagrawal a6908cd
removed unneeded install commands and updated README
varunagrawal d2f69ee
Add python-install dependency for gtsam_unstable as well
varunagrawal cb151dd
update python build location in travis script
varunagrawal e08e392
Improved paths and added checks
varunagrawal db40cd7
Merge branch 'develop' into feature/python-install
varunagrawal 6657046
fix working directory for python install target
varunagrawal File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Awesome, but still the concern: this PR will always globally install the Cython wrapper, regardless of the prefix specified, when running
make install
?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.
Actually that's a mistake in the docs. The concept of the install prefix for the python wrapper is no longer valid since it builds everything in the CMake build directory. This makes everything self contained, and the install command installs the python package to the python namespace.
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 still insist that
make install
should not touch anything beyond the prefix, including the currentsite-packages
directory. This is a common practice and we should not break it.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.
First of all, I always use a prefix, and it works like a charm, so I understand the documentation to be correct. And indeed, the fact that cython is installed outside the prefix as Fan mentions, does seem like a breach of contract. We should probably change the default to something inside the prefix.
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.
By the way, Varun, your use of prefix seems unconventional. I always use my home directory as the prefix, so I have an include and lib folder there.
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 was unclear about what I meant in my previous comment. That was my mistake in the docs. The way this PR does this is that cython is no longer installed to the prefix location, so the notion of a prefix is no longer applicable. Everything happens inside the CMake build directory.
And when I mentioned the package, I mean the result of running python setup.py install which is technically what installs the GTSAM package and makes it available via python.
Thanks to this PR, the only things that depend on the prefix are the C++ libraries and the Matlab wrapper.
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 do think in line with Varun that the cython wrapper should not be installed to the prefix in its current subdirectory - it should be inside
$PREFIX/share/gtsam/cython
or something, or NOT installed at all (only reside in build directory), but I do NOT think thatmake install
should install anything to the system (site-packages
, etc.), either.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 actually prefer the NOT installed at all option. I am still being mindful of build postfixes so that shouldn't be a problem.