forked from espeed/bulbs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
97 lines (86 loc) · 3.12 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
"""
Bulbs
-----
Bulbs is a Python persistence framework for graph databases that
connects to Neo4j Server, Rexster, OrientDB, Lightsocket, and more.
"""
import sys
from setuptools import Command, setup, find_packages
class run_audit(Command):
"""Audits source code using PyFlakes for following issues:
- Names which are used but not defined or used before they are defined.
- Names which are redefined without having been used.
"""
description = "Audit source code with PyFlakes"
user_options = []
def initialize_options(self):
all = None
def finalize_options(self):
pass
def run(self):
import os, sys
try:
import pyflakes.scripts.pyflakes as flakes
except ImportError:
print("Audit requires PyFlakes installed in your system.")
sys.exit(-1)
dirs = ['bulbs', 'tests']
# Add example directories
#for dir in ['blog',]:
# dirs.append(os.path.join('examples', dir))
# TODO: Add test subdirectories
warns = 0
for dir in dirs:
for filename in os.listdir(dir):
if filename.endswith('.py') and filename != '__init__.py':
warns += flakes.checkPath(os.path.join(dir, filename))
if warns > 0:
print(("Audit finished with total %d warnings." % warns))
else:
print("No problems found in sourcecode.")
def run_tests():
import os, sys
sys.path.append(os.path.join(os.path.dirname(__file__), 'tests'))
from bulbs_tests import suite
return suite()
# Python 3
install_requires = ['distribute', 'httplib2>=0.7.2', 'pyyaml>=3.10', 'six', 'pytz']
if sys.version < '3':
install_requires.append('ujson>=1.15')
install_requires.append('python-dateutil==1.5')
else:
# argparse is in 3.2 but not 3.1
install_requires.append('argparse')
install_requires.append('python-dateutil>=2')
setup (
name = 'bulbs',
version = '0.3',
url = 'https://github.com/espeed/bulbs',
license = 'BSD',
author = 'James Thornton',
author_email = '[email protected]',
description = 'A Python persistence framework for graph databases that '
'connects to Neo4j Server, Rexster, OrientDB, Lightsocket.',
long_description = __doc__,
keywords = "graph database DB persistence framework rexster gremlin cypher neo4j orientdb",
packages = find_packages(),
include_package_data=True,
zip_safe=False,
platforms='any',
install_requires=install_requires,
classifiers = [
"Programming Language :: Python",
"Development Status :: 3 - Alpha",
"Environment :: Web Environment",
"Intended Audience :: Developers",
"License :: OSI Approved :: BSD License",
"Operating System :: OS Independent",
"Topic :: Database",
"Topic :: Database :: Front-Ends",
"Topic :: Internet :: WWW/HTTP",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: System :: Distributed Computing",
],
cmdclass={'audit': run_audit},
test_suite='__main__.run_tests'
)