code
stringlengths
3
6.57k
delete(path)
rm(self, path)
delete(expand_macros(path, self)
link(self, source, link)
trace('%s -> %s' % (link, source)
expand_macros(source, self)
expand_macros(link, self)
os.path.lexists(link)
delete(link)
os.symlink(source, link)
extract_archive(self, archive, cwd, validate_only, overwrite=False)
os.path.splitext(archive)
which('unzip')
error('unzip not found')
args.extend(["-o"])
args.extend(["-t"])
args.extend([archive])
which('tar')
error('tar not found')
args.extend(['-O'])
run(command, args, cwd)
build(self)
Package.configure(self)
Package.make(self)
lipo_dirs(self, dir_64, dir_32, bin_subdir, replace_32=True)
os.path.join(dir_64, bin_subdir)
os.path.join(dir_32, bin_subdir)
tempfile.mkdtemp()
os.path.join(lipo_dir, bin_subdir)
os.path.exists(dir64_bin)
os.path.exists(lipo_bin)
os.mkdir(lipo_bin)
os.walk(dir64_bin)
os.path.relpath(root, dir64_bin)
file.endswith('.a')
file.endswith('.dylib')
file.endswith('.so')
os.path.join(dir64_bin, relpath, file)
os.path.join(dir32_bin, relpath, file)
os.path.join(lipo_bin, relpath, file)
os.path.exists(dir32_file)
os.path.exists(os.path.join(lipo_bin, relpath)
os.makedirs(os.path.join(lipo_bin, relpath)
os.path.islink(dir64_file)
run_shell(lipo_cmd)
shutil.move(lipo_file, dir32_file)
warn("lipo: 32-bit version of file %s not found" % file)
shadow_copy (self, source, dest, exclude_git = False)
trace ('shadow_copy %s %s' % (source , dest)
os.path.exists(dest)
error ('Destination directory must not exist')
os.path.dirname (config.state_root)
os.path.basename (config.state_root)
os.path.commonprefix ([source, config.state_root])
os.walk (source)
os.path.relpath(root, source)
os.path.join(dest, relpath)
os.makedirs(destpath)
os.path.join (root, file)
os.path.islink(fullpath)
os.path.join(os.path.dirname(fullpath)
os.readlink(fullpath)
os.path.exists(fullpath)
os.path.commonprefix ([config.state_root, target])
os.link (fullpath, os.path.join (destpath, file)
trace ('shadow_copy done')
copy_side_by_side(self, src_dir, dest_dir, bin_subdir, suffix, orig_suffix=None)
add_suffix(filename, sfx)
filename.split('.', 1)
len(fileparts)
trace(p)
os.path.join(src_dir, bin_subdir)
os.path.join(dest_dir, bin_subdir)
trace('src_dir %s' % src_dir)
trace('dest_dir %s' % dest_dir)
os.path.exists(src_dir)
iterate_dir(src_dir)
os.path.relpath(path, src_dir)
os.path.split(relpath)
trace(reldir + '/' + filename)
backtick('file -b "%s"' % path)
filetype.startswith('Mach-O')
add_suffix(filename, suffix)
trace(dest_file)
os.path.join(dest_dir, reldir, filename)
os.path.exists(dest_orig_file)
add_suffix(filename, orig_suffix)
trace(suffixed)
shutil.move(dest_orig_file, suffixed)
os.symlink(os.path.basename(suffixed)
os.path.exists(os.path.dirname(dest_file)
os.makedirs(os.path.dirname(dest_file)
shutil.copy2(path, dest_file)
arch_build(self, arch)
Package.profile.arch_build(arch, self)
expand_build_env(self)
configure(self)
self.sh('%{configure} %{configure_flags} %{local_configure_flags}')
make(self)
self.sh('%{make}')