Skip to content
Newer
Older
100644 105 lines (84 sloc) 2.97 KB
9050881 Added setup.py, package dir for easier installation.
Daniel Lundin authored Dec 22, 2009
1 #!/usr/bin/env python
2 # -*- coding: utf-8 -*-
3 #
4
6b10c22 @thobbs Initial documentation addition.
thobbs authored Sep 10, 2010
5 import sys
6 import os
7
8 try:
9 import subprocess
10 has_subprocess = True
11 except:
12 has_subprocess = False
13
14 from ez_setup import use_setuptools
15 use_setuptools()
16 from setuptools import setup
17 from distutils.cmd import Command
18
a13342a @thobbs Make the version include the Cassandra version
thobbs authored Oct 18, 2010
19 __version_info__ = (0, 7, 'a', 1)
7c48b42 @vomjom setup.py no longer breaks without thrift and now requires it on install
vomjom authored Mar 3, 2010
20 __version__ = '.'.join([str(v) for v in __version_info__])
21
6b10c22 @thobbs Initial documentation addition.
thobbs authored Sep 10, 2010
22 long_description = """pycassa is a Cassandra library with the following features:
9050881 Added setup.py, package dir for easier installation.
Daniel Lundin authored Dec 22, 2009
23
24 1. Auto-failover single or thread-local connections
25 2. A simplified version of the thrift interface
26 3. A method to map an existing class to a Cassandra ColumnFamily.
27 4. Support for SuperColumns
28 """
29
6b10c22 @thobbs Initial documentation addition.
thobbs authored Sep 10, 2010
30 class doc(Command):
31
32 description = "generate or test documentation"
33
34 user_options = [("test", "t",
35 "run doctests instead of generating documentation")]
36
37 boolean_options = ["test"]
38
39 def initialize_options(self):
40 self.test = False
41
42 def finalize_options(self):
43 pass
44
45 def run(self):
46 if self.test:
47 path = "doc/_build/doctest"
48 mode = "doctest"
49 else:
50 path = "doc/_build/%s" % __version__
51 mode = "html"
52
53 try:
54 os.makedirs(path)
55 except:
56 pass
57
58 if has_subprocess:
59 status = subprocess.call(["sphinx-build", "-b", mode, "doc", path])
60
61 if status:
62 raise RuntimeError("documentation step '%s' failed" % mode)
63
64 print ""
65 print "Documentation step '%s' performed, results here:" % mode
66 print " %s/" % path
67 else:
68 print """
69 `setup.py doc` is not supported for this version of Python.
70
71 Please ask in the user forums for help.
72 """
73
1ab10b6 @vomjom add optional setup.py flag to install cassandra package
vomjom authored Dec 22, 2009
74
9050881 Added setup.py, package dir for easier installation.
Daniel Lundin authored Dec 22, 2009
75 setup(
1015632 @thobbs Reverse accidental modifications to setup.py
thobbs authored Oct 28, 2010
76 name = 'pycassa',
9050881 Added setup.py, package dir for easier installation.
Daniel Lundin authored Dec 22, 2009
77 version = __version__,
78 author = 'Jonathan Hseu',
0f9dd91 @thobbs Start moving to the new naming scheme
thobbs authored Oct 15, 2010
79 author_email = 'vomjom AT vomjom.net',
80 maintainer = 'Tyler Hobbs',
81 maintainer_email = 'pycassa.maintainer@gmail.com',
82 description = 'Python client library for Apache Cassandra',
6b10c22 @thobbs Initial documentation addition.
thobbs authored Sep 10, 2010
83 long_description = long_description,
5c29048 @thobbs Version bump to 0.5.0, minor README add.
thobbs authored Sep 8, 2010
84 url = 'http://github.com/pycassa/pycassa',
0f9dd91 @thobbs Start moving to the new naming scheme
thobbs authored Oct 15, 2010
85 download_url = 'http://github.com/downloads/pycassa/pycassa/pycassa-0.5.1.tar.gz',
9050881 Added setup.py, package dir for easier installation.
Daniel Lundin authored Dec 22, 2009
86 keywords = 'cassandra client db distributed thrift',
0bd89f0 @thobbs Include logging package in setup
thobbs authored Oct 26, 2010
87 packages = ['pycassa', 'pycassa.cassandra', 'pycassa.logging'],
0f9dd91 @thobbs Start moving to the new naming scheme
thobbs authored Oct 15, 2010
88 py_modules = ['ez_setup'],
0bd89f0 @thobbs Include logging package in setup
thobbs authored Oct 26, 2010
89 requires = ['thrift05'],
7293991 @eevans a simple interactive shell
eevans authored Jun 1, 2010
90 scripts=['pycassaShell'],
0bd89f0 @thobbs Include logging package in setup
thobbs authored Oct 26, 2010
91 cmdclass={"doc": doc},
92 classifiers=[
93 'Development Status :: 5 - Production/Stable',
94 'Intended Audience :: Developers',
95 'License :: OSI Approved :: MIT License',
96 'Natural Language :: English',
97 'Operating System :: OS Independent',
98 'Programming Language :: Python :: 2.4',
99 'Programming Language :: Python :: 2.5',
100 'Programming Language :: Python :: 2.6',
101 'Programming Language :: Python :: 2.7',
102 'Topic :: Software Development :: Libraries :: Python Modules'
103 ]
9050881 Added setup.py, package dir for easier installation.
Daniel Lundin authored Dec 22, 2009
104 )
Something went wrong with that request. Please try again.