mirror of
https://github.com/jazzband/django-downloadview.git
synced 2026-03-16 22:40:25 +00:00
Renamed README to README.rst. Improved setup.py readability.
This commit is contained in:
parent
9f82aea15b
commit
2e5d778651
4 changed files with 37 additions and 26 deletions
|
|
@ -1,4 +1,4 @@
|
|||
.. include:: ../README
|
||||
.. include:: ../README.rst
|
||||
|
||||
|
||||
********
|
||||
|
|
|
|||
59
setup.py
59
setup.py
|
|
@ -1,43 +1,54 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
"""Python packaging."""
|
||||
import os
|
||||
|
||||
from setuptools import setup
|
||||
|
||||
|
||||
def read_relative_file(filename):
|
||||
"""Returns contents of the given file, which path is supposed relative
|
||||
to this module."""
|
||||
with open(os.path.join(os.path.dirname(__file__), filename)) as f:
|
||||
return f.read().strip()
|
||||
here = os.path.abspath(os.path.dirname(__file__))
|
||||
|
||||
|
||||
NAME = 'django-downloadview'
|
||||
README = read_relative_file('README')
|
||||
VERSION = read_relative_file('VERSION')
|
||||
PACKAGES = ['django_downloadview']
|
||||
REQUIRES = ['setuptools', 'django>=1.5', 'requests']
|
||||
DESCRIPTION = 'Serve files with Django and reverse-proxies.'
|
||||
README = open(os.path.join(here, 'README.rst')).read()
|
||||
VERSION = open(os.path.join(here, 'VERSION')).read().strip()
|
||||
AUTHOR = u'Benoît Bryon'
|
||||
EMAIL = u'benoit@marmelune.net'
|
||||
URL = 'https://{name}.readthedocs.org/'.format(name=NAME)
|
||||
CLASSIFIERS = ['Development Status :: 4 - Beta',
|
||||
'License :: OSI Approved :: BSD License',
|
||||
'Programming Language :: Python :: 2.7',
|
||||
'Programming Language :: Python :: 2.6',
|
||||
'Framework :: Django']
|
||||
KEYWORDS = ['file',
|
||||
'stream',
|
||||
'download',
|
||||
'FileField',
|
||||
'ImageField',
|
||||
'x-accel',
|
||||
'x-accel-redirect',
|
||||
'x-sendfile',
|
||||
'sendfile',
|
||||
'mod_xsendfile',
|
||||
'offload']
|
||||
PACKAGES = [NAME.replace('-', '_')]
|
||||
REQUIREMENTS = ['setuptools', 'Django>=1.5', 'requests']
|
||||
ENTRY_POINTS = {}
|
||||
|
||||
|
||||
if __name__ == '__main__': # Don't run setup() when we import this module.
|
||||
setup(name=NAME,
|
||||
version=VERSION,
|
||||
description='Serve files with Django and reverse-proxies.',
|
||||
description=DESCRIPTION,
|
||||
long_description=README,
|
||||
classifiers=['Development Status :: 4 - Beta',
|
||||
'License :: OSI Approved :: BSD License',
|
||||
'Programming Language :: Python :: 2.7',
|
||||
'Programming Language :: Python :: 2.6',
|
||||
'Framework :: Django',
|
||||
],
|
||||
keywords='file stream download FileField ImageField x-accel '
|
||||
'x-accel-redirect x-sendfile sendfile mod_xsendfile '
|
||||
'offload',
|
||||
author='Benoît Bryon',
|
||||
author_email='benoit@marmelune.net',
|
||||
url='https://github.com/benoitbryon/%s' % NAME,
|
||||
classifiers=CLASSIFIERS,
|
||||
keywords=' '.join(KEYWORDS),
|
||||
author=AUTHOR,
|
||||
author_email=EMAIL,
|
||||
url=URL,
|
||||
license='BSD',
|
||||
packages=PACKAGES,
|
||||
include_package_data=True,
|
||||
zip_safe=False,
|
||||
install_requires=REQUIRES,
|
||||
)
|
||||
install_requires=REQUIREMENTS,
|
||||
entry_points=ENTRY_POINTS)
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ class ReadMeTestCase(unittest.TestCase):
|
|||
# Run build.
|
||||
import docutils.core
|
||||
import docutils.io
|
||||
source = open(os.path.join(project_dir, 'README')).read()
|
||||
source = open(os.path.join(project_dir, 'README.rst')).read()
|
||||
writer_name = 'html'
|
||||
import sys
|
||||
from StringIO import StringIO
|
||||
|
|
|
|||
Loading…
Reference in a new issue