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

javascript - Confirm a form & display message if form is valid with JQuery -

Retrieving ETA (estimated time of arrival) with Google Distance Matrix API and public transit as transport mode -

ionic framework - Meteor - Error: Failed to execute 'insertBefore' on 'Node' -