forked from devcamcar/python-novaclient
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
69 lines (60 loc) · 2.16 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
#! /usr/bin/python
from setuptools import setup
from com.rackspace.cloud.servers.api.client import version
VERSION=version.get_version()
DESCRIPTION='Rackspace Cloud Servers Python API',
LONG_DESCRIPTION="""
"""
CLASSIFIERS = filter(None, map(str.strip,
"""
Intended Audience :: Developers
License :: OSI Approved :: MIT License
Programming Language :: Python
Topic :: Software Development :: Libraries :: Python Modules
""".splitlines()))
# Only need simplejson if < Python 2.6. 2.6 +, it's included as json
# and the import will be handled properly by our jsonwrapper
import sys
if sys.version_info < (2, 6):
REQUIRES = "simplejson"
else:
REQUIRES = ""
#
## Hack to overcome deficiency in setuptools -- inability to exclude specific
## files...
##
## modify build process to exclude specific files from the build
##
## With credit to:
##
## http://xylld.wordpress.com/2009/09/24/python-setuptools-workaround-for-ignore-specific-files/
#
from distutils.command.build_py import build_py
find_package_modules_old = build_py.find_package_modules
def find_package_modules(self, package, package_dir):
excludes = [
('com.rackspace.cloud.servers.api.client','tests','account.py'),
]
modules = find_package_modules_old(self, package, package_dir)
for pkg, module, fname in excludes:
if (pkg, module, fname) in modules:
modules.remove((pkg,module,fname))
print "excluding pkg = %s, module = %s, fname = %s" % \
(pkg,module,fname)
return modules
build_py.find_package_modules = find_package_modules
setup(
name='com.rackspace.cloud.servers.api.client',
version=VERSION,
description=DESCRIPTION,
long_description=LONG_DESCRIPTION,
author='Steve Steiner and Mike Mayo',
author_email = "ssteinerX@gmail.com and mike.mayo@rackspace.com",
url='http://www.rackspacecloud.com/',
license="MIT License",
packages=['com.rackspace.cloud.servers.api.client', 'com.rackspace.cloud.servers.api.client.shared', 'com.rackspace.cloud.servers.api.client.tests'],
test_suite = 'nose.collector',
keywords="cloud cloudservers rackspace on-demand",
zip_safe=False,
install_requires=REQUIRES
)