pytest-bdd/setup.py

77 lines
2.2 KiB
Python
Raw Normal View History

2014-07-24 23:38:42 +08:00
"""pytest-bdd package config."""
2014-06-11 03:58:24 +08:00
import codecs
import os
2013-05-01 20:03:28 +08:00
import sys
2013-04-03 13:57:31 +08:00
2013-05-01 20:03:28 +08:00
from setuptools import setup
from setuptools.command.test import test as TestCommand
2013-04-03 13:57:31 +08:00
2014-06-12 05:28:54 +08:00
import pytest_bdd
2013-08-18 08:21:11 +08:00
2013-04-03 13:57:31 +08:00
class Tox(TestCommand):
2014-07-24 23:38:42 +08:00
""""Custom setup.py test command implementation using tox runner."""
2013-04-03 13:57:31 +08:00
def finalize_options(self):
2013-05-01 20:03:28 +08:00
TestCommand.finalize_options(self)
2014-07-25 01:22:24 +08:00
self.test_args = ['--recreate -vv']
2013-05-01 20:03:28 +08:00
self.test_suite = True
2013-04-03 13:57:31 +08:00
2013-05-01 20:03:28 +08:00
def run_tests(self):
#import here, cause outside the eggs aren't loaded
2014-01-29 19:28:30 +08:00
import detox.main
errno = detox.main.main(self.test_args)
2013-05-01 20:03:28 +08:00
sys.exit(errno)
2013-03-31 09:03:40 +08:00
dirname = os.path.dirname(__file__)
long_description = (
2014-06-11 03:58:24 +08:00
codecs.open(os.path.join(dirname, 'README.rst'), encoding='utf-8').read() + '\n' +
codecs.open(os.path.join(dirname, 'CHANGES.rst'), encoding='utf-8').read()
)
2013-03-31 09:03:40 +08:00
setup(
2013-03-31 16:37:53 +08:00
name='pytest-bdd',
2013-03-31 09:03:40 +08:00
description='BDD for pytest',
long_description=long_description,
2013-04-09 05:30:23 +08:00
author='Oleg Pidsadnyi',
2013-06-16 21:52:20 +08:00
license='MIT license',
2014-06-12 05:51:47 +08:00
author_email='oleg.pidsadnyi@gmail.com',
2013-06-16 22:15:28 +08:00
url='https://github.com/olegpidsadnyi/pytest-bdd',
2014-06-12 05:28:54 +08:00
version=pytest_bdd.__version__,
2013-06-16 21:52:20 +08:00
classifiers=[
'Development Status :: 6 - Mature',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Operating System :: POSIX',
'Operating System :: Microsoft :: Windows',
'Operating System :: MacOS :: MacOS X',
'Topic :: Software Development :: Testing',
'Topic :: Software Development :: Libraries',
'Topic :: Utilities',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 3'
] + [('Programming Language :: Python :: %s' % x) for x in '2.6 2.7 3.0 3.1 3.2 3.3'.split()],
cmdclass={'test': Tox},
2013-03-31 09:03:40 +08:00
install_requires=[
2014-07-25 00:06:10 +08:00
'pytest>=2.6.0',
2013-03-31 09:03:40 +08:00
],
2013-05-28 23:11:47 +08:00
# the following makes a plugin available to py.test
2013-06-16 21:52:20 +08:00
entry_points={
2013-05-28 23:11:47 +08:00
'pytest11': [
'pytest-bdd = pytest_bdd.plugin',
2014-04-09 06:40:30 +08:00
'pytest-bdd-cucumber-json = pytest_bdd.cucumber_json',
2014-03-14 20:20:43 +08:00
],
'console_scripts': [
2014-03-14 20:36:36 +08:00
'pytestbdd_migrate_tests = pytest_bdd.scripts:migrate_tests [migrate]'
2013-05-28 23:11:47 +08:00
]
},
2014-01-29 19:28:30 +08:00
tests_require=['detox'],
2014-03-14 20:36:36 +08:00
extras_require={
'migrate': ['glob2']
},
2013-04-07 08:24:43 +08:00
packages=['pytest_bdd'],
2013-03-31 09:03:40 +08:00
)