This change addresses issue #38: "fix unicode handling issues". The issue was originally reported against neutron client (https://bugs.launchpad.net/python-neutronclient/+bug/1189112) but was tracked down to the fact that python 2.6 does not set the default encoding for sys.stdout properly. A change to python 2.7 fixes the problem there and later (http://hg.python.org/cpython/rev/e60ef17561dc/), but since cliff supports python 2.6 it needs to handle the case explicitly. Change-Id: Id06507d78c7c82b25f39366ea4a6dfa4ef3a3a97
77 lines
2.0 KiB
Python
77 lines
2.0 KiB
Python
#!/usr/bin/env python
|
|
|
|
PROJECT = 'cliffdemo'
|
|
|
|
# Change docs/sphinx/conf.py too!
|
|
VERSION = '0.1'
|
|
|
|
# Bootstrap installation of Distribute
|
|
import distribute_setup
|
|
distribute_setup.use_setuptools()
|
|
|
|
from setuptools import setup, find_packages
|
|
|
|
from distutils.util import convert_path
|
|
from fnmatch import fnmatchcase
|
|
import os
|
|
import sys
|
|
|
|
try:
|
|
long_description = open('README.rst', 'rt').read()
|
|
except IOError:
|
|
long_description = ''
|
|
|
|
setup(
|
|
name=PROJECT,
|
|
version=VERSION,
|
|
|
|
description='Demo app for cliff',
|
|
long_description=long_description,
|
|
|
|
author='Doug Hellmann',
|
|
author_email='doug.hellmann@gmail.com',
|
|
|
|
url='https://github.com/dreamhost/cliff',
|
|
download_url='https://github.com/dreamhost/cliff/tarball/master',
|
|
|
|
classifiers=['Development Status :: 3 - Alpha',
|
|
'License :: OSI Approved :: Apache Software License',
|
|
'Programming Language :: Python',
|
|
'Programming Language :: Python :: 2',
|
|
'Programming Language :: Python :: 2.7',
|
|
'Programming Language :: Python :: 3',
|
|
'Programming Language :: Python :: 3.2',
|
|
'Intended Audience :: Developers',
|
|
'Environment :: Console',
|
|
],
|
|
|
|
platforms=['Any'],
|
|
|
|
scripts=[],
|
|
|
|
provides=[],
|
|
install_requires=['distribute', 'cliff'],
|
|
|
|
namespace_packages=[],
|
|
packages=find_packages(),
|
|
include_package_data=True,
|
|
|
|
entry_points={
|
|
'console_scripts': [
|
|
'cliffdemo = cliffdemo.main:main'
|
|
],
|
|
'cliff.demo': [
|
|
'simple = cliffdemo.simple:Simple',
|
|
'two_part = cliffdemo.simple:Simple',
|
|
'error = cliffdemo.simple:Error',
|
|
'list files = cliffdemo.list:Files',
|
|
'files = cliffdemo.list:Files',
|
|
'file = cliffdemo.show:File',
|
|
'show file = cliffdemo.show:File',
|
|
'unicode = cliffdemo.encoding:Encoding',
|
|
],
|
|
},
|
|
|
|
zip_safe=False,
|
|
)
|