forked from mainecivichackday/wheresyourtrash
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
101 lines (82 loc) · 2.63 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
97
98
99
100
101
from setuptools import setup, find_packages
from setuptools.command.test import test as TestCommand
import sys
import os
version = __import__('wheresyourtrash').__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', 'mysql', 's3', 'memcached'])
extras_require = dict((x, extras(x + '.txt')) for x in features)
extra['extras_require'] = extras_require
# -*- %%% -*-
dep_links = [
]
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="wheresyourtrash",
version=version,
url='http://github.com/code4maine/wheresyourtrash',
license='BSD',
platforms=['OS Independent'],
description="A Django project for wheresyourtrash.com",
author="Colin Powell",
author_email='[email protected]',
packages=find_packages(),
install_requires=install_requires,
tests_require=reqs('test.txt'),
extras_require=dict((x, extras(x + '.txt')) for x in set([
'mysql', 'postgres', 's3', 'memcached'
])),
dependency_links=dep_links,
include_package_data=True,
zip_safe=False,
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={
'wheresyourtrash': 'wheresyourtrash',
'wheresyourtrash/templates': 'wheresyourtrash/templates',
'wheresyourtrash/requirements': 'wheresyourtrash/requirements',
},
entry_points={
'console_scripts': [
'wheresyourtrash = wheresyourtrash.manage_wheresyourtrash:main',
],
},
)