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
16 class PyTest(TestCommand):
17 def finalize_options(self):
18 TestCommand.finalize_options(self)
20 self.test_suite = True
24 errcode = pytest.main(self.test_args)
28 def find_version(fname):
29 '''Attempts to find the version number in the file names fname.
30 Raises RuntimeError if not found.
33 with open(fname, 'r') as fp:
34 reg = re.compile(r'__version__ = [\'"]([^\'"]*)[\'"]')
41 raise RuntimeError('Cannot find version information')
44 __version__ = find_version("anteater/main.py")
48 with open(fname) as fp:
55 description='anteater',
56 long_description=read("README.md"),
58 author_email='lhinds@redhat.com',
59 url='https://gerrit.opnfv.org/gerrit/gitweb?p=releng-anteater.git',
60 install_requires=REQUIRES,
61 license=read("LICENSE"),
65 'Development Status :: 2 - Pre-Alpha',
66 'Intended Audience :: Developers',
67 'License :: OSI Approved :: Apache Software License',
68 'Natural Language :: English',
69 "Programming Language :: Python :: 2",
70 'Programming Language :: Python :: 2.7',
71 "Programming Language :: Python :: 3",
72 'Programming Language :: Python :: 3.4',
73 'Programming Language :: Python :: Implementation :: CPython',
74 'Programming Language :: Python :: Implementation :: PyPy'
76 packages=find_packages(),
79 "anteater = anteater.main:main"
82 tests_require=['pytest'],
83 cmdclass={'test': PyTest}