python - Get the distro from a distutils setup call -
i want unit test python extensions. achieve i'm running setup() in script:
from distutils.core import setup, extension import os dir = os.path.dirname(__file__) def call_setup(): module1 = extension('callbacks', sources = [os.path.join(dir, 'callbacks.c')]) setup( script_name = 'setup.py', script_args = ['build'], name = 'packagename', ext_modules = [module1]) to avoid leaving junk in test directory want cleanup build after tests run. i'd run distutils.command.clean.clean() in unittest teardown(). how dist object distro must passed argument clean()?
thanks
it looks call setup() should return distribution instance.
see
setup()function list of keyword arguments accepteddistributionconstructor.setup()creates distribution instance.
Comments
Post a Comment