mirror of
https://github.com/sprockets/cookiecutter-sprockets.git
synced 2024-11-23 19:29:52 +00:00
5bb05e461d
- Documentation updates, fleshing out more of the baseline expectations - README.rst updates with the baseline expectations - Remove tornado from the requirements.txt - Update the nosetests configuration in setup.cfg - Remove unneeded 2.6 requirements - Update classifiers - Update name in cookiecutter.json - Use manual package names in packages - Mark as non-zip safe - Remove tests directory - Make default tests.py file - Explicitly add coverage to the test requirements - Add README.rst to MANIFEST.in - Update Trove classifiers - Ensure setup.py will include README.rst and LICENSE (dupe of MANIFEST.in) - Add test_suite to setup.py - Set default description in cookiecutter.json Additional refactoring - Change to be a sprockets.foo.bar project - Move doc to docs - Add additional documentation templates - Change version to only show major.minor - Add docs/Makefile - Minor README and docs updates Fix the travis file and readthedocs URLs Deployment/pypi related updates
70 lines
2.6 KiB
Python
70 lines
2.6 KiB
Python
import codecs
|
|
import sys
|
|
|
|
import setuptools
|
|
|
|
from sprockets.{{cookiecutter.project_name}} import __version__
|
|
|
|
|
|
def read_requirements_file(req_name):
|
|
requirements = []
|
|
try:
|
|
with codecs.open(req_name, encoding='utf-8') as req_file:
|
|
for req_line in req_file:
|
|
if '#' in req_line:
|
|
req_line = req_line[0:req_line.find('#')].strip()
|
|
if req_line:
|
|
requirements.append(req_line.strip())
|
|
except IOError:
|
|
pass
|
|
return requirements
|
|
|
|
|
|
install_requires = read_requirements_file('requirements.txt')
|
|
setup_requires = read_requirements_file('setup-requirements.txt')
|
|
tests_require = read_requirements_file('test-requirements.txt')
|
|
|
|
if sys.version_info < (2, 7):
|
|
tests_require.append('unittest2')
|
|
if sys.version_info < (3, 0):
|
|
tests_require.append('mock')
|
|
|
|
setuptools.setup(
|
|
name='sprockets.{{cookiecutter.project_name}}',
|
|
version=__version__,
|
|
description='{{cookiecutter.description}}',
|
|
long_description=codecs.open('README.rst', encoding='utf-8').read(),
|
|
url='https://github.com/{{cookiecutter.git_org}}/sprockets.{{cookiecutter.project_name}}.git',
|
|
author='{{cookiecutter.full_name}}',
|
|
author_email='{{cookiecutter.email}}',
|
|
license=codecs.open('LICENSE', encoding='utf-8').read(),
|
|
classifiers=[
|
|
'Development Status :: 4 - Beta',
|
|
'Intended Audience :: Developers',
|
|
'License :: OSI Approved :: BSD License',
|
|
'Natural Language :: English',
|
|
'Operating System :: OS Independent',
|
|
'Programming Language :: Python :: 2',
|
|
'Programming Language :: Python :: 2.6',
|
|
'Programming Language :: Python :: 2.7',
|
|
'Programming Language :: Python :: 3',
|
|
'Programming Language :: Python :: 3.2',
|
|
'Programming Language :: Python :: 3.3',
|
|
'Programming Language :: Python :: 3.4',
|
|
'Programming Language :: Python :: Implementation :: CPython',
|
|
'Programming Language :: Python :: Implementation :: PyPy',
|
|
'Topic :: Software Development :: Libraries',
|
|
'Topic :: Software Development :: Libraries :: Python Modules'
|
|
],
|
|
packages=['sprockets',
|
|
'sprockets.{{cookiecutter.project_name.split('.')[0]}}',
|
|
'sprockets.{{cookiecutter.project_name}}'],
|
|
package_data={'': ['LICENSE', 'README.md']},
|
|
include_package_data=True,
|
|
namespace_packages=['sprockets',
|
|
'sprockets.{{cookiecutter.project_name.split('.')[0]}}'],
|
|
install_requires=install_requires,
|
|
setup_requires=setup_requires,
|
|
tests_require=tests_require,
|
|
test_suite='nose.collector',
|
|
zip_safe=False)
|