コード例 #1
0
ファイル: __init__.py プロジェクト: guilhermebr/ppm
def main():
    arguments = docopt(doc, version='Python Package Manager 0.1')
    if arguments['install']:
        if arguments['<package>']:
            install(arguments['<package>'])
        else:
            #find requirements.txt
            #find package.json
            #load dependence list
            #call install for all deps
            pass
    elif arguments['search']:
        if arguments['<package>']:
            search(arguments['<package>'])

    return 1
コード例 #2
0
 def run(self):
     root_dir = os.path.abspath(self.install_lib)
     prefix = os.path.join(root_dir, 'petsc')
     #
     ctx = context().enter()
     try:
         config(prefix, self.dry_run)
         build(self.dry_run)
         install(self.dry_run)
     finally:
         ctx.exit()
     #
     self.outputs = []
     for dirpath, _, filenames in os.walk(prefix):
         for fn in filenames:
             self.outputs.append(os.path.join(dirpath, fn))
     #
     _install.run(self)
コード例 #3
0
ファイル: setup.py プロジェクト: erdc-cm/petsc-dev
 def run(self):
     root_dir = self.install_platlib
     dest_dir = os.path.join(root_dir, 'petsc')
     bdist_base = self.get_finalized_command('bdist').bdist_base
     if dest_dir.startswith(bdist_base):
         prefix = dest_dir[len(bdist_base)+1:]
         prefix = prefix[prefix.index(os.path.sep):]
     else:
         prefix = dest_dir
     dest_dir = os.path.abspath(dest_dir)
     prefix   = os.path.abspath(prefix)
     #
     _install.run(self)
     ctx = context().enter()
     try:
         install(dest_dir, prefix, self.dry_run)
     finally:
         ctx.exit()
コード例 #4
0
 def run(self):
     root_dir = self.install_platlib
     dest_dir = os.path.join(root_dir, 'petsc')
     bdist_base = self.get_finalized_command('bdist').bdist_base
     if dest_dir.startswith(bdist_base):
         prefix = dest_dir[len(bdist_base) + 1:]
         prefix = prefix[prefix.index(os.path.sep):]
     else:
         prefix = dest_dir
     dest_dir = os.path.abspath(dest_dir)
     prefix = os.path.abspath(prefix)
     #
     _install.run(self)
     ctx = context().enter()
     try:
         install(dest_dir, prefix, self.dry_run)
     finally:
         ctx.exit()