Skip to content
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

Added build wrapper so build_ext runs before build_py #74

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

daviesrob
Copy link

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]

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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant