I agree that this should work out of the box and will consider this a mistake.
One way to get this job is to simply change the order in which things are built. By default, setup.py will first compile python modules and then create any external packages.
You can change the build order by subclassing the default build class, and then ask setup.py use its own build class using the cmdclass parameter.
from setuptools import setup, Extension from distutils.command.build import build as _build
source share