setup.py 1.41 KB
Newer Older
1 2 3
#!/usr/bin/env python

from distutils.core import setup
4 5
from itertools import chain
import glob
6
import os
7
import re
8 9


10 11
def get_version():
    return re.search(r"""__version__\s+=\s+(?P<quote>['"])(?P<version>.+?)(?P=quote)""", open('blink/__init__.py').read()).group('version')
12 13

def find_packages(toplevel):
14
    return [directory.replace(os.path.sep, '.') for directory, subdirs, files in os.walk(toplevel) if '__init__.py' in files]
15 16

setup(name         = "blink",
17
      version      = get_version(),
18 19 20 21 22 23 24 25 26 27 28 29 30 31
      author       = "AG Projects",
      author_email = "support@ag-projects.com",
      url          = "http://icanblink.com",
      description  = "Blink Qt",
      long_description = "A state of the art, easy to use SIP client",
      platforms    = ["Platform Independent"],
      classifiers  = [
          "Development Status :: 4 - Beta",
          "Intended Audience :: End Users/Desktop",
          "License :: GNU General Public License 3 (GPLv3)",
          "Operating System :: OS Independent",
          "Programming Language :: Python"
      ],
      packages     = find_packages('blink'),
32
      data_files   = [('share/blink', glob.glob('resources/*.ui')),
33
                      ('share/blink/icons', list(chain(*(glob.glob('resources/icons/*.%s' % ext) for ext in ('png', 'svg', 'mng', 'ico'))))),
34
                      ('share/blink/sounds', glob.glob('resources/sounds/*.wav'))
35
      ],
36
      scripts      = ['bin/blink']
37 38
)