cli: fix python sdist, add readline as installation requirement

Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
This commit is contained in:
Rohit Yadav 2012-11-06 17:06:11 +05:30
parent b713865308
commit 77e957c91b
3 changed files with 23 additions and 12 deletions

View File

@ -16,6 +16,6 @@
# under the License.
try:
from cloudmonkey import *
from cloudmonkey import __version__
except ImportError, e:
print e

View File

@ -43,13 +43,19 @@ except ImportError, e:
import sys
sys.exit()
# Use following rules for versioning:
# <cli major version>.<cloudstack minor version>.<cloudstack major version>
# Example: For CloudStack 4.1.x, CLI version should be 0.1.4
__version__ = "0.0.4"
log_fmt = '%(asctime)s - %(filename)s:%(lineno)s - [%(levelname)s] %(message)s'
logger = logging.getLogger(__name__)
completions = cloudstackAPI.__all__
class CloudStackShell(cmd.Cmd):
intro = "☁ Apache CloudStack CLI. Type help or ? to list commands.\n"
intro = ("☁ Apache CloudStack cloudmonkey " + __version__ +
". Type help or ? to list commands.\n")
ruler = "-"
config_file = os.path.expanduser('~/.cloudmonkey_config')
grammar = []
@ -386,6 +392,9 @@ class CloudStackShell(cmd.Cmd):
return self.do_EOF(args)
def do_EOF(self, args):
"""
Quit on Ctrl+d or EOF
"""
return True

View File

@ -22,11 +22,10 @@ except ImportError:
use_setuptools()
from setuptools import setup, find_packages
# Use following rules for versioning:
# <cli major version>.<cloudstack minor version>.<cloudstack major version>
# Example: For CloudStack 4.1.x, CLI version should be 0.1.4
version = "0.0.4"
name = "cloudmonkey"
from cloudmonkey import __version__
name = 'cloudmonkey'
version = __version__
setup(
name = name,
@ -37,12 +36,15 @@ setup(
maintainer_email = "bhaisaab@apache.org",
url = "http://incubator.apache.org/cloudstack",
description = "Command Line Interface for Apache CloudStack",
long_description="cloudmonkey is a command line interface for Apache "
long_description = "cloudmonkey is a command line interface for Apache "
"CloudStack powered by CloudStack Marvin testclient",
platforms=("Any",),
platforms = ("Any",),
license = 'ASL 2.0',
packages=find_packages(),
install_requires=['clint>=0.3.0'],
packages = find_packages(),
install_requires = [
'clint>=0.3.0',
'readline',
],
include_package_data = True,
zip_safe = False,
classifiers = [
@ -58,6 +60,6 @@ setup(
],
entry_points="""
[console_scripts]
cloudmonkey = cloudmonkey:main
cloudmonkey = cloudmonkey.cloudmonkey:main
""",
)