Standardized demo's packaging.

This commit is contained in:
Benoît Bryon 2013-10-28 21:07:42 +01:00
parent 2e5d778651
commit 1790094422
3 changed files with 38 additions and 37 deletions

View file

@ -10,7 +10,7 @@ Demo project
Documentation includes code from the demo
*****************************************
Almost every example in this documentation comes from the demo:
Almost every example in the documentation comes from the demo:
* discover examples in the documentation;
* browse related code and tests in demo project.

View file

@ -1,46 +1,47 @@
# coding=utf-8
# -*- 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()
here = os.path.abspath(os.path.dirname(__file__))
project_root = os.path.dirname(here)
NAME = 'django-downloadview-demo'
README = read_relative_file('README')
VERSION = '0.1'
DESCRIPTION = 'Serve files with Django and reverse-proxies.'
README = open(os.path.join(here, 'README.rst')).read()
VERSION = open(os.path.join(project_root, '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 = []
PACKAGES = ['demoproject']
REQUIRES = ['django-downloadview',
'django-nose']
REQUIREMENTS = ['django-downloadview', 'django-nose']
ENTRY_POINTS = {
'console_scripts': ['demo = demoproject.manage:main']
}
setup(name=NAME,
version=VERSION,
description='Demo project for Django-DownloadView.',
long_description=README,
classifiers=['Development Status :: 1 - Planning',
'License :: OSI Approved :: BSD License',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 2.6',
'Framework :: Django',
],
keywords='class-based view, generic view, download',
author='Benoit Bryon',
author_email='benoit@marmelune.net',
url='https://github.com/benoitbryon/%s' % NAME,
license='BSD',
packages=PACKAGES,
include_package_data=True,
zip_safe=False,
install_requires=REQUIRES,
entry_points={
'console_scripts': [
'demo = demoproject.manage:main',
]
},
)
if __name__ == '__main__': # Don't run setup() when we import this module.
setup(name=NAME,
version=VERSION,
description=DESCRIPTION,
long_description=README,
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=REQUIREMENTS,
entry_points=ENTRY_POINTS)

View file

@ -1 +1 @@
.. include:: ../demo/README
.. include:: ../demo/README.rst