Commits

catapela committed 227a50d

Canges in setup.py - READM will now alsow be installed. Now if a package is installed than help(dynamicLink) outputs the README.

  • Participants
  • Parent commits 49dcecd

Comments (0)

Files changed (4)

     
         >>> import dynamicLink
         >>> dynamicLink.VERSION
+        >>> help(dynamicLink)
         >>> exit()
     
 =====

File dynamicLink/__init__.py

 import version
+import os
 
 __version__ = VERSION = version.VERSION
-__doc__ = 'For full documentation review the README file in your package or go to: http://pypi.python.org/pypi/django-dynamic-link/'
-__docformat__ = 'txt'
+
+try:
+    __doc__ = open(os.path.join(os.path.dirname(__file__), 'README_COPY')).read()
+    __docformat__ = 'reStructuredText'
+except IOError:
+    __doc__ = 'For full documentation review the README file in your package or go to: http://pypi.python.org/pypi/django-dynamic-link/'
+    __docformat__ = 'txt'

File dynamicLink/version.py

 # -*- coding:utf-8 -*-
 # This Python file uses the following encoding: utf-8
 
-VERSION = (0,5,4)
+VERSION = (0,5,4,1)
 APPLICATION_NAME = "Dynamic Link"
 VERSION_str = str(VERSION).strip('()').replace(',','.').replace(' ','')
 VERSION_INFO = """
 Hints:
 
 
+- 0.5.4.1   Canges in setup.py - READM will now alsow be installed. Now if a package
+            is installed than help(dynamicLink) outputs the README.
 - 0.5.4     Bugfix: Installation failed on Windows in spite of "/" on the end
             of recursive-include in MANIFEST. 
             Now canged from "recursive-include folder/ *" to "recursive-include folder *"
 from dynamicLink import version
 import os
 import sys
+import shutil
+
 
 # Read the version from a project file
 VERSION = version.VERSION_str
 
 # Get description from Readme file
-long_description = open(os.path.join(os.path.dirname(__file__), 'README.rst')).read()
+readme_file = os.path.join(os.path.dirname(__file__), 'README.rst')
+long_description = open(readme_file).read()
+
+# To get the readme after installation with help(dynamicLink) copy the
+# actual README in the project folder
+readme_copy = os.path.join(os.path.dirname(__file__), 'dynamicLink', 'README_COPY')
+try:
+    shutil.copyfile(readme_file, readme_copy)
+except IOError:
+    pass
 
 # Build a list with requirements of the app
 REQUIRES = []