Debian Codegraph @

setup.py

raw symbols SCIP
1 import os
2 from distutils.core import setup
3
4 project_name = 'impersonate'
5 long_description = open('README.rst').read()
6
7 # Idea from django-registration setup.py
8 packages, data_files = [], []
9 root_dir = os.path.dirname(__file__)
10 if root_dir:
11 os.chdir(root_dir)
12
13 for dirpath, dirnames, filenames in os.walk(project_name):
14 # Ignore dirnames that start with '.'
15 for i, dirname in enumerate(dirnames):
16 if dirname.startswith('.') or dirname == '__pycache__':
17 del dirnames[i]
18 if '__init__.py' in filenames:
19 pkg = dirpath.replace(os.path.sep, '.')
20 if os.path.altsep:
21 pkg = pkg.replace(os.path.altsep, '.')
22 packages.append(pkg)
23 elif filenames:
24 prefix = dirpath[(len(project_name) + 1) :]
25 for f in filenames:
26 data_files.append(os.path.join(prefix, f))
27
28 setup(
29 name='django-impersonate',
30 version=__import__(project_name).get_version(),
31 package_dir={project_name: project_name},
32 packages=packages,
33 package_data={project_name: data_files},
34 description='Django app to allow superusers to impersonate other users.',
35 author='Peter Sanchez',
36 author_email='[email protected]',
37 license='BSD License',
38 url='https://code.netlandish.com/~petersanchez/django-impersonate',
39 long_description=long_description,
40 platforms=['any'],
41 classifiers=[
42 'Development Status :: 5 - Production/Stable',
43 'Intended Audience :: Developers',
44 'License :: OSI Approved :: BSD License',
45 'Natural Language :: English',
46 'Operating System :: OS Independent',
47 'Framework :: Django',
48 'Framework :: Django :: 3.2',
49 'Framework :: Django :: 4.0',
50 'Framework :: Django :: 4.1',
51 'Framework :: Django :: 4.2',
52 'Framework :: Django :: 5.0',
53 'Programming Language :: Python',
54 'Programming Language :: Python :: 3.7',
55 'Programming Language :: Python :: 3.8',
56 'Programming Language :: Python :: 3.9',
57 'Programming Language :: Python :: 3.10',
58 'Programming Language :: Python :: 3.11',
59 'Programming Language :: Python :: 3.12',
60 'Environment :: Web Environment',
61 ],
62 )