1 # -*- coding: utf-8 -*-
4 from setuptools.command.test import test as TestCommand
5 from setuptools import setup, find_packages
12 class PyTest(TestCommand):
13 def finalize_options(self):
14 TestCommand.finalize_options(self)
16 self.test_suite = True
20 errcode = pytest.main(self.test_args)
24 def find_version(fname):
25 '''Attempts to find the version number in the file names fname.
26 Raises RuntimeError if not found.
29 with open(fname, 'r') as fp:
30 reg = re.compile(r'__version__ = [\'"]([^\'"]*)[\'"]')
37 raise RuntimeError('Cannot find version information')
40 __version__ = find_version("anteater/anteater.py")
44 with open(fname) as fp:
51 description='anteater',
52 long_description=read("README.md"),
54 author_email='lhinds@redhat.com',
55 url='https://gerrit.opnfv.org/gerrit/gitweb?p=releng-anteater.git',
56 install_requires=REQUIRES,
57 license=read("LICENSE"),
61 'Development Status :: 2 - Pre-Alpha',
62 'Intended Audience :: Developers',
63 'License :: OSI Approved :: Apache Software License',
64 'Natural Language :: English',
65 "Programming Language :: Python :: 2",
66 'Programming Language :: Python :: 2.7',
67 'Programming Language :: Python :: Implementation :: CPython',
68 'Programming Language :: Python :: Implementation :: PyPy'
70 packages=find_packages(),
71 py_modules=["anteater"],
74 "anteater = anteater.anteater:main"
77 tests_require=['pytest'],
78 cmdclass={'test': PyTest}