Building a module with setuptools and swig
问题 I have a bunch of SWIG interfaces (foo.i, bar.i, etc.). I want to build them into a Python (3.6.4) module for my platform (MS Windows), with setuptools. The module should include the SWIG-generated Python files (*.py), the binary extensions (*.pyd) and the compiled caches (*.pyc). My setup.py is essentially like this: from setuptools import setup, Extension from pathlib import Path paths=list(Path('.').glob('*.i')) py=[path.stem for path in paths] ext=[Extension('_' + path.stem, [str(path)])