Commit cf08262d by Chris Jerdonek

Added a main() function to setup.py for more flexibility in organizing its functions.

parent 4f2ab143
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
# coding: utf-8 # coding: utf-8
""" """
This script supports installing and distributing pystache. This script supports distributing pystache and testing it from a source distribution.
Below are instructions to pystache maintainers on how to push a new Below are instructions to pystache maintainers on how to push a new
version of pystache to PyPI-- version of pystache to PyPI--
...@@ -126,46 +126,52 @@ PACKAGES = [ ...@@ -126,46 +126,52 @@ PACKAGES = [
] ]
setup(name='pystache', def main(sys_argv):
version=VERSION,
license='MIT', setup(name='pystache',
description='Mustache for Python', version=VERSION,
long_description=long_description, license='MIT',
author='Chris Wanstrath', description='Mustache for Python',
author_email='chris@ozmm.org', long_description=long_description,
maintainer='Chris Jerdonek', author='Chris Wanstrath',
url='http://github.com/defunkt/pystache', author_email='chris@ozmm.org',
install_requires=INSTALL_REQUIRES, maintainer='Chris Jerdonek',
packages=PACKAGES, url='http://github.com/defunkt/pystache',
package_data = { install_requires=INSTALL_REQUIRES,
# Include the README so doctests can be run. packages=PACKAGES,
# TODO: is there a better way to include the README? package_data = {
'pystache': [ # Include the README so doctests can be run.
'../README.rst', # TODO: is there a better way to include the README?
'../ext/spec/specs/*.json', 'pystache': [
'../ext/spec/specs/*.yml', '../README.rst',
], '../ext/spec/specs/*.json',
# Include template files so tests can be run. '../ext/spec/specs/*.yml',
'examples': template_files, ],
'pystache.tests.data': template_files, # Include template files so tests can be run.
'pystache.tests.data.locator': template_files, 'examples': template_files,
}, 'pystache.tests.data': template_files,
test_suite='pystache.tests', 'pystache.tests.data.locator': template_files,
entry_points = { },
'console_scripts': ['pystache=pystache.commands:main'], test_suite='pystache.tests',
}, entry_points = {
classifiers = ( 'console_scripts': ['pystache=pystache.commands:main'],
'Development Status :: 4 - Beta', },
'License :: OSI Approved :: MIT License', classifiers = (
'Programming Language :: Python', 'Development Status :: 4 - Beta',
'Programming Language :: Python :: 2', 'License :: OSI Approved :: MIT License',
'Programming Language :: Python :: 2.4', 'Programming Language :: Python',
'Programming Language :: Python :: 2.5', 'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.6', 'Programming Language :: Python :: 2.4',
'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 2.5',
'Programming Language :: Python :: 3', 'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 3.1', 'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.2', 'Programming Language :: Python :: 3',
), 'Programming Language :: Python :: 3.1',
**extra 'Programming Language :: Python :: 3.2',
) ),
**extra
)
if __name__=='__main__':
main(sys.argv)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment