The Python setup documentation suggests for SWIG the following:
setup(...,
ext_modules=[Extension('_foo', ['foo.i'],
swig_opts=['-modern', '-I../include'])],
py_modules=['foo'],
)
However, the generated file is not immediately copied to the path. Some people suggest executing two times the setup (so the module is already generated). Others installing via scripts or subclassing the install command. Are there any good practices to address this issue with remote installations in mind (clusters) ?