/setup.py

https://github.com/rcarmo/shelf · Python · 46 lines · 30 code · 7 blank · 9 comment · 0 complexity · cb1db6426e159e34085be0d140205426 MD5 · raw file

  1. #!/usr/bin/python
  2. """
  3. Script for building the example.
  4. Usage:
  5. python setup.py py2app
  6. """
  7. from distutils.core import setup
  8. import py2app
  9. from glob import glob
  10. version = "0.0.15" # update in Cache.py as well, for the User-Agent string
  11. plist = dict(
  12. CFBundleName="Shelf",
  13. NSMainNibFile="MainMenu",
  14. NSPrincipalClass='PyShelfApplication',
  15. CFBundleIdentifier="org.jerakeen.pyshelf", # historical
  16. CFBundleShortVersionString=version,
  17. CFBundleVersion=version,
  18. NSHumanReadableCopyright="Copyright 2008-2010 Tom Insam. Modifications by Rui Carmo.",
  19. NSAppleScriptEnabled=True,
  20. CFBundleURLTypes=[
  21. dict(
  22. CFBundleURLName='Shelf callback',
  23. CFBundleURLSchemes=['shelf'],
  24. )
  25. ],
  26. # sparkle appcast url, for auto-updates
  27. SUFeedURL="http://code.movieos.org/shelf/appcast/" # doesn't exist, but it's a thing at least.
  28. )
  29. # TODO: open Growl.framework.zip, move the resulting folder into the right place in dist, etc.
  30. setup(
  31. app=["main.py",],
  32. data_files= glob("resources/*.nib") + glob("resources/*.html") + glob("resources/*.gif") + glob("*.py") + glob("*/*.py") + glob("resources/*.css") + glob("resources/*.png"),
  33. options=dict(py2app=dict(
  34. plist=plist,
  35. iconfile="resources/Icon.icns",
  36. frameworks=glob("*.framework"),
  37. )),
  38. )