borg.exe.spec 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. # -*- mode: python -*-
  2. # this pyinstaller spec file is used to build borg binaries on posix platforms
  3. import os, sys
  4. basepath = '/vagrant/borg/borg'
  5. block_cipher = None
  6. a = Analysis([os.path.join(basepath, 'src/borg/__main__.py'), ],
  7. pathex=[basepath, ],
  8. binaries=[],
  9. datas=[
  10. ('../src/borg/paperkey.html', 'borg'),
  11. ],
  12. hiddenimports=['borg.platform.posix'],
  13. hookspath=[],
  14. runtime_hooks=[],
  15. excludes=[
  16. '_ssl', 'ssl',
  17. ],
  18. win_no_prefer_redirects=False,
  19. win_private_assemblies=False,
  20. cipher=block_cipher)
  21. if sys.platform == 'darwin':
  22. # do not bundle the osxfuse libraries, so we do not get a version
  23. # mismatch to the installed kernel driver of osxfuse.
  24. a.binaries = [b for b in a.binaries if 'libosxfuse' not in b[0]]
  25. pyz = PYZ(a.pure, a.zipped_data, cipher=block_cipher)
  26. exe = EXE(pyz,
  27. a.scripts,
  28. a.binaries,
  29. a.zipfiles,
  30. a.datas,
  31. name='borg.exe',
  32. debug=False,
  33. strip=False,
  34. upx=True,
  35. console=True )
  36. if False:
  37. # Enable this block to build a directory-based binary instead of
  38. # a packed single file. This allows to easily look at all included
  39. # files (e.g. without having to strace or halt the built binary
  40. # and introspect /tmp).
  41. coll = COLLECT(exe,
  42. a.binaries,
  43. a.zipfiles,
  44. a.datas,
  45. strip=False,
  46. upx=True,
  47. name='borg-dir')