Skip to content

Commit

Permalink
Improving setup.py
Browse files Browse the repository at this point in the history
  • Loading branch information
gregmuellegger committed Feb 24, 2010
1 parent ad84403 commit d54dfcc
Showing 1 changed file with 43 additions and 5 deletions.
48 changes: 43 additions & 5 deletions setup.py
Original file line number Original file line Diff line number Diff line change
@@ -1,15 +1,53 @@
#!/usr/bin/env python #!/usr/bin/env python
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
from setuptools import setup, find_packages from setuptools import find_packages, setup


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(file('README').read())


setup( setup(
name = '', name = '<REPLACE:PROJECT_NAME>',
version = '1.0', version = '0.1.0pre1',
url = 'http://github.com/jacobian/django-shorturls', url = 'https://launchpad.net/<REPLACE:PROJECT_NAME>',
license = 'BSD', license = 'BSD',
description = '', description = '',
author = u'Gregor Müllegger', long_description = long_description,
author = UltraMagicString('Gregor Müllegger'),
author_email = 'gregor@muellegger.de',
packages = find_packages('src'), packages = find_packages('src'),
package_dir = {'': 'src'}, package_dir = {'': 'src'},
include_package_data = True,
classifiers = [
'Development Status :: 4 - Beta',
'Environment :: Web Environment',
'Framework :: Django',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Natural Language :: English',
'Operating System :: OS Independent',
'Programming Language :: Python',
],
zip_safe = False,
install_requires = ['setuptools'], install_requires = ['setuptools'],
) )

0 comments on commit d54dfcc

Please sign in to comment.