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 -

How to put a lock and transaction on table using spring 4 or above using jdbcTemplate and annotations like @Transactional? -

How to understand 2 main() functions after using uftrace to profile the C++ program? -