def run(self): build_java() jar_path = self.__find_jar() write_config(jar_name=os.path.basename(jar_path)) write_schema_module() BaseBuild.run(self) self.__add_jar(jar_path)
def run(self): self._make_bin_wrappers() self._make_man_pages() self._build_icons() self.run_command("build_i18n") build.run(self)
def run(self): for f in qt_ui_files(): self.compile_ui(f) self.add_gettext_support(f) os.system("pyrcc4 yali4/data.qrc -o yali4/data_rc.py") self.compile_shortcut() build.run(self)
def run(self): _build.run(self) nrnivmodl = self.find_nrnivmodl() if nrnivmodl: print("nrnivmodl found at", nrnivmodl) import subprocess p = subprocess.Popen( nrnivmodl, shell=True, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, close_fds=True, cwd=os.path.join(os.getcwd(), self.build_lib, "pyNN/neuron/nmodl"), ) stdout = p.stdout.readlines() result = p.wait() # test if nrnivmodl was successful if result != 0: print("Unable to compile NEURON extensions. Output was:") print(" ".join([""] + stdout)) # indent error msg for easy comprehension else: print("Successfully compiled NEURON extensions.") else: print("Unable to find nrnivmodl. It will not be possible to use the pyNN.neuron module.")
def run(self): executable = find_executable("configure", path=SOURCE) if executable: import subprocess executable = os.path.abspath(executable) subprocess.check_call(executable, cwd=os.path.dirname(executable)) build.run(self) # running parent, even though it seems empty
def run(self): config_opts = { "VERSION" : VERSION, "RHEL6DEFAULTS" : self.rhel6defaults, } config_data = config_template % config_opts print "Version : %s" % VERSION print "RHEL6 defaults : %s" % bool(self.rhel6defaults) for f in config_files: if os.path.exists(f): origconfig = file(f).read() if origconfig == config_data: continue print "Generating %s" % f fd = open(f, "w") fd.write(config_data) fd.close() for filename, newname in _build_po_list().values(): langdir = os.path.dirname(newname) if not os.path.exists(langdir): os.makedirs(langdir) print "Formatting %s to %s" % (filename, newname) os.system("msgfmt po/%s -o %s" % (filename, newname)) build.run(self)
def run(self): # # compile message catalogs # domains = [ 'hwp5proc', 'hwp5html', 'hwp5odt', 'hwp5txt', 'hwp5view', ] for domain in domains: args = [ sys.executable, __file__, 'compile_catalog', '--domain={}'.format(domain) # ..other common options are provided by setup.cfg ] subprocess.check_call(args) # # process to normal build operations # _build.run(self)
def run(self): build.run(self) cherrytree_man_file = "linux/cherrytree.1" cherrytree_man_file_gz = cherrytree_man_file + ".gz" if newer(cherrytree_man_file, cherrytree_man_file_gz): if os.path.isfile(cherrytree_man_file_gz): os.remove(cherrytree_man_file_gz) import gzip f_in = open(cherrytree_man_file, 'rb') f_out = gzip.open(cherrytree_man_file_gz, 'wb') f_out.writelines(f_in) f_out.close() f_in.close() if self.distribution.without_gettext: return for po in glob.glob(os.path.join (PO_DIR, '*.po')): lang = os.path.basename(po[:-3]) mo = os.path.join(MO_DIR, lang, 'cherrytree.mo') directory = os.path.dirname(mo) if not os.path.exists(directory): info('creating %s' % directory) os.makedirs(directory) if newer(po, mo): info('compiling %s -> %s' % (po, mo)) try: rc = subprocess.call(['msgfmt', '-o', mo, po]) if rc != 0: raise Warning, "msgfmt returned %d" % rc except Exception, e: error("Building gettext files failed. Try setup.py --without-gettext [build|install]") error("Error: %s" % str(e)) sys.exit(1)
def run(self): print 'Building ...' os.system('pyuic4 gui/mainWindow.ui -o %s/mainWindow.py -g %s' % (PROJECT_LIB, PROJECT)) os.system('pyrcc4 %s/icons.qrc -o %s/icons_rc.py' % (PROJECT_LIB, PROJECT_LIB)) build.run(self)
def run (self): build.run (self) if self.distribution.without_gettext: return for po in glob.glob (os.path.join (PO_DIR, '*.po')): lang = os.path.basename(po[:-3]) mo = os.path.join(MO_DIR, lang, 'terminator.mo') directory = os.path.dirname(mo) if not os.path.exists(directory): info('creating %s' % directory) os.makedirs(directory) if newer(po, mo): info('compiling %s -> %s' % (po, mo)) try: rc = subprocess.call(['msgfmt', '-o', mo, po]) if rc != 0: raise Warning, "msgfmt returned %d" % rc except Exception, e: error("Building gettext files failed. Try setup.py --without-gettext [build|install]") error("Error: %s" % str(e)) sys.exit(1)
def run(self): # Clear all os.system("rm -rf build") build.run(self) # Copy codes print "Copying PYs..." os.system("cp -R src/ build/") # Copy icons print "Copying Images..." os.system("cp -R data/ build/") print "Generating .desktop files..." for filename in glob.glob("data/*.desktop.in"): os.system("intltool-merge -d po %s %s" % (filename, filename[:-3])) print "Generating UIs..." for filename in glob.glob1("ui", "*.ui"): os.system("py2uic5 -o build/ui_%s.py ui/%s" % (filename.split(".")[0], filename))#, PROJECT)) print "Generating RCs..." for filename in glob.glob1("data", "*.qrc"): os.system("py2rcc5 data/%s -o build/%s_rc.py" % (filename, filename.split(".")[0])) print "Generating QMs..." makeDirs("build/lang") #Temporary bindir to avoid qt4 conflicts #os.system("lrelease-qt5 lang/*.ts") os.system("lrelease lang/*.ts") for filename in glob.glob1("lang", "*.qm"): shutil.copy("lang/{}".format(filename), "build/lang")
def run(self): # Normal build: build.run(self) # We drop in a config file for apache and we modify # that config file to represent python path on the host # building site_packages_str = '/usr/lib/python2.7/site-packages' python_lib = get_python_lib() # If we happen to be running on python 2.7, there is nothing more # to do. if site_packages_str == python_lib: return apache_config_file = None for dirpath, dirname, filenames in os.walk('build'): if dirpath.endswith('apache') and 'adagios.conf' in filenames: apache_config_file = os.path.join(dirpath, 'adagios.conf') # If build process did not create any config file, we have nothing more to do if not apache_config_file: return # Replace the python path with actual values try: contents = open(apache_config_file, 'r').read() contents = contents.replace(site_packages_str, python_lib) open(apache_config_file, 'w').write(contents) finally: pass
def run(self): """ Run the build script and call common build script. """ work_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), 'modules', 'bootstrap')) static_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), 'djungle', 'bootstrap', 'static')) target_dir = os.path.join(static_dir, 'bootstrap') source_dir = os.path.join(work_dir, 'bootstrap') if not os.path.isdir(static_dir): print 'creating static dir' os.makedirs(static_dir) if os.path.isdir(target_dir): print 'removind old build files' shutil.rmtree(target_dir) call(['make', 'bootstrap'], cwd=work_dir) shutil.copytree(source_dir, target_dir) js_dir = os.path.join(work_dir, 'js') for js_file in os.listdir(js_dir): if fnmatch.fnmatch(js_file, 'bootstrap-*.js'): shutil.copy(os.path.join(js_dir, js_file), os.path.join(target_dir, 'js', js_file)) build.run(self)
def run(self): # super build build.run(self) # current file file_path = os.path.realpath(__file__) print("\trealpath: %s" % file_path) file_dir = os.path.dirname(__file__) print("\tdirname: %s" % file_dir) target_files = [] for curr_dir, curr_subdirs, curr_files in os.walk(os.path.join(file_dir, "readdy")): print("\twalking: %s" % curr_dir) for f in curr_files: if self.is_dynlib(f): print("\t\tfound dynlib %s" % f) target_files.append(os.path.join(curr_dir, f)) print("\tdynlibs: %s" % target_files) # copy resulting tool to library build folder internal_build = os.path.join(self.build_lib, "readdy", "_internal") self.mkpath(internal_build) if not self.dry_run: for target in target_files: self.copy_file(target, internal_build)
def run(self): # Create (or overwrite) seal/version.py with open(os.path.join('seal', 'version.py'), 'w') as f: f.write('version = "%s"' % self.version) # run the usual build du_build.run(self) # make bwa libbwa_dir = "seal/lib/aligner/bwa" libbwa_src = os.path.join(libbwa_dir, "libbwa") libbwa_dest = os.path.abspath(os.path.join(self.build_purelib, libbwa_dir)) ret = os.system("BWA_LIBRARY_DIR=%s make -C %s libbwa" % (libbwa_dest, libbwa_src)) if ret: raise DistutilsSetupError("could not make libbwa") # protobuf classes proto_src = "seal/lib/io/mapping.proto" ret = os.system("protoc %s --python_out=%s" % (proto_src, self.build_purelib)) if ret: raise DistutilsSetupError("could not run protoc") # Java stuff ant_cmd = 'ant -Dversion="%s" -Doverride_version_check="%s"' % (self.version, self.override_version_check) if self.hadoop_bam: ant_cmd += ' -Dhadoop.bam="%s"' % self.hadoop_bam ret = os.system(ant_cmd) if ret: raise DistutilsSetupError("Could not build Java components") # finally make the jar self.package()
def run(self, *args, **kwargs): # Build with cmake leeloo_build_dir = os.path.join(self.build_temp, 'leeloo') print(leeloo_build_dir) if os.path.exists(leeloo_build_dir): shutil.rmtree(leeloo_build_dir) py_version = "%d.%d" % (sys.version_info.major, sys.version_info.minor) os.makedirs(leeloo_build_dir) cwd = os.getcwd() os.chdir(leeloo_build_dir) check_call(['cmake', '-DCMAKE_BUILD_TYPE=release', '-DPYTHON_VERSION='+py_version, cwd]) check_call(['make','-j']) os.chdir(cwd) # Create the package directory leeloo_package_dir = os.path.join(tmp_dir, "pyleeloo") #leeloo_package_dir = os.path.join(self.build_temp, 'package/leeloo') os.makedirs(leeloo_package_dir) shutil.copy(os.path.join(leeloo_build_dir, "pyleeloo.so"), os.path.join(leeloo_package_dir, "pyleeloo.so")) with open(os.path.join(leeloo_package_dir, "__init__.py"), "w") as f: f.write("# leeloo python package\n") f.write("from .pyleeloo import *") build.run(self, *args, **kwargs)
def run(self): try: subprocess.check_call(['make']) except subprocess.CalledProcessError as e: print ("Compilation error: ", e) return DistutilsBuild.run(self)
def run(self): here = os.path.abspath(os.getcwd()) from distutils import sysconfig config = sysconfig.get_config_vars() try: restore = senv(("CFLAGS", config["CFLAGS"]), ("LDFLAGS", config["LDFLAGS"])) try: os.chdir(LRMQDIST()) if not os.path.isfile("config.h"): print("- configure rabbitmq-c...") os.system(CMD_CONFIGURE) # print('- make rabbitmq-c...') # os.chdir(LRMQSRC()) # os.system(''%s' all' % find_make()) finally: os.environ.update(restore) finally: os.chdir(here) restore = senv( # ('LDFLAGS', ' '.join(glob(LRMQSRC('*.o')))), ("CFLAGS", " ".join(self.stdcflags)) ) codegen() try: _build.run(self) finally: os.environ.update(restore)
def run(self): # Run build.run function build.run(self) if getattr(self.distribution, 'running_salt_install', False): # If our install attribute is present and set to True, we'll go # ahead and write our install time python modules. # Write the hardcoded salt version module salt/_version.py self.run_command('write-salt-version') # Write the system paths file system_paths_file_path = os.path.join( self.build_lib, 'salt', '_syspaths.py' ) open(system_paths_file_path, 'w').write( INSTALL_SYSPATHS_TEMPLATE.format( date=datetime.utcnow(), root_dir=self.distribution.salt_root_dir, config_dir=self.distribution.salt_config_dir, cache_dir=self.distribution.salt_cache_dir, sock_dir=self.distribution.salt_sock_dir, srv_root_dir=self.distribution.salt_srv_root_dir, base_file_roots_dir=self.distribution.salt_base_file_roots_dir, base_pillar_roots_dir=self.distribution.salt_base_pillar_roots_dir, base_master_roots_dir=self.distribution.salt_base_master_roots_dir, logs_dir=self.distribution.salt_logs_dir, pidfile_dir=self.distribution.salt_pidfile_dir, ) )
def run(self): cwd=os.getcwd() ldpath = '%s/Python-Object/blib/arch/auto/Python/Object' % cwd perllib = '%s/Python-Object/blib/lib' % cwd pypath = '%s/%s' % (cwd, self.build_lib) os.system('LD_LIBRARY_PATH="%s" PERL5LIB="%s" PYTHONPATH="%s" python test.py' % (ldpath, perllib, pypath)) build.run(self)
def run(self): pybuild.run(self) # check for alternate prefix if self.mythtv_prefix is None: return # find file for path,dirs,files in os.walk('build'): if 'static.py' in files: break else: return # read in and replace existing line buff = [] path = os.path.join(path,'static.py') with open(path) as fi: for line in fi: if 'INSTALL_PREFIX' in line: line = "INSTALL_PREFIX = '%s'\n" % self.mythtv_prefix buff.append(line) # push back to file with open(path,'w') as fo: fo.write(''.join(buff))
def run(self): if numpy is None: self.warn('NOT using numpy: it is not available') elif get_c_numpy() is None: self.warn("NOT using numpy: numpy available but C source is not") if IPython and not self.without_ipython: if V(IPython.__version__) > V('0.10'): self.distribution.py_modules.append('IPython.config.profile.tango.ipython_config') else: self.distribution.py_modules.append('IPython.Extensions.ipy_profile_tango') dftbuild.run(self) if self.strip_lib: if 'posix' in os.name: has_objcopy = os.system("type objcopy") == 0 if has_objcopy: d = abspath(self.build_lib, "PyTango") orig_dir = os.path.abspath(os.curdir) so = "_PyTango.so" dbg = so + ".dbg" try: os.chdir(d) is_stripped = os.system('file %s | grep -q "not stripped" || exit 1' % so) != 0 if not is_stripped: os.system("objcopy --only-keep-debug %s %s" % (so, dbg)) os.system("objcopy --strip-debug --strip-unneeded %s" % (so,)) os.system("objcopy --add-gnu-debuglink=%s %s" % (dbg, so)) os.system("chmod -x %s" % (dbg,)) finally: os.chdir(orig_dir)
def run(self): try: subprocess.check_call("cd pachi_py; mkdir -p build && cd build && cmake ../pachi && make -j4", shell=True) except subprocess.CalledProcessError as e: print("Could not build pachi-py: %s" % e) raise DistutilsBuild.run(self)
def run(self): if platform.system() == "Windows": if LooseVersion(self.get_cmake_version()) < '3.1.0': raise RuntimeError("CMake >= 3.1.0 is required on Windows") if not os.path.exists('mitielib/build'): os.makedirs('mitielib/build') os.chdir('mitielib/build') if sys.maxsize > 2**32: subprocess.check_call(['cmake', '..', '-A', 'x64']) else: subprocess.check_call(['cmake', '..']) subprocess.check_call(['cmake', '--build', '.', '--config', 'Release', '--target', 'install']) os.chdir('../..') build.run(self) self.copy_file( 'mitielib/mitie.dll', os.path.join(self.build_lib, 'mitie/mitie.dll')) else: subprocess.check_call(['make', 'mitielib']) build.run(self) self.copy_file( 'mitielib/libmitie.so', os.path.join(self.build_lib, 'mitie/libmitie.so'))
def run(self, *args): build.run(self, *args) for lang in langs: mkmo(lang) merge_i18n()
def run(self): for binary in ['kajongg','kajonggserver', 'kajonggserver3']: open(binary, 'w').write('#!/bin/sh\nexec %skajongg/%s.py $*\n' % (kdeDirs['data'], binary)) os.chmod(binary, 0755 ) call(['cp hisc-apps-kajongg.svgz kajongg.svgz'], shell=True) call(['cp hisc-action-games-kajongg-law.svgz games-kajongg-law.svgz'], shell=True) build.run(self)
def run(self): if platform_is_linux(): remove_binaries() create_binaries() copy_sharedlib() remove_binaries() _build.run(self)
def run (self): # Gen .in files with @PREFIX@ replaced for filename in ['udev-discover']: infile = open(filename + '.in', 'r') data = infile.read().replace('@PREFIX@', self.prefix) infile.close() outfile = open(filename, 'w') outfile.write(data) outfile.close() build.run (self) for po in glob.glob (os.path.join (PO_DIR, '*.po')): lang = os.path.basename(po[:-3]) mo = os.path.join(MO_DIR, lang, 'udevdiscover.mo') directory = os.path.dirname(mo) if not os.path.exists(directory): info('creating %s' % directory) os.makedirs(directory) if newer(po, mo): info('compiling %s -> %s' % (po, mo)) try: rc = subprocess.call(['msgfmt', '-o', mo, po]) if rc != 0: raise Warning, "msgfmt returned %d" % rc except Exception, e: error("Building gettext files failed. Try setup.py \ --without-gettext [build|install]") error("Error: %s" % str(e)) sys.exit(1)
def run(self): # Simulate a slow package import time time.sleep(5) # old style class _build.run(self)
def run(self): _build.run(self) here = os.getcwd() os.chdir('docs') print "building docs" exclude = ['.svn', 'images', 'html'] files = [f for f in os.listdir('.') if f not in exclude] files = [f for f in files if not f.endswith('~')] files = [f for f in files if '#' not in f] files = [f for f in files if not f.startswith('.')] print "source doc files:", ', '.join(files) if os.path.exists('html'): print "found html directory, removing it" os.system('rm -fr html') if os.path.exists('html'): raise RuntimeError , "failed to remove docs/html" os.mkdir('html') data_tuple = ('html', []) data_files.append(data_tuple) for srcfile in files: print "building", srcfile htmlfile = 'html/%s.html' % srcfile os.system('rst2html %s %s' % (srcfile, htmlfile)) data_tuple[1].append('docs/%s' % htmlfile) os.chdir(here) if build_apidoc: data_tuple = ('html/api', []) data_files.append(data_tuple) os.system('epydoc -o docs/html/api paella') for root, dirs, files in os.walk('docs/html/api'): for afile in files: bfile = os.path.join(root, afile) data_tuple[1].append(bfile)
def run(self): build.run(self) path = path_join(dirname(__file__), 'faulthandler.pth') dest = path_join(self.build_lib, basename(path)) self.copy_file(path, dest)
def run(self): self.buildNids() build.run(self)
def run(self): if not IS_LIGHT_BUILD: self.run_command("build_assets") BuildCommand.run(self)
def run(self): build.run(self) self.run_command('web_build')
def run(self): if platform.system() == 'Darwin': os.system("cp -f mercuryapi_osx.patch mercuryapi.patch") os.system("make mercuryapi") build.run(self)
def run(self): self.execute(_build_vex, (), msg="Building libVEX") self.execute(_build_pyvex, (), msg="Building libpyvex") self.execute(_shuffle_files, (), msg="Copying libraries and headers") self.execute(_build_ffi, (), msg="Creating CFFI defs file") _build.run(self)
def run(self): build_trans(self) if not sys.platform == 'win32': build_man(self) build_intl(self) _build.run(self)
def run(self): build.run(self) self.run_command('build_man')
def run(self): global lua_system_path lua_system_path = self.lua_system_path build.run(self)
def run(self): old_build.run(self)
def run(self): _build.run(self)
def run(self): self.execute(_configure_z3, (), msg="Configuring Z3") self.execute(_build_z3, (), msg="Building Z3") self.execute(_copy_bins, (), msg="Copying binaries") _build.run(self)
def run(self): do_build_stuff() build.run(self)
def run(self): self.run_command('build_clib') build.run(self)
def run(self): """Run all sub-commands""" _build.run(self)
def run(self): BuildCommand.run(self) if not IS_LIGHT_BUILD: self.run_command('build_js')
def run(self): update_version_py() # unless we update this, the build command will keep using the old # version self.distribution.metadata.version = get_version() return _build.run(self)
def run(self): BuildCommand.run(self) if not IS_LIGHT_BUILD: self.run_command('build_assets') self.run_command('build_integration_docs')
def run(self): dist = self.distribution ext_modules = dist.ext_modules if ext_modules: dist.ext_modules[:] = self.cythonize(ext_modules) _build.run(self)
def run(self): if getConfig("NLS_SUPPORT") and 0 == os.system("which intltool-merge"): build.run(self) self.build_po()
def run(self): check_manifest() self.build_message_files() build.run(self)
def run(self): self.run_command('build_ext') build.run(self)
def run(self): build.run(self) for s, d in self._get_dlls(): self.copy_file(s, d)
def run(self): if 'bdist_nsis' not in sys.argv: # somebody shoot me please log.info('generating scripts/picard from scripts/picard.in') generate_file('scripts/picard.in', 'scripts/picard', {'localedir': self.localedir, 'autoupdate': not self.disable_autoupdate}) build.run(self)
def run(self): prepare_v8() _build.run(self)
def run(self): self.run_command('pyrcc') _build.run(self)
def run(self): if not IS_LIGHT_BUILD: self.run_command("build_integration_docs") self.run_command("build_assets") self.run_command("build_js_sdk_registry") BuildCommand.run(self)
def run(self): """Check MANIFEST before building.""" check_manifest() build.run(self)