~umang/indicator-stickynotes/trunk

« back to all changes in this revision

Viewing changes to setup.py

  • Committer: Umang Varma
  • Date: 2012-07-12 21:58:31 UTC
  • Revision ID: git-v1:160393546a6b2a2154d2e71bc583faa8b9d027c3
Install icon files correctly.

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
# indicator-stickynotes.  If not, see <http://www.gnu.org/licenses/>.
20
20
 
21
21
from distutils.core import setup
22
 
import glob
 
22
import glob, os
 
23
 
 
24
data_files = [('', ('COPYING', 'style.css', 'StickyNotes.glade')),
 
25
    ('/usr/share/applications', ('indicator-stickynotes.desktop',)),
 
26
    ('Icons', glob.glob("Icons/*.png"))]
 
27
 
 
28
icon_themes = ["hicolor", "ubuntu-mono-dark", "ubuntu-mono-light"]
 
29
for theme in icon_themes:
 
30
    data_files.extend([(os.path.join("/usr/share/icons/", theme,
 
31
        os.path.relpath(dir, "Icons/" + theme)), [os.path.join(dir, file)
 
32
        for file in files])
 
33
        for dir, subdirs, files in os.walk("Icons/" + theme) if files])
23
34
 
24
35
setup(name='indicator-stickynotes',
25
36
        version='0.1',
29
40
        url='https://www.launchpad.net/indicator-stickynotes/',
30
41
        packages=['stickynotes',],
31
42
        scripts=['indicator-stickynotes.py',],
32
 
        data_files=[('Icons', glob.glob("Icons/*.png")),
33
 
            ('/usr/share/icons/hicolor/48x48/apps/',
34
 
                ('Icons/48x48/indicator-stickynotes.png',)),
35
 
            ('/usr/share/icons/hicolor/256x256/apps/',
36
 
                ('Icons/256x256/indicator-stickynotes.png',)),
37
 
            ('/usr/share/applications/',
38
 
                ('indicator-stickynotes.desktop',)),
39
 
            ('', ('COPYING', 'style.css', 'StickyNotes.glade')),]
40
 
        )
 
43
        data_files=data_files)