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