예제 #1
0
# Build helper
if sys.argv[-1] == 'gl-build':
    from sh import pyinstaller
    import shutil
    import tarfile
    import platform

    rel = 'gl-v{0}-{1}-{2}'.format(VERSION,
                                   platform.system().lower(),
                                   platform.machine())

    print('running pyinstaller...')
    pyinstaller('gl.spec',
                clean=True,
                distpath=rel,
                _out=sys.stdout,
                _err=sys.stderr)
    print('success!! gl binary should be at {0}/gl'.format(rel))

    print('creating tar.gz file')
    shutil.copy('README.md', rel)
    shutil.copy('LICENSE.md', rel)

    with tarfile.open(rel + '.tar.gz', 'w:gz') as tar:
        tar.add(rel)
    print('success!! binary release at {0}'.format(rel + '.tar.gz'))

    sys.exit()

reqs = ['pygit2==0.23.0', 'sh==1.11', 'clint==0.3.6']
예제 #2
0
파일: setup.py 프로젝트: imoapps/gitless
VERSION = '0.8.2'


# Build helper
if sys.argv[-1] == 'gl-build':
  from sh import pyinstaller
  import shutil
  import tarfile
  import platform

  rel = 'gl-v{0}-{1}-{2}'.format(
      VERSION, platform.system().lower(), platform.machine())

  print('running pyinstaller...')
  pyinstaller(
      'gl.spec', clean=True, distpath=rel, _out=sys.stdout, _err=sys.stderr)
  print('success!! gl binary should be at {0}/gl'.format(rel))

  print('creating tar.gz file')
  shutil.copy('README.md', rel)
  shutil.copy('LICENSE.md', rel)
  
  with tarfile.open(rel + '.tar.gz', 'w:gz') as tar:
    tar.add(rel)
  print('success!! binary release at {0}'.format(rel + '.tar.gz'))

  sys.exit()


reqs = ['pygit2==0.23.0', 'sh==1.11', 'clint==0.3.6']
if sys.version_info < (2, 7) or (