-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
96 lines (78 loc) · 2.28 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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
from setuptools import setup, find_packages
from setuptools.command.test import test as TestCommand
import sys
import os
version = __import__('beehve').__version__
def strip_comments(l):
return l.split('#', 1)[0].strip()
def _pip_requirement(req):
if req.startswith('-r '):
_, path = req.split()
return reqs(*path.split('/'))
return [req]
def _reqs(*f):
return [
_pip_requirement(r) for r in (
strip_comments(l) for l in open(
os.path.join(os.getcwd(), 'requirements', *f)).readlines()
) if r]
def reqs(*f):
return [req for subreq in _reqs(*f) for req in subreq]
install_requires = []
install_requires = reqs('default.txt')
# -*- Extras -*-
extra = {}
def extras(*p):
return reqs('extras', *p)
features = set([
'postgres',
])
extras_require = dict((x, extras(x + '.txt')) for x in features)
extra['extras_require'] = extras_require
# -*- %%% -*-
class Tox(TestCommand):
def finalize_options(self):
TestCommand.finalize_options(self)
self.test_args = []
self.test_suite = True
def run_tests(self):
#import here, cause outside the eggs aren't loaded
import tox
errno = tox.cmdline(self.test_args)
sys.exit(errno)
setup(
name="beehve",
version=version,
url='http://github.com/powellc/beehve',
license='BSD',
platforms=['OS Independent'],
description="An beehve for django applications.",
author="Colin Powell",
author_email='colin.powell@gmail.com',
packages=find_packages(),
install_requires=install_requires,
include_package_data=True,
zip_safe=False,
tests_require=['tox'],
cmdclass={'test': Tox},
classifiers=[
'Development Status :: 4 - Beta',
'Framework :: Django',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Topic :: Internet :: WWW/HTTP',
'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
],
package_dir={
'beehve': 'beehve',
'beehve/templates': 'beehve/templates',
},
entry_points={
'console_scripts': [
'beehve = beehve.manage_beehve:main',
],
},
**extra
)