-
Notifications
You must be signed in to change notification settings - Fork 9
/
setup.py
74 lines (58 loc) · 1.53 KB
/
setup.py
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
import os
from importlib import import_module
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
basedir = os.path.abspath(os.path.dirname(__file__) or '.')
README = os.path.join(basedir, 'README.rst')
# required data
package_name = 'txjuju'
NAME = package_name
SUMMARY = 'A twisted-based Juju client.'
AUTHOR = 'Canonical Landscape team'
EMAIL = '[email protected]'
PROJECT_URL = 'https://github.com/juju/txjuju'
LICENSE = 'LGPLv3'
DESCRIPTION = ''
if os.path.exists(README):
with open(README) as readme_file:
DESCRIPTION = readme_file.read()
# dymanically generated data
VERSION = import_module(package_name).__version__
# set up packages
exclude_dirs = [
'tests',
]
PACKAGES = []
for path, dirs, files in os.walk(package_name):
if '__init__.py' not in files:
continue
path = path.split(os.sep)
if path[-1] in exclude_dirs:
continue
PACKAGES.append('.'.join(path))
# dependencies
DEPS = [
'twisted',
'PyYAML',
]
TESTING_DEPS = [
'fixtures',
'testtools',
]
if __name__ == '__main__':
setup(name=NAME,
version=VERSION,
author=AUTHOR,
author_email=EMAIL,
url=PROJECT_URL,
license=LICENSE,
description=SUMMARY,
long_description=DESCRIPTION,
packages=PACKAGES,
# for distutils
requires=DEPS + TESTING_DEPS,
# for setuptools
install_requires=DEPS + TESTING_DEPS,
)