# This file is part of django-guestbook.
# 
# django-guestbook: A simple guestbook application for Django.
# Copyright (C) 2014 Igor Kupreev
# 
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
# 
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU Affero General Public License for more details.
# 
# You should have received a copy of the GNU Affero General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.

from distutils.core import setup

try:
    README = open('README.rst').read()
except:
    README = None

setup(
    name = 'django-guestbook',
    version = "0.2",
    description = 'A simple guestbook application for Django, based largely on the contributed comments application.',
    long_description = README,
    author = 'Mathijs de Bruin, gabberbaby',
    author_email = 'drbob@dokterbob.net, igorkupreev@gmail.com',
    url = 'https://github.com/GabberBaby/django-guestbook',
    packages = ['guestbook', ],
    classifiers = ['Development Status :: 4 - Beta',
                   'Environment :: Web Environment',
                   'Framework :: Django',
                   'Intended Audience :: Developers',
                   'License :: OSI Approved :: GNU Affero General Public License v3',
                   'Operating System :: OS Independent',
                   'Programming Language :: Python',
                   'Topic :: Utilities'],
)

@@ -832,32 +832,102 @@
 tup%0A
-%0Atry:%0A    README = open(
+import os%0Afrom setuptools import setup%0A%0AREADME = open(os.path.join(os.path.dirname(__file__), 
 'REA
@@ -939,16 +939,17 @@
 st')
+)
 .read()%0A
 exce
@@ -948,33 +948,128 @@
 d()%0A
-except:%0A    README = None
+%0A# allow setup.py to be run from any path%0Aos.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir)))
 %0A%0Ase

fix setup