2014-09-24 00:31:17 +00:00
|
|
|
#!/usr/bin/env python
|
2015-03-03 14:44:07 +00:00
|
|
|
# -*- 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
|
|
|
|
|
|
|
|
|
|
|
2019-05-29 18:48:50 +00:00
|
|
|
version = '0.6.2'
|
2015-03-03 14:44:07 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
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=[
|
2015-03-20 14:09:39 +00:00
|
|
|
'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.7',
|
2015-10-21 20:33:08 +00:00
|
|
|
'Programming Language :: Python :: 3.5',
|
2019-11-13 21:01:11 +00:00
|
|
|
'Programming Language :: Python :: 3.6',
|
|
|
|
|
'Programming Language :: Python :: 3.7',
|
|
|
|
|
'Programming Language :: Python :: 3.8',
|
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',
|
2015-03-03 14:44:07 +00:00
|
|
|
include_package_data=True,
|
|
|
|
|
packages=get_packages('defender'),
|
|
|
|
|
package_data=get_package_data('defender'),
|
2019-05-29 18:48:50 +00:00
|
|
|
install_requires=['Django>=1.8,<2.3', 'redis>=2.10.3,<3.3'],
|
2018-02-20 14:34:14 +00:00
|
|
|
tests_require=['mock', 'mockredispy>=2.9.0.11,<3.0', 'coverage',
|
|
|
|
|
'celery', 'django-redis-cache'],
|
2014-09-24 00:31:17 +00:00
|
|
|
)
|