-
Notifications
You must be signed in to change notification settings - Fork 28
/
setup.py
82 lines (67 loc) · 2.43 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
import os
import sys
from setuptools import find_packages, setup
from setuptools.command.test import test as TestCommand
# Some initialization
here = os.path.abspath(os.path.dirname(__file__))
long_description = open(os.path.join(here, 'README.rst')).read()
data_files = []
root_dir = os.path.dirname(__file__)
if root_dir:
os.chdir(root_dir)
# this code snippet is taken from django-registration setup.py script
for dirpath, dirnames, filenames in os.walk('easy_select2'):
# Ignore dirnames that start with '.'
for i, dirname in enumerate(dirnames):
if dirname.startswith('.'):
del dirnames[i]
if filenames:
prefix = dirpath[13:] # Strip "easy_select2/" or "easy_select2\"
for f in filenames:
data_files.append(os.path.join(prefix, f))
class Tox(TestCommand):
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
import tox
errcode = tox.cmdline(self.test_args)
sys.exit(errcode)
setup(
name="django-easy-select2",
version="1.5.8",
packages=find_packages(exclude=('tests', )),
author="asyncee",
description="Django select2 theme for select input widgets.",
long_description=long_description,
license="MIT",
keywords="django select2",
url='https://github.com/asyncee/django-easy-select2',
download_url='https://pypi.python.org/pypi/django-easy-select2/',
python_requires='>=3.7',
install_requires=[
'Django>=2.2',
],
classifiers=[
'Development Status :: 5 - Production/Stable',
'Environment :: Web Environment',
'Framework :: Django',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3 :: Only',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Topic :: Software Development :: Widget Sets',
],
package_dir={'easy_select2': 'easy_select2'},
package_data={'easy_select2': data_files},
zip_safe=False,
tests_require=['tox'],
cmdclass={'test': Tox},
)