Add requirements directory.

This commit is contained in:
Dave Shawley 2015-07-22 13:31:19 -04:00
parent 877581d9ce
commit 5fa31adfce
5 changed files with 63 additions and 43 deletions

View file

@ -1,2 +1,2 @@
include LICENSE
include README.md
graft requires

4
requires/development.txt Normal file
View file

@ -0,0 +1,4 @@
-rtesting.txt
sphinx>=1.2,<2
sphinxcontrib-httpdomain>=1.3,<2
tox>=1.7,<2

View file

2
requires/testing.txt Normal file
View file

@ -0,0 +1,2 @@
-rinstallation.txt
nose>=1.3.1,<2

98
setup.py Normal file → Executable file
View file

@ -1,49 +1,63 @@
from setuptools import setup
import os
#!/usr/bin/env python
#
import os.path
import sys
import setuptools
from sprockets import http
requirements = ['sprockets']
tests_require = ['coverage', 'coveralls', 'mock', 'nose']
# Requirements for Python 2.6
version = sys.version_info
if (version.major, version.minor) < (2, 7):
tests_require.append('unittest2')
def read_requirements(filename):
requirements = []
try:
with open(os.path.join('requires', filename)) as req_file:
for line in req_file:
if '#' in line:
line = line[:line.index('#')]
line = line.strip()
if line.startswith('-r'):
line = line[2:].strip()
requirements.extend(read_requirements(filename))
else:
requirements.append(line)
except IOError:
pass
return requirements
setup(name='sprockets.http',
version=http.__version__,
description=('HTTP Server / Web application controller'),
author='AWeber Communications',
url='https://github.com/sprockets/sprockets.http',
entry_points={'sprockets.controller': ['http=sprockets.http']},
install_requires=requirements,
license=open('LICENSE').read(),
namespace_packages=['sprockets'],
package_data={'': ['LICENSE', 'README.md']},
packages=['sprockets.http'],
classifiers=['Development Status :: 3 - Alpha',
'Environment :: No Input/Output (Daemon)',
'Framework :: Tornado',
'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 :: Internet :: WWW/HTTP',
'Topic :: Software Development :: Libraries',
'Topic :: Software Development :: Libraries :: Python Modules'],
test_suite='nose.collector',
tests_require=tests_require,
zip_safe=True)
requirements = read_requirements('installation')
tests_require = read_requirements('testing')
setuptools.setup(
name='sprockets.http',
version=http.__version__,
description='Tornado HTTP application runner',
author='AWeber Communications',
url='https://github.com/sprockets/sprockets.http',
install_requires=requirements,
license='BSD',
namespace_packages=['sprockets'],
packages=setuptools.find_packages(),
classifiers=[
'Development Status :: 3 - Alpha',
'Environment :: No Input/Output (Daemon)',
'Framework :: Tornado',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Natural Language :: English',
'Operating System :: OS Independent',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: Implementation :: CPython',
'Programming Language :: Python :: Implementation :: PyPy',
'Topic :: Internet :: WWW/HTTP',
'Topic :: Software Development :: Libraries',
'Topic :: Software Development :: Libraries :: Python Modules'],
test_suite='nose.collector',
tests_require=tests_require,
zip_safe=True,
)