Added build wrapper so build_ext runs before build_py #74
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.
SWIG, run by build_ext, generates a shared object file and a python library. The latter needs to be generated before build_py is run so that build_py finds it. Unfortunately the default in setuptools is to run build_py before build_ext. The solution is to override the build class so that the build order can be changed.
With this change, "pip install" works better, including when lsf-python-api is a dependency of another module.
See:
https://bugs.python.org/issue2624
https://bugs.python.org/issue1016626
https://stackoverflow.com/questions/12491328/python-distutils-not-include-the-swig-generated-module
https://stackoverflow.com/questions/50239473/building-a-module-with-setuptools-and-swig
Signed-off-by: Robert Davies [email protected]