~doctormo/+junk/gtk-jig

« back to all changes in this revision

Viewing changes to setup.py

  • Committer: Martin Owens
  • Date: 2011-10-10 07:28:46 UTC
  • Revision ID: doctormo@gmail.com-20111010072846-ri2lewksld1ygy5c
Adding all files.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/env python
 
2
 
 
3
from distutils.core                 import setup
 
4
from fnmatch                        import fnmatch
 
5
 
 
6
import os
 
7
 
 
8
def listfiles(*dirs):
 
9
        dir, pattern = os.path.split(os.path.join(*dirs))
 
10
        return [os.path.join(dir, filename)
 
11
                for filename in os.listdir(os.path.abspath(dir))
 
12
                        if filename[0] != '.' and fnmatch(filename, pattern)]
 
13
 
 
14
# remove MANIFEST. distutils doesn't properly update it when the contents of directories change.
 
15
if os.path.exists('MANIFEST'): os.remove('MANIFEST')
 
16
 
 
17
setup(
 
18
                name             = 'gtk-jig',
 
19
                version          = '1.0',
 
20
                description      = 'Gtk Jigsaw wrapper arround xjig puzzle creator.',
 
21
                long_description = "Jigsaw creator using xjig and gtk.",
 
22
                author           = 'Martin Owens',
 
23
                author_email     = 'doctormo@gmail.com',
 
24
                platforms        = 'any',
 
25
                license          = 'GPLv2',
 
26
                scripts          = ['gtk-jig'],
 
27
                data_files       = [
 
28
                        ('share/gtkjig/',            listfiles( '', '*.glade' ) ),
 
29
                        ('share/gtkjig/',            listfiles( '', '*.png' ) ),
 
30
            ('/usr/share/applications/', [ 'gtk-jig.desktop' ] ),
 
31
            ('/usr/share/pixmaps/',      [ 'jigsaw.png' ] ),
 
32
                ],
 
33
        )
 
34