-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
executable file
·96 lines (84 loc) · 2.57 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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from setuptools import setup, find_packages
from setuptools.command.test import test as TestCommand
import sys
import os.path
import warnings
requirements = [
'Flask >= 0.10.1',
]
if sys.version_info < (2, 7):
requirements.append('importlib')
extras_require = {
'doc': [
'Sphinx',
],
'test': [
'pytest >2.5',
'pytest-timeout',
'mock',
],
}
dependency_links = [
]
classifiers = [
'Development Status :: 2 - Pre-Alpha',
'Environment :: Web Environment',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Framework :: Flask',
'Operating System :: OS Independent',
'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',
'Programming Language :: Python :: Implementation :: CPython',
'Programming Language :: Python :: Implementation :: PyPy',
'Topic :: Software Development :: Libraries :: Python Modules',
]
def readme():
try:
root = os.path.abspath(os.path.dirname(__file__))
with open(os.path.join(root, 'README.rst')) as f:
return f.read()
except IOError:
warnings.warn("Couldn't found README.rst", RuntimeWarning)
return ''
class PyTest(TestCommand):
def finalize_options(self):
TestCommand.finalize_options(self)
self.test_args = ['tests/', 'flask_factory/']
self.test_suite = True
def run_tests(self):
#import here, cause outside the eggs aren't loaded
import pytest
errno = pytest.main(self.test_args)
sys.exit(errno)
setup(
name='Flask-Factory',
version='0.1.0dev',
author='Eunchong Yu',
author_email='[email protected]',
maintainer='Eunchong Yu',
maintainer_email='[email protected]',
url='https://github.com/Kroisse/flask-factory',
license='BSD',
description='Provide a general-purpose application factory of the Flask '
'application, and the configurator that is independent of the '
'app object.',
long_description=readme(),
packages=find_packages(where='.'),
include_package_data=True,
zip_safe=True,
install_requires=requirements,
extras_require=extras_require,
tests_require=extras_require['test'],
cmdclass={
'test': PyTest,
},
dependency_links=dependency_links,
classifiers=classifiers,
)