Fix #15 - installing from pip
and easy_install
#20
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.
build_ext
task is called to generate SWIG .py filesbefore the Python copy step happens and we miss packaging and
installing the generated files.
install
command for use withpip
. This is a bit of ahack because setuptools looks at the stack frame to determine if it
was called from the setup function, and wrapping it would break that
behavior.
bdist_egg
command for use witheasy_install
.Bear in mind that I'm no setuptools / distutils expert. This is the combined result of a bunch of Googling and some source diving into setuptools / distutils. Interesting references about this problem include:
http:https://stackoverflow.com/questions/10559589/adding-output-file-to-python-extension
http:https://stackoverflow.com/questions/29477298/setup-py-run-build-ext-before-anything-else
http:https://bugs.python.org/issue7562
http:https://stackoverflow.com/questions/12491328/python-distutils-not-include-the-swig-generated-module
http:https://stackoverflow.com/questions/17666018/using-distutils-where-swig-interface-file-is-in-src-folder/26556654#26556654