Python distutils.util.execute() Examples
The following are 30
code examples of distutils.util.execute().
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
You may also want to check out all available functions/classes of the module
distutils.util
, or try the search function
.
Example #1
Source File: setup.py From bootloader_instrumentation_suite with MIT License | 6 votes |
def run(self): if not (os.system('pip show capstone') == 0): os.system('pip install git+https://github.com/aquynh/capstone@next#subdirectory=bindings/python') build_py.run(self) # class PkgInstall(install_lib): # def run(self): # install_lib.run(self) # pth = os.path.dirname(os.path.realpath(__file__)) # img = os.path.join(pth, 'fiddle/hw_info/bbxm/beagleboard-xm-orig.img') # os.system("cp %s %s" % (img, os.path.join(self.install_base,"fiddle/hw_info/bbxm/"))) # I'm guessing the following block of commented-out code is not a kosher # way of installing capstone... # execute(os.system, ('git clone https://github.com/aquynh/capstone',)) # execute(os.system, ('cd capstone; git checkout -b next',)) # os.environ['PREFIX'] = sys.prefix # execute(os.system, ('cd capstone; ./make.sh',)) # execute(os.system, ('cd capstone; ./make.sh install',))
Example #2
Source File: ccompiler.py From RevitBatchProcessor with GNU General Public License v3.0 | 5 votes |
def execute(self, func, args, msg=None, level=1): execute(func, args, msg, self.dry_run)
Example #3
Source File: cmd.py From android_universal with MIT License | 5 votes |
def make_file(self, infiles, outfile, func, args, exec_msg=None, skip_msg=None, level=1): """Special case of 'execute()' for operations that process one or more input files and generate one output file. Works just like 'execute()', except the operation is skipped and a different message printed if 'outfile' already exists and is newer than all files listed in 'infiles'. If the command defined 'self.force', and it is true, then the command is unconditionally run -- does no timestamp checks. """ if skip_msg is None: skip_msg = "skipping %s (inputs unchanged)" % outfile # Allow 'infiles' to be a single string if isinstance(infiles, str): infiles = (infiles,) elif not isinstance(infiles, (list, tuple)): raise TypeError( "'infiles' must be a string, or a list or tuple of strings") if exec_msg is None: exec_msg = "generating %s from %s" % (outfile, ', '.join(infiles)) # If 'outfile' must be regenerated (either because it doesn't # exist, is out-of-date, or the 'force' flag is true) then # perform the action that presumably regenerates it if self.force or dep_util.newer_group(infiles, outfile): self.execute(func, args, exec_msg, level) # Otherwise, print the "skip" message else: log.debug(skip_msg)
Example #4
Source File: cmd.py From unity-python with MIT License | 5 votes |
def make_file(self, infiles, outfile, func, args, exec_msg=None, skip_msg=None, level=1): """Special case of 'execute()' for operations that process one or more input files and generate one output file. Works just like 'execute()', except the operation is skipped and a different message printed if 'outfile' already exists and is newer than all files listed in 'infiles'. If the command defined 'self.force', and it is true, then the command is unconditionally run -- does no timestamp checks. """ if skip_msg is None: skip_msg = "skipping %s (inputs unchanged)" % outfile # Allow 'infiles' to be a single string if isinstance(infiles, str): infiles = (infiles,) elif not isinstance(infiles, (list, tuple)): raise TypeError, \ "'infiles' must be a string, or a list or tuple of strings" if exec_msg is None: exec_msg = "generating %s from %s" % \ (outfile, ', '.join(infiles)) # If 'outfile' must be regenerated (either because it doesn't # exist, is out-of-date, or the 'force' flag is true) then # perform the action that presumably regenerates it if self.force or dep_util.newer_group(infiles, outfile): self.execute(func, args, exec_msg, level) # Otherwise, print the "skip" message else: log.debug(skip_msg) # XXX 'install_misc' class not currently used -- it was the base class for # both 'install_scripts' and 'install_data', but they outgrew it. It might # still be useful for 'install_headers', though, so I'm keeping it around # for the time being.
Example #5
Source File: cmd.py From unity-python with MIT License | 5 votes |
def execute(self, func, args, msg=None, level=1): util.execute(func, args, msg, dry_run=self.dry_run)
Example #6
Source File: ccompiler.py From PokemonGo-DesktopMap with MIT License | 5 votes |
def execute(self, func, args, msg=None, level=1): execute(func, args, msg, self.dry_run)
Example #7
Source File: ccompiler.py From unity-python with MIT License | 5 votes |
def execute(self, func, args, msg=None, level=1): execute(func, args, msg, self.dry_run)
Example #8
Source File: cmd.py From canape with GNU General Public License v3.0 | 5 votes |
def make_file(self, infiles, outfile, func, args, exec_msg=None, skip_msg=None, level=1): """Special case of 'execute()' for operations that process one or more input files and generate one output file. Works just like 'execute()', except the operation is skipped and a different message printed if 'outfile' already exists and is newer than all files listed in 'infiles'. If the command defined 'self.force', and it is true, then the command is unconditionally run -- does no timestamp checks. """ if skip_msg is None: skip_msg = "skipping %s (inputs unchanged)" % outfile # Allow 'infiles' to be a single string if isinstance(infiles, str): infiles = (infiles,) elif not isinstance(infiles, (list, tuple)): raise TypeError, \ "'infiles' must be a string, or a list or tuple of strings" if exec_msg is None: exec_msg = "generating %s from %s" % \ (outfile, ', '.join(infiles)) # If 'outfile' must be regenerated (either because it doesn't # exist, is out-of-date, or the 'force' flag is true) then # perform the action that presumably regenerates it if self.force or dep_util.newer_group(infiles, outfile): self.execute(func, args, exec_msg, level) # Otherwise, print the "skip" message else: log.debug(skip_msg) # XXX 'install_misc' class not currently used -- it was the base class for # both 'install_scripts' and 'install_data', but they outgrew it. It might # still be useful for 'install_headers', though, so I'm keeping it around # for the time being.
Example #9
Source File: ccompiler.py From canape with GNU General Public License v3.0 | 5 votes |
def execute(self, func, args, msg=None, level=1): execute(func, args, msg, self.dry_run)
Example #10
Source File: cmd.py From CTFCrackTools with GNU General Public License v3.0 | 5 votes |
def execute(self, func, args, msg=None, level=1): util.execute(func, args, msg, dry_run=self.dry_run)
Example #11
Source File: cmd.py From CTFCrackTools with GNU General Public License v3.0 | 5 votes |
def make_file(self, infiles, outfile, func, args, exec_msg=None, skip_msg=None, level=1): """Special case of 'execute()' for operations that process one or more input files and generate one output file. Works just like 'execute()', except the operation is skipped and a different message printed if 'outfile' already exists and is newer than all files listed in 'infiles'. If the command defined 'self.force', and it is true, then the command is unconditionally run -- does no timestamp checks. """ if skip_msg is None: skip_msg = "skipping %s (inputs unchanged)" % outfile # Allow 'infiles' to be a single string if isinstance(infiles, str): infiles = (infiles,) elif not isinstance(infiles, (list, tuple)): raise TypeError, \ "'infiles' must be a string, or a list or tuple of strings" if exec_msg is None: exec_msg = "generating %s from %s" % \ (outfile, ', '.join(infiles)) # If 'outfile' must be regenerated (either because it doesn't # exist, is out-of-date, or the 'force' flag is true) then # perform the action that presumably regenerates it if self.force or dep_util.newer_group(infiles, outfile): self.execute(func, args, exec_msg, level) # Otherwise, print the "skip" message else: log.debug(skip_msg) # XXX 'install_misc' class not currently used -- it was the base class for # both 'install_scripts' and 'install_data', but they outgrew it. It might # still be useful for 'install_headers', though, so I'm keeping it around # for the time being.
Example #12
Source File: ccompiler.py From CTFCrackTools with GNU General Public License v3.0 | 5 votes |
def execute(self, func, args, msg=None, level=1): execute(func, args, msg, self.dry_run)
Example #13
Source File: cmd.py From CTFCrackTools with GNU General Public License v3.0 | 5 votes |
def execute(self, func, args, msg=None, level=1): util.execute(func, args, msg, dry_run=self.dry_run)
Example #14
Source File: cmd.py From CTFCrackTools with GNU General Public License v3.0 | 5 votes |
def make_file(self, infiles, outfile, func, args, exec_msg=None, skip_msg=None, level=1): """Special case of 'execute()' for operations that process one or more input files and generate one output file. Works just like 'execute()', except the operation is skipped and a different message printed if 'outfile' already exists and is newer than all files listed in 'infiles'. If the command defined 'self.force', and it is true, then the command is unconditionally run -- does no timestamp checks. """ if skip_msg is None: skip_msg = "skipping %s (inputs unchanged)" % outfile # Allow 'infiles' to be a single string if isinstance(infiles, str): infiles = (infiles,) elif not isinstance(infiles, (list, tuple)): raise TypeError, \ "'infiles' must be a string, or a list or tuple of strings" if exec_msg is None: exec_msg = "generating %s from %s" % \ (outfile, ', '.join(infiles)) # If 'outfile' must be regenerated (either because it doesn't # exist, is out-of-date, or the 'force' flag is true) then # perform the action that presumably regenerates it if self.force or dep_util.newer_group(infiles, outfile): self.execute(func, args, exec_msg, level) # Otherwise, print the "skip" message else: log.debug(skip_msg) # XXX 'install_misc' class not currently used -- it was the base class for # both 'install_scripts' and 'install_data', but they outgrew it. It might # still be useful for 'install_headers', though, so I'm keeping it around # for the time being.
Example #15
Source File: cmd.py From canape with GNU General Public License v3.0 | 5 votes |
def execute(self, func, args, msg=None, level=1): util.execute(func, args, msg, dry_run=self.dry_run)
Example #16
Source File: cmd.py From PokemonGo-DesktopMap with MIT License | 5 votes |
def execute(self, func, args, msg=None, level=1): util.execute(func, args, msg, dry_run=self.dry_run)
Example #17
Source File: cmd.py From PokemonGo-DesktopMap with MIT License | 5 votes |
def make_file(self, infiles, outfile, func, args, exec_msg=None, skip_msg=None, level=1): """Special case of 'execute()' for operations that process one or more input files and generate one output file. Works just like 'execute()', except the operation is skipped and a different message printed if 'outfile' already exists and is newer than all files listed in 'infiles'. If the command defined 'self.force', and it is true, then the command is unconditionally run -- does no timestamp checks. """ if skip_msg is None: skip_msg = "skipping %s (inputs unchanged)" % outfile # Allow 'infiles' to be a single string if isinstance(infiles, str): infiles = (infiles,) elif not isinstance(infiles, (list, tuple)): raise TypeError, \ "'infiles' must be a string, or a list or tuple of strings" if exec_msg is None: exec_msg = "generating %s from %s" % \ (outfile, ', '.join(infiles)) # If 'outfile' must be regenerated (either because it doesn't # exist, is out-of-date, or the 'force' flag is true) then # perform the action that presumably regenerates it if self.force or dep_util.newer_group(infiles, outfile): self.execute(func, args, exec_msg, level) # Otherwise, print the "skip" message else: log.debug(skip_msg) # XXX 'install_misc' class not currently used -- it was the base class for # both 'install_scripts' and 'install_data', but they outgrew it. It might # still be useful for 'install_headers', though, so I'm keeping it around # for the time being.
Example #18
Source File: cmd.py From RevitBatchProcessor with GNU General Public License v3.0 | 5 votes |
def make_file(self, infiles, outfile, func, args, exec_msg=None, skip_msg=None, level=1): """Special case of 'execute()' for operations that process one or more input files and generate one output file. Works just like 'execute()', except the operation is skipped and a different message printed if 'outfile' already exists and is newer than all files listed in 'infiles'. If the command defined 'self.force', and it is true, then the command is unconditionally run -- does no timestamp checks. """ if skip_msg is None: skip_msg = "skipping %s (inputs unchanged)" % outfile # Allow 'infiles' to be a single string if isinstance(infiles, str): infiles = (infiles,) elif not isinstance(infiles, (list, tuple)): raise TypeError, \ "'infiles' must be a string, or a list or tuple of strings" if exec_msg is None: exec_msg = "generating %s from %s" % \ (outfile, ', '.join(infiles)) # If 'outfile' must be regenerated (either because it doesn't # exist, is out-of-date, or the 'force' flag is true) then # perform the action that presumably regenerates it if self.force or dep_util.newer_group(infiles, outfile): self.execute(func, args, exec_msg, level) # Otherwise, print the "skip" message else: log.debug(skip_msg) # XXX 'install_misc' class not currently used -- it was the base class for # both 'install_scripts' and 'install_data', but they outgrew it. It might # still be useful for 'install_headers', though, so I'm keeping it around # for the time being.
Example #19
Source File: cmd.py From RevitBatchProcessor with GNU General Public License v3.0 | 5 votes |
def execute(self, func, args, msg=None, level=1): util.execute(func, args, msg, dry_run=self.dry_run)
Example #20
Source File: cmd.py From CTFCrackTools-V2 with GNU General Public License v3.0 | 5 votes |
def make_file(self, infiles, outfile, func, args, exec_msg=None, skip_msg=None, level=1): """Special case of 'execute()' for operations that process one or more input files and generate one output file. Works just like 'execute()', except the operation is skipped and a different message printed if 'outfile' already exists and is newer than all files listed in 'infiles'. If the command defined 'self.force', and it is true, then the command is unconditionally run -- does no timestamp checks. """ if skip_msg is None: skip_msg = "skipping %s (inputs unchanged)" % outfile # Allow 'infiles' to be a single string if isinstance(infiles, str): infiles = (infiles,) elif not isinstance(infiles, (list, tuple)): raise TypeError, \ "'infiles' must be a string, or a list or tuple of strings" if exec_msg is None: exec_msg = "generating %s from %s" % \ (outfile, ', '.join(infiles)) # If 'outfile' must be regenerated (either because it doesn't # exist, is out-of-date, or the 'force' flag is true) then # perform the action that presumably regenerates it if self.force or dep_util.newer_group(infiles, outfile): self.execute(func, args, exec_msg, level) # Otherwise, print the "skip" message else: log.debug(skip_msg) # XXX 'install_misc' class not currently used -- it was the base class for # both 'install_scripts' and 'install_data', but they outgrew it. It might # still be useful for 'install_headers', though, so I'm keeping it around # for the time being.
Example #21
Source File: cmd.py From CTFCrackTools-V2 with GNU General Public License v3.0 | 5 votes |
def execute(self, func, args, msg=None, level=1): util.execute(func, args, msg, dry_run=self.dry_run)
Example #22
Source File: ccompiler.py From CTFCrackTools-V2 with GNU General Public License v3.0 | 5 votes |
def execute(self, func, args, msg=None, level=1): execute(func, args, msg, self.dry_run)
Example #23
Source File: cmd.py From CTFCrackTools-V2 with GNU General Public License v3.0 | 5 votes |
def make_file(self, infiles, outfile, func, args, exec_msg=None, skip_msg=None, level=1): """Special case of 'execute()' for operations that process one or more input files and generate one output file. Works just like 'execute()', except the operation is skipped and a different message printed if 'outfile' already exists and is newer than all files listed in 'infiles'. If the command defined 'self.force', and it is true, then the command is unconditionally run -- does no timestamp checks. """ if skip_msg is None: skip_msg = "skipping %s (inputs unchanged)" % outfile # Allow 'infiles' to be a single string if isinstance(infiles, str): infiles = (infiles,) elif not isinstance(infiles, (list, tuple)): raise TypeError, \ "'infiles' must be a string, or a list or tuple of strings" if exec_msg is None: exec_msg = "generating %s from %s" % \ (outfile, ', '.join(infiles)) # If 'outfile' must be regenerated (either because it doesn't # exist, is out-of-date, or the 'force' flag is true) then # perform the action that presumably regenerates it if self.force or dep_util.newer_group(infiles, outfile): self.execute(func, args, exec_msg, level) # Otherwise, print the "skip" message else: log.debug(skip_msg) # XXX 'install_misc' class not currently used -- it was the base class for # both 'install_scripts' and 'install_data', but they outgrew it. It might # still be useful for 'install_headers', though, so I'm keeping it around # for the time being.
Example #24
Source File: cmd.py From CTFCrackTools-V2 with GNU General Public License v3.0 | 5 votes |
def execute(self, func, args, msg=None, level=1): util.execute(func, args, msg, dry_run=self.dry_run)
Example #25
Source File: ccompiler.py From medicare-demo with Apache License 2.0 | 5 votes |
def execute (self, func, args, msg=None, level=1): execute(func, args, msg, self.dry_run)
Example #26
Source File: cmd.py From medicare-demo with Apache License 2.0 | 5 votes |
def execute (self, func, args, msg=None, level=1): util.execute(func, args, msg, dry_run=self.dry_run)
Example #27
Source File: ccompiler.py From Project-New-Reign---Nemesis-Main with GNU General Public License v3.0 | 5 votes |
def execute(self, func, args, msg=None, level=1): execute(func, args, msg, self.dry_run)
Example #28
Source File: cmd.py From Project-New-Reign---Nemesis-Main with GNU General Public License v3.0 | 5 votes |
def make_file(self, infiles, outfile, func, args, exec_msg=None, skip_msg=None, level=1): """Special case of 'execute()' for operations that process one or more input files and generate one output file. Works just like 'execute()', except the operation is skipped and a different message printed if 'outfile' already exists and is newer than all files listed in 'infiles'. If the command defined 'self.force', and it is true, then the command is unconditionally run -- does no timestamp checks. """ if skip_msg is None: skip_msg = "skipping %s (inputs unchanged)" % outfile # Allow 'infiles' to be a single string if isinstance(infiles, str): infiles = (infiles,) elif not isinstance(infiles, (list, tuple)): raise TypeError( "'infiles' must be a string, or a list or tuple of strings") if exec_msg is None: exec_msg = "generating %s from %s" % (outfile, ', '.join(infiles)) # If 'outfile' must be regenerated (either because it doesn't # exist, is out-of-date, or the 'force' flag is true) then # perform the action that presumably regenerates it if self.force or dep_util.newer_group(infiles, outfile): self.execute(func, args, exec_msg, level) # Otherwise, print the "skip" message else: log.debug(skip_msg) # XXX 'install_misc' class not currently used -- it was the base class for # both 'install_scripts' and 'install_data', but they outgrew it. It might # still be useful for 'install_headers', though, so I'm keeping it around # for the time being.
Example #29
Source File: cmd.py From Project-New-Reign---Nemesis-Main with GNU General Public License v3.0 | 5 votes |
def execute(self, func, args, msg=None, level=1): util.execute(func, args, msg, dry_run=self.dry_run)
Example #30
Source File: ccompiler.py From Splunking-Crime with GNU Affero General Public License v3.0 | 5 votes |
def execute(self, func, args, msg=None, level=1): execute(func, args, msg, self.dry_run)