Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes setup.py for pip installation #118

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 3 additions & 25 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,31 +13,10 @@ def get_version(package):
return re.search("__version__ = ['\"]([^'\"]+)['\"]", init_py).group(1)


class UltraMagicString(object):
'''
Taken from
http://stackoverflow.com/questions/1162338/whats-the-right-way-to-use-unicode-metadata-in-setup-py
'''
def __init__(self, value):
self.value = value

def __str__(self):
return self.value

def __unicode__(self):
return self.value.decode('UTF-8')

def __add__(self, other):
return UltraMagicString(self.value + str(other))

def split(self, *args, **kw):
return self.value.split(*args, **kw)


long_description = UltraMagicString(u'\n\n'.join((
long_description = u'\n\n'.join((
open('README.rst').read(),
open('CHANGES.rst').read(),
)))
))


setup(
Expand All @@ -47,7 +26,7 @@ def split(self, *args, **kw):
license = 'BSD',
description = 'Provides tools to auto generate test data.',
long_description = long_description,
author = UltraMagicString('Gregor Müllegger'),
author = 'Gregor Müllegger',
author_email = '[email protected]',
classifiers = [
'Development Status :: 4 - Beta',
Expand All @@ -64,7 +43,6 @@ def split(self, *args, **kw):
'Natural Language :: English',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
Expand Down