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

'hasOwnProperty' in javascript -

python - ValueError: No axis named 1 for object type <class 'pandas.core.series.Series'> -

java - How to provide dependency injections in Eclipse RCP 3.x? -