1. Benoît Bryon
  2. django-formrenderingtools

Commits

Benoît Bryon  committed 02f24fd

Improved inclusion of README in setup.py

  • Participants
  • Parent commits e6930c6
  • Branches default

Comments (0)

Files changed (1)

File setup.py

View file
  • Ignore whitespace
 # coding=utf-8
 from setuptools import setup, find_packages
 
+def read_relative_file(filename):
+    """Returns contents of the given file.
+    Filename argument must be relative to this module.
+    """
+    with f as open(os.path.join(os.path.dirname(__file__), filename)):
+        return f.read()
+
 setup(
     name='djc.formrenderingtools',
     version='0.2',
     license='BSD',
     description="Rather than using {{ form.as_p }}, set up and reuse " \
                 "templates to render Django's form elements.",
-    long_description=open('README.txt').read(),
+    long_description=read_relative_file('README.txt'),
     platforms='Any',
     classifiers = [
         'Development Status :: 4 - Beta',