-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsetup.py
More file actions
70 lines (60 loc) · 1.81 KB
/
setup.py
File metadata and controls
70 lines (60 loc) · 1.81 KB
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
# -*- coding: utf-8 *-*
import os
import sys
import subprocess
try:
from setuptools import setup
except ImportError:
from distribute_setup import use_setuptools
use_setuptools()
from setuptools import setup
from distutils.cmd import Command
version = "1.2.+"
class doc(Command):
description = "generate documentation"
user_options = []
def initialize_options(self):
pass
def finalize_options(self):
pass
def run(self):
path = "doc/build/%s" % version
try:
os.makedirs(path)
except:
pass
status = subprocess.call(["sphinx-build", "-E", "-b", "html",
"doc", path])
if status:
raise RuntimeError("documentation step '%s' failed" % ("html",))
sys.stdout.write("\nDocumentation step '%s' performed, results here:\n"
" %s/\n" % ("html", path))
f = open("README.rst")
try:
try:
readme_content = f.read()
except:
readme_content = ""
finally:
f.close()
setup(
name="pymongolab",
version=version,
description="PyMongoLab is a client library for MongoLab REST API.",
long_description=readme_content,
author=u"Jorge Puente Sarrín",
author_email="puentesarrin@gmail.com",
url="http://pymongolab.puentesarr.in",
packages=['mongolabclient', 'pymongolab'],
keywords=["mongolab", "pymongolab", "mongolabclient", "mongo", "mongodb"],
install_requires=["pymongo", "requests"],
license="Apache License, Version 2.0",
classifiers=[
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"License :: OSI Approved :: Apache Software License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Topic :: Database"],
cmdclass={"doc": doc},
)