Some times ago, I proposed an optional build for SWIG if the SWIG binary was not found on the system. Here I propose an enhancement, a new library builder that will be registered in the environment env as PythonModule. It takes the same arguments as a classical SharedLibrary, but it does some additional steps :
- It forces SWIG to create a Python wrapper (flag -python)
- It checks if SWIG is present at all
- It suppresses every prefix that the system might need (as lib in Linux)
- On Windows and for Python >= 2.5, it changes the extension as pyd