/
setup.py
73 lines (63 loc) · 2.13 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
#!/usr/bin/env python
import os
import sys
from setuptools import setup
from setuptools.command.test import test as TestCommand
import queryfilter
tests_requires = [
'pytest',
'pytest-cov',
'pytest-flask-sqlalchemy',
]
requires = open('./requirements.txt').readlines()
class PyTest(TestCommand):
def finalize_options(self):
TestCommand.finalize_options(self)
self.test_args = [
'.',
'-vvrsxX',
'--cov-report=html'
]
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)
def readme():
try:
with open('README.md') as f:
return f.read()
except:
return '''Sqlalchemy Queryfilter create default process to use REST filters'''
setup(name='sqlalchemy-queryfilter',
url='https://git.in.hurusystems.com/huru/sqlalchemy-queryfilter.git',
download_url='https://git.in.hurusystems.com/huru/sqlalchemy-queryfilter/tarball/%s/' % queryfilter.get_version(),
author="valdergallo",
author_email='valdergallo@gmail.com',
keywords=['api', 'sqlalchemy', 'queryfilter', 'rest'],
description='Sqlalchemy Queryfilter create default process to use REST filters',
license='GPL-3.0',
long_description=readme(),
classifiers=[
'Framework :: Flask',
'Framework :: SQLAlchemy',
'Operating System :: OS Independent',
'Topic :: Utilities',
'Programming Language :: Python',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
],
include_package_data=True,
version=queryfilter.get_version(),
tests_require=tests_requires,
require=requires,
cmdclass={'test': PyTest},
packages=['queryfilter'],
zip_safe=False,
platforms='any',
)