-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathsetup.py
More file actions
72 lines (66 loc) · 2.4 KB
/
setup.py
File metadata and controls
72 lines (66 loc) · 2.4 KB
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
import sys
import re
from setuptools import setup
from setuptools.command.test import test as TestCommand
# Pytest class not used for now ... testing is
# initiated via Tox.
class PyTest(TestCommand):
def finalize_options(self):
TestCommand.finalize_options(self)
self.test_args = ['--strict', '--verbose']
self.test_suite = True
def run_tests(self):
import pytest
errno = pytest.main(self.test_args)
sys.exit(errno)
class Tox(TestCommand):
#user_options = [('tox-args=', 'a', "Arguments to pass to tox")]
def initialize_options(self):
TestCommand.initialize_options(self)
self.tox_args = None
def finalize_options(self):
TestCommand.finalize_options(self)
self.test_args = []
self.test_suite = True
def run_tests(self):
import tox
import shlex
errno = tox.cmdline(args=shlex.split(self.tox_args))
sys.exit(errno)
long_description = open('README.txt').read()
with open('wtforms_dynamic_fields/__init__.py') as f:
m = re.findall(r'__version__\s*=\s*\'(.*)\'', f.read())
version = m[0]
setup(
name='WTForms-Dynamic-Fields',
version=version,
url='https://github.com/timusan/wtforms-dynamic-fields',
license='BSD',
author='Tim van der Linden',
tests_require=['tox'],
install_requires=['WTForms>=2.0.1'],
cmdclass={'test': Tox},
author_email='tim@shisaa.jp',
description='Simple wrapper to add "dynamic" (sets of) fields to an already instantiated WTForms form.',
long_description=long_description,
packages=['wtforms_dynamic_fields', 'tests'],
include_package_data=True,
platforms='any',
test_suite='wtforms_dynamic_fields.tests',
classifiers = [
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Development Status :: 3 - Alpha',
'Natural Language :: English',
'Environment :: Web Environment',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Operating System :: OS Independent',
'Topic :: Software Development :: Libraries :: Python Modules',
'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
]
)