-
Notifications
You must be signed in to change notification settings - Fork 1
/
setup.py
60 lines (49 loc) · 1.57 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
from setuptools import setup, find_packages
from voom import __version__
import glob
import os
import sys
README = "README.md"
base = os.path.dirname(__file__)
local = lambda x: os.path.join(base, x)
def read(fname):
try:
return open(local(fname)).read()
except:
return "Not available"
def hydrate_examples():
examples = {}
for f in glob.glob(local('examples/*')) + glob.glob(local('tests/*')) + glob.glob(local('tests/*/*')):
if os.path.isdir(f):
continue
examples[os.path.basename(f)] = "\n ".join(read(f).split("\n"))
#print examples.keys()
readme = read(README + ".in") % examples
with open(local(README), "w") as f:
f.write(readme)
try:
hydrate_examples()
except:
pass
if "nosetests" in sys.argv or "test" in sys.argv:
TEST_REQS = ['nose>=1.0', 'coverage', 'nosexcover', 'mock']
else:
TEST_REQS = []
setup(
name="voom",
version=__version__,
author="Nino Walker",
author_email="[email protected]",
description=("A python message bus that you can put 4 million volts through."),
url='https://github.com/ninowalker/voom',
license="BSD",
packages=find_packages(exclude=['tests']),
long_description=read(README),
setup_requires=['pika', 'protobuf', 'protobuf_to_dict>=0.0.6'] + TEST_REQS,
dependency_links=['http://github.com/Livefyre/protobuf-to-dict/tarball/master#egg=protobuf_to_dict-0.0.6'],
test_suite='nose.collector',
classifiers=[
"License :: OSI Approved :: BSD License",
],
#entry_points = {'console_scripts': ['']}
)