setup.py 1.4 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 17 18
def list_resources(directory, destination_directory):
    return [(dir.replace(directory, destination_directory), [os.path.join(dir, file) for file in files]) for dir, subdirs, files in os.walk(directory)]

19
setup(name         = "blink",
20
      version      = get_version(),
21 22 23 24 25 26 27 28 29 30 31 32 33 34
      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'),
35
      data_files   = list_resources('resources', destination_directory='share/blink'),
36
      scripts      = ['bin/blink']
37 38
)