-
Notifications
You must be signed in to change notification settings - Fork 3
/
setup.py
92 lines (81 loc) · 2.61 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
"""
Flask-htpasswd
---------
Flask extension for providing basic digest authentication and token
authentication via apache htpasswd files.
Links
`````
* `documentation
<https://github.com/carsongee/flask-htpasswd/blob/master/README.rst>`_
* `development version
<https://github.com/carsongee/flask-htpasswd/archive/master.tar.gz#egg=flask-htpasswd-dev>`_
"""
from __future__ import absolute_import, unicode_literals
import codecs
from setuptools import setup
from setuptools.command.test import test as TestCommand
with codecs.open('README.rst', encoding='utf-8') as readme:
README = readme.read()
class Tox(TestCommand):
"""
Boiler plate test command for running tox with ``python setup.py test``.
Borrowed from: https://testrun.org/tox/latest/example/basic.html
"""
# pylint: disable=attribute-defined-outside-init
user_options = [(
str('tox-args='),
str('a'),
str('Arguments to pass to tox')
)]
def initialize_options(self):
TestCommand.initialize_options(self)
self.tox_args = []
def finalize_options(self):
TestCommand.finalize_options(self)
self.test_args = []
self.test_suite = True
def run_tests(self):
# Import here, cause outside the eggs aren't loaded
# pylint: disable=import-outside-toplevel
import tox # pylint: disable=import-error
import shlex
args = self.tox_args
if args:
args = shlex.split(self.tox_args)
tox.cmdline(args=args)
setup(
name='flask-htpasswd',
version='0.5.0',
url='http://github.com/carsongee/flask-htpasswd',
license='BSD New',
author='Carson Gee',
author_email='[email protected]',
description=('Basic authentication support via '
'htpasswd files in flask applications'),
long_description=README,
py_modules=['flask_htpasswd'],
zip_safe=False,
include_package_data=True,
platforms='any',
python_requires=">=3.5",
install_requires=[
'Flask',
'passlib',
'pyjwt',
'tox',
],
tests_require=['tox'],
cmdclass={'test': Tox},
classifiers=[
'Environment :: Web Environment',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
'Topic :: Software Development :: Libraries :: Python Modules',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Framework :: Flask',
]
)