-
Notifications
You must be signed in to change notification settings - Fork 60
/
Copy pathsetup.py
59 lines (48 loc) · 1.73 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
import os
import sys
__DIR__ = os.path.abspath(os.path.dirname(__file__))
import codecs
from setuptools import setup
from setuptools.command.test import test as TestCommand
import tornado_json
def read(filename):
"""Read and return `filename` in root dir of project and return string"""
return codecs.open(os.path.join(__DIR__, filename), 'r').read()
install_requires = read("requirements.txt").split()
long_description = read('README.md')
class Pytest(TestCommand):
def finalize_options(self):
TestCommand.finalize_options(self)
self.test_args = ['--verbose']
self.test_suite = True
def run_tests(self):
# Using pytest rather than tox because Travis-CI has issues with tox
# Import here, cause outside the eggs aren't loaded
import pytest
errcode = pytest.main(self.test_args)
sys.exit(errcode)
setup(
name="Tornado-JSON",
version=tornado_json.__version__,
url='https://github.com/hfaran/Tornado-JSON',
license='MIT License',
author='Hamza Faran',
description=('A simple JSON API framework based on Tornado'),
long_description=long_description,
packages=['tornado_json'],
install_requires=install_requires,
tests_require=['pytest'],
cmdclass = {'test': Pytest},
data_files=[
# Populate this with any files config files etc.
],
classifiers=[
"Development Status :: 6 - Production/Stable",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Natural Language :: English",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3.6",
"Topic :: Software Development :: Libraries :: Application Frameworks",
]
)