Nested Python C Extensions/Modules?
问题 How do I compile a C-Python module such that it is local to another? E.g. if I have a module named "bar" and another module named "mymodule", how do I compile "bar" so that it imported via "import mymodule.bar"? (Sorry if this is poorly phrased, I wasn't sure what the proper term for it was.) I tried the following in setup.py, but it doesn't seem to work: from distutils.core import setup, Extension setup(name='mymodule', version='1.0', author='Me', ext_modules=[Extension('mymodule', [