django-defender/setup.py

76 lines
2.7 KiB
Python
Raw Normal View History

2014-09-24 00:31:17 +00:00
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
2014-09-24 00:31:17 +00:00
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
version = '0.4.3'
def get_packages(package):
"""
Return root package and all sub-packages.
"""
return [dirpath
for dirpath, dirnames, filenames in os.walk(package)
if os.path.exists(os.path.join(dirpath, '__init__.py'))]
def get_package_data(package):
"""
Return all files under the root package, that are not in a
package themselves.
"""
walk = [(dirpath.replace(package + os.sep, '', 1), filenames)
for dirpath, dirnames, filenames in os.walk(package)
if not os.path.exists(os.path.join(dirpath, '__init__.py'))]
filepaths = []
for base, filenames in walk:
filepaths.extend([os.path.join(base, filename)
for filename in filenames])
return {package: filepaths}
2014-09-24 00:31:17 +00:00
setup(name='django-defender',
version=version,
description="redis based Django app that locks out users after too "
"many failed login attempts.",
2015-02-24 20:31:01 +00:00
long_description="redis based Django app based on speed, that locks out"
"users after too many failed login attempts.",
2014-09-24 00:31:17 +00:00
classifiers=[
'Development Status :: 5 - Production/Stable',
2014-09-24 00:31:17 +00:00
'Framework :: Django',
'Intended Audience :: Developers',
2015-02-15 17:59:14 +00:00
'License :: OSI Approved :: Apache Software License',
2014-09-24 00:31:17 +00:00
'Operating System :: OS Independent',
'Programming Language :: Python',
2015-01-01 17:58:09 +00:00
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
2015-01-01 17:58:09 +00:00
'Programming Language :: Python :: Implementation :: PyPy',
'Programming Language :: Python :: Implementation :: CPython',
2014-09-24 00:31:17 +00:00
'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
'Topic :: Security',
'Topic :: Software Development :: Libraries',
'Topic :: Software Development :: Libraries :: Python Modules', ],
2015-01-01 17:58:09 +00:00
keywords='django, cache, security, authentication, throttle, login',
2014-09-24 00:31:17 +00:00
author='Ken Cochrane',
url='https://github.com/kencochrane/django-defender',
author_email='kencochrane@gmail.com',
license='Apache 2',
include_package_data=True,
packages=get_packages('defender'),
package_data=get_package_data('defender'),
install_requires=['Django>=1.8,<=1.11', 'redis>=2.10.3,<3.0',
'hiredis>=0.2.0,<1.0', 'mockredispy>=2.9.0.11,<3.0'],
tests_require=['mock', 'mockredispy', 'coverage', 'celery', 'django-redis-cache'],
2014-09-24 00:31:17 +00:00
)