setup.py fix 0.9.3
authorAlexander Solovyov <piranha@piranha.org.ua>
Sun, 26 Jul 2009 19:43:01 +0300
changeset 55 e8866635cf2f
parent 54 52bb38d76d79
child 56 ed398ed63e6b
setup.py fix
docs/changelog.rst
finaloption.py
setup.py
--- a/docs/changelog.rst	Fri Jul 24 14:26:48 2009 +0300
+++ b/docs/changelog.rst	Sun Jul 26 19:43:01 2009 +0300
@@ -1,6 +1,11 @@
 Changelog
 ---------
 
+0.9.3
+~~~~~
+Minor fix for setup.py, to avoid troubles with installing when there is no docs
+in package.
+
 0.9.2
 ~~~~~
 Ability to call commands as regular functions, using arguments and keyword
--- a/finaloption.py	Fri Jul 24 14:26:48 2009 +0300
+++ b/finaloption.py	Sun Jul 26 19:43:01 2009 +0300
@@ -6,7 +6,7 @@
 from itertools import imap
 
 __all__ = ['command', 'dispatch']
-__version__ = '0.9.2'
+__version__ = '0.9.3'
 __author__ = 'Alexander Solovyov'
 __email__ = 'piranha@piranha.org.ua'
 
--- a/setup.py	Fri Jul 24 14:26:48 2009 +0300
+++ b/setup.py	Sun Jul 26 19:43:01 2009 +0300
@@ -7,10 +7,18 @@
 def read(fname):
     return open(os.path.join(os.path.dirname(__file__), fname)).read()
 
+def desc():
+    info = read('README')
+    try:
+        return info + '\n\n' + read('docs/changelog.rst')
+    except IOError:
+        # no docs
+        return info
+
 setup(
     name = 'finaloption',
     description = 'command line parsing done right',
-    long_description = read('README') + '\n\n' + read('docs/changelog.rst'),
+    long_description = desc(),
     version = finaloption.__version__,
     author = finaloption.__author__,
     author_email = finaloption.__email__,