Commit 076634b3 authored by Maciej Delmanowski's avatar Maciej Delmanowski

An alternative way to deal with Unicode issues

parent 22122685
......@@ -10,6 +10,16 @@ try:
except(IOError, ImportError):
README = open('README.md').read()
try:
unicode
except NameError:
# Required for Python 3.x
class unicode(object):
def __new__(cls, s):
if isinstance(s, str):
return s
return s and s.decode('utf-8') or None
SCRIPTS = [os.path.join('bin', n) for n in [
'debops', 'debops-init', 'debops-task',
'debops-defaults', 'debops-padlock', 'debops-update']]
......@@ -38,7 +48,7 @@ try:
os.symlink('../ansible', 'debops/ansible')
setup(
name="debops",
version=RELEASE.decode('utf-8'),
version=unicode(RELEASE),
install_requires=['netaddr', 'argparse', 'passlib', 'ansible'],
scripts=SCRIPTS,
......@@ -56,7 +66,7 @@ try:
python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, '
'!=3.3.*, !=3.4.*, <4',
download_url="https://github.com/debops/debops"
"/archive/v" + RELEASE.decode('utf-8') + ".tar.gz",
"/archive/v" + unicode(RELEASE) + ".tar.gz",
classifiers=[
'Development Status :: 4 - Beta',
'Environment :: Console',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment