~frankban/lpsetup/lxcip-packaging

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#!/usr/bin/env python
# Copyright 2012 Canonical Ltd.  This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).

from distutils.core import setup
import os


project_name = 'lpsetup'

root_dir = os.path.dirname(__file__)
if root_dir:
    os.chdir(root_dir)

data_files = []
for dirpath, dirnames, filenames in os.walk(project_name):
    for i, dirname in enumerate(dirnames):
        if dirname.startswith('.'): del dirnames[i]
    if '__init__.py' in filenames:
        continue
    elif filenames:
        for f in filenames:
            data_files.append(os.path.join(dirpath[len(project_name)+1:], f))

project = __import__(project_name)
long_description = open(os.path.join(root_dir, 'README.rst')).read()

setup(
    name=project_name,
    version=project.get_version(),
    description=project.__doc__,
    long_description=long_description,
    author='Launchpad Developers',
    author_email='launchpad-dev@lists.launchpad.net',
    url='https://launchpad.net/lpsetup',
    scripts=['lp-setup'],
    packages=[
        'lpsetup',
        'lpsetup.subcommands',
        ],
    package_data={project_name: data_files},
    classifiers=[
        'Development Status :: 3 - Alpha',
        'Environment :: Console',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: GNU Affero General Public License v3',
        'Operating System :: POSIX :: Linux',
        'Programming Language :: Python',
        'Topic :: Utilities'
        ],

    )