setup.py 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. #!/usr/bin/env python2
  2. #
  3. # Fluxstyle is a graphical style manager built in python
  4. # using pygtk and glade. Fluxstyle is for the fluxbox window
  5. # manager. Orignal version written by Michael Rice. Many special
  6. # thanks to Zan a.k.a. Lauri Peltonen for GUI Improvements & Bug Stomping.
  7. from __future__ import print_function
  8. from distutils.core import setup
  9. import distutils.fancy_getopt
  10. import sys
  11. DATADIR = "/usr/share"
  12. BINDIR = "/usr/bin"
  13. def chk_install():
  14. """try to pull in gtk crap to make sure deps are on box before install"""
  15. ver = sys.version[:5]
  16. try:
  17. import gtk
  18. except:
  19. print("You seem to be missing gtk bindings for python")
  20. print("Please install them before you install fluxstyle")
  21. print("http://pygtk.org/")
  22. raise SystemExit
  23. try:
  24. import gtk.glade
  25. except:
  26. print("You need to install libglade2")
  27. raise SystemExit
  28. if gtk.pygtk_version < (2, 3, 90):
  29. print("PyGtk 2.3.90 or later required for this program")
  30. print("It is recommended that you get pygtk 2.6 or newer.")
  31. raise SystemExit
  32. def main():
  33. chk_install()
  34. setup(
  35. name='fluxstyle',
  36. version='1.2',
  37. description='description... bla...',
  38. author='Michael Rice',
  39. author_email='errr@errr-online.com',
  40. url='https://github.com/michaelrice/fluxStyle/',
  41. packages=['fluxstyle'],
  42. data_files=[
  43. (
  44. DATADIR + '/fluxstyle/images', [
  45. 'images/fluxmetal.png',
  46. 'images/mini-fluxbox6.png',
  47. 'images/none.jpg'
  48. ]
  49. ),
  50. (DATADIR + '/fluxstyle/glade', ['images/main.glade']),
  51. (BINDIR, ['fluxstyle_gui']),
  52. (DATADIR + '/fluxstyle/docs',
  53. ['docs/README', 'docs/LICENSE', 'docs/Changelog'])
  54. ]
  55. )
  56. if __name__ == "__main__":
  57. main()