setup.py 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. import os
  2. import sys
  3. from lvc.variables import (
  4. __version__
  5. )
  6. # platform-independent arguments for setup()
  7. setup_args = {
  8. 'name': 'librevideoconverter',
  9. 'description': 'A simple video converter for WebM, Ogg Theora and others',
  10. 'author': 'Jesus E.',
  11. 'author_email': 'heckyel@riseup.net',
  12. 'url': 'https://notabug.org/heckyel/librevideoconverter',
  13. 'license': 'GPL-3',
  14. 'version': __version__,
  15. 'packages': [
  16. 'lvc',
  17. 'lvc.osx',
  18. 'lvc.qtfaststart',
  19. 'lvc.resources',
  20. 'lvc.ui',
  21. 'lvc.widgets',
  22. 'lvc.widgets.gtk',
  23. 'lvc.widgets.osx',
  24. 'lvc.windows',
  25. ],
  26. 'package_data': {
  27. 'lvc.resources': [
  28. 'converters/*.py',
  29. 'images/*.*',
  30. ],
  31. },
  32. }
  33. if sys.platform.startswith("linux"):
  34. platform = 'linux'
  35. elif sys.platform.startswith("win32"):
  36. platform = 'windows'
  37. elif sys.platform.startswith("darwin"):
  38. platform = 'osx'
  39. else:
  40. sys.stderr.write("Unknown platform: %s" % sys.platform)
  41. root_dir = os.path.abspath(os.path.dirname(__file__))
  42. setup_dir = os.path.join(root_dir, 'setup-files', platform)
  43. script_vars = {
  44. 'VERSION': __version__,
  45. 'ROOT_DIR': root_dir,
  46. 'SETUP_DIR': setup_dir,
  47. 'SETUP_ARGS': setup_args,
  48. }
  49. execfile(os.path.join(setup_dir, 'setup.py'), script_vars)