Debian Codegraph @

setup.py

raw symbols ◀ ▶ SCIP
1 Debian patch touch this file
1 import sys
2 import os
3
4 from setuptools import find_packages, setup
5 from setuptools.command.test import test
6
7
8 here_dir = os.path.abspath(os.path.dirname(__file__))
9
10
11 # require python-3.5+, since we only support the native coroutine 'async def'
12 # style for tests that were introduced in python 3.5.
13 if sys.version_info < (3, 5):
14 print("pytest-tornasync requires Python 3.5 or newer")
15 sys.exit(1)
16
17
18 def read(*filenames):
19 buf = []
20 for filename in filenames:
21 filepath = os.path.join(here_dir, filename)
22 try:
23 with open(filepath) as f:
24 buf.append(f.read())
25 except FileNotFoundError:
26 pass
27 return '\n\n'.join(buf)
28
29
30 class PyTest(test):
31
32 def finalize_options(self):
33 test.finalize_options(self)
34 self.test_args = []
35 self.test_suite = True
36
37 def run_tests(self):
38 import pytest
39 status = pytest.main(self.test_args)
40 sys.exit(status)
41
42
43 _reqs = ['pytest>=3.0', 'tornado>=5.0']
44
45
46 setup(
47 name='pytest-tornasync',
48 version='0.6.0.post2',
49 license='http://www.opensource.org/licenses/mit-license.php',
50 url='https://github.com/eukaryote/pytest-tornasync',
51 description='py.test plugin for testing Python 3.5+ Tornado code',
52 long_description=read('README.rst', 'CHANGES.rst'),
53 keywords='testing py.test tornado',
54 author='Calvin Smith',
55 author_email='[email protected]',
56 packages=find_packages(where="src"),
57 package_dir={"": "src"},
58 platforms='any',
59 cmdclass={'test': PyTest},
60 install_requires=_reqs,
61 tests_require=_reqs,
62 test_suite='test',
63 entry_points={
64 'pytest11': ['tornado = pytest_tornasync.plugin'],
65 },
66 classifiers=[
67 'Programming Language :: Python :: 3 :: Only',
68 'License :: OSI Approved :: MIT License',
69 'Environment :: Console',
70 'Development Status :: 3 - Alpha',
71 'Intended Audience :: Developers',
72 'Framework :: Pytest',
73 'Topic :: Software Development :: Testing',
74 ] + [
75 ("Programming Language :: Python :: %s" % x)
76 for x in "3 3.5 3.6 3.7".split()
77 ]
78 )