Debian Codegraph @

setup.py

raw symbols SCIP
1 import sys
2
3 from setuptools import find_packages, setup
4 from setuptools.command.test import test as test_command
5
6 from captcha import get_version as get_captcha_version
7
8
9 class Tox(test_command):
10 user_options = [("tox-args=", "a", "Arguments to pass to tox")]
11
12 def initialize_options(self):
13 test_command.initialize_options(self)
14 self.tox_args = None
15
16 def finalize_options(self):
17 test_command.finalize_options(self)
18 self.test_args = []
19 self.test_suite = True
20
21 def run_tests(self):
22 # import here, cause outside the eggs aren't loaded
23 import shlex
24
25 import tox
26
27 args = self.tox_args
28 if args:
29 args = shlex.split(self.tox_args)
30 errno = tox.cmdline(args=args)
31 sys.exit(errno)
32
33
34 install_requires = [
35 "Django >= 4.2",
36 "Pillow >=6.2.0",
37 "django-ranged-response == 0.2.0",
38 ]
39 EXTRAS_REQUIRE = {"test": ("testfixtures",)}
40
41
42 with open("README.rst") as readme:
43 long_description = readme.read()
44
45 setup(
46 name="django-simple-captcha",
47 version=get_captcha_version(),
48 description="A very simple, yet powerful, Django captcha application",
49 long_description=long_description,
50 author="Marco Bonetti",
51 author_email="[email protected]",
52 url="https://github.com/mbi/django-simple-captcha",
53 license="MIT",
54 packages=find_packages(exclude=["testproject", "testproject.*"]),
55 classifiers=[
56 "Development Status :: 4 - Beta",
57 "Environment :: Web Environment",
58 "Intended Audience :: Developers",
59 "License :: OSI Approved :: MIT License",
60 "Operating System :: OS Independent",
61 "Programming Language :: Python",
62 "Programming Language :: Python :: 3.9",
63 "Programming Language :: Python :: 3.10",
64 "Programming Language :: Python :: 3.11",
65 "Programming Language :: Python :: 3.12",
66 "Programming Language :: Python :: 3.13",
67 "Topic :: Security",
68 "Topic :: Internet :: WWW/HTTP",
69 "Framework :: Django",
70 ],
71 include_package_data=True,
72 zip_safe=False,
73 install_requires=install_requires,
74 extras_require=EXTRAS_REQUIRE,
75 tests_require=["tox>=4.31", "tox-uv>=1.23"],
76 cmdclass={"test": Tox},
77 )