Debian Codegraph @

setup.py

raw ◀ ▶
Source reconstructed at patch state 0 of 2 — not the installed (fully patched) source.
2 Debian patches touch this file
1 #!/usr/bin/env python
2
3 import ast
4 import os.path
5 from setuptools import setup, find_packages
6
7 class GetVersion(ast.NodeVisitor):
8 def __init__(self, path):
9 with open(path) as f:
10 self.visit(ast.parse(f.read(), path))
11
12 def visit_Assign(self, node):
13 if any(target.id == 'VERSION' for target in node.targets):
14 assert not hasattr(self, 'VERSION')
15 self.VERSION = node.value.s
16
17 this_directory = os.path.abspath(os.path.dirname(__file__))
18 with open(os.path.join(this_directory, 'README.rst')) as f:
19 long_description = f.read()
20
21 setup(
22 name='django-bitfield',
23 version=GetVersion(os.path.join(os.path.dirname(__file__), 'bitfield', '__init__.py')).VERSION,
24 author='Disqus',
25 author_email='[email protected]',
26 url='https://github.com/disqus/django-bitfield',
27 description='BitField in Django',
28 long_description=long_description,
29 long_description_content_type='text/x-rst',
30 packages=find_packages(),
31 zip_safe=False,
32 install_requires=[
33 'Django>=1.11.29',
34 'six',
35 ],
36 extras_require={
37 'tests': [
38 'flake8',
39 'mysqlclient',
40 'psycopg2>=2.3',
41 'pytest-django',
42 ],
43 },
44 include_package_data=True,
45 classifiers=[
46 'Framework :: Django',
47 'Intended Audience :: Developers',
48 'Intended Audience :: System Administrators',
49 'Operating System :: OS Independent',
50 'Topic :: Software Development',
51 "Programming Language :: Python",
52 "Programming Language :: Python :: 3",
53 "Programming Language :: Python :: 3.4",
54 "Programming Language :: Python :: 3.5",
55 "Programming Language :: Python :: 3.6",
56 "Programming Language :: Python :: 3.7",
57 "Programming Language :: Python :: 3.8",
58 "Programming Language :: Python :: 3.9",
59 ],
60 )