installation - Have Python's setup() block until complete -


i'm calling setup() in python script. find program works if 1 <= sleep_time:

from distutils.core import setup, extension import os, time, importlib  dir = 'path/of/dir/for/spammodule.c' module1 = extension('spam',     sources = [os.path.join(dir, 'spammodule.c')]) setup(     script_name = 'setup.py',     script_args = ['build'],     name = 'packagename',     ext_modules = [module1]) time.sleep(sleep_time) build_dir = 'directory/where/the/files/built/by/setup/go' sys.path.append(build_dir) spam = importlib.import_module('spam') 

i suspect behavior occurs because setup() calls system commands, , not wait commands complete. there way have setup() wait until commands launches complete?


Comments

Popular posts from this blog

Command prompt result in label. Python 2.7 -

javascript - How do I use URL parameters to change link href on page? -

amazon web services - AWS Route53 Trying To Get Site To Resolve To www -