Lines Matching refs:os
18 import os
26 THIS_DIR = os.path.realpath(os.path.dirname(__file__))
109 top = os.path.realpath(os.path.join(THIS_DIR, '../../..'))
110 return os.path.normpath(os.path.join(top, *args))
148 build_env = dict(os.environ)
155 path = os.path.realpath(os.getenv(env_var, default))
156 if not os.path.isdir(path):
157 os.makedirs(path)
166 return _get_dir_from_env(os.path.join(out_dir, 'dist'), 'DIST_DIR')
192 dist_dir = os.environ.get('DIST_DIR')
194 dist_repo_prop = os.path.join(dist_dir, file_name)
197 out_file = os.path.join(out_dir, file_name)
218 if not os.path.isdir(directory):
221 path = os.path.join(out_dir, name + '.zip')
222 if os.path.exists(path):
223 os.unlink(path)
225 cwd = os.getcwd()
226 os.chdir(os.path.dirname(directory))
227 basename = os.path.basename(directory)
233 os.chdir(cwd)
239 arcname = os.path.join(basename, 'repo.prop')
240 zip_file.write(os.path.join(tmpdir, 'repo.prop'), arcname)
256 type=os.path.realpath, default=get_out_dir())
263 type=os.path.realpath)
267 if 'ANDROID_BUILD_TOP' not in os.environ:
268 top = os.path.join(os.path.dirname(__file__), '../../..')
269 os.environ['ANDROID_BUILD_TOP'] = os.path.realpath(top)
277 main_filename = os.path.realpath(sys.modules['__main__'].__file__)
278 os.chdir(os.path.dirname(main_filename))