Commit bb5ef1b
Added build wrapper so build_ext runs before build_py
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 <rmd@sanger.ac.uk>1 parent e808d4c commit bb5ef1b
1 file changed
+18
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
| |||
28 | 29 | | |
29 | 30 | | |
30 | 31 | | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
31 | 47 | | |
32 | 48 | | |
33 | 49 | | |
| |||
144 | 160 | | |
145 | 161 | | |
146 | 162 | | |
147 | | - | |
| 163 | + | |
| 164 | + | |
148 | 165 | | |
149 | 166 | | |
150 | 167 | | |
| |||
0 commit comments