forked from radish-bdd/radish
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
110 lines (97 loc) · 3.28 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
# -*- coding: utf-8 -*-
# pylint: disable=missing-docstring
import os
import re
import codecs
from setuptools import setup, find_packages
def read_metafile(path):
"""
Read contents from given metafile
"""
with codecs.open(path, 'rb', 'utf-8') as f:
return f.read()
def get_meta(name):
"""
Get some metdata with the give name from the
Meta file
"""
meta_match = re.search(
r"^__{meta}__ = ['\"]([^'\"]*)['\"]".format(meta=name.upper()),
__META_DATA__, re.M
)
if not meta_match:
raise RuntimeError('Unable to find __{0}__ string.'.format(name))
return meta_match.group(1)
__META_FILE__ = os.path.join('radish', '__init__.py')
__META_DATA__ = read_metafile(__META_FILE__)
# mandatory requirements for the radish base features
requirements = [
'docopt',
'pysingleton',
'colorful>=0.3.11',
'tag-expressions>=1.0.0',
# FIXME(TF): this is a forked repository with
# the parse version included we need.
# change to upstream parse_type asap.
'radish-parse_type>0.3.4',
'humanize'
]
# optional requirements used by extensions which are
# disabled by default
extra_requirements = {
'bddxml': ['lxml'],
'ipython-debugger': ['ipython'],
'coverage': ['coverage'],
'testing': ['PyYAML']
}
setup(
name='radish-bdd',
version=get_meta('version'),
license=get_meta('license'),
description=get_meta('description'),
author=get_meta('author'),
author_email=get_meta('author_email'),
maintainer=get_meta('author'),
maintainer_email=get_meta('author_email'),
platforms=['Linux', 'Windows', 'MAC OS X'],
url=get_meta('url'),
download_url=get_meta('download_url'),
bugtrack_url=get_meta('bugtrack_url'),
packages=find_packages(),
package_data={'': ['radish/languages/*', '*.md']},
install_requires=requirements,
extras_require=extra_requirements,
include_package_data=True,
entry_points={
'console_scripts': [
'radish = radish.main:main',
'radish-test = radish.testing.__main__:main [testing]',
]},
classifiers=[
'Development Status :: 4 - Beta',
'Environment :: Console',
'Intended Audience :: Developers',
'Intended Audience :: Education',
'Intended Audience :: Other Audience',
'License :: OSI Approved :: MIT License',
'Natural Language :: English',
'Operating System :: MacOS :: MacOS X',
'Operating System :: OS Independent',
'Operating System :: Microsoft :: Windows',
'Operating System :: Microsoft :: Windows :: Windows 7',
'Operating System :: Microsoft :: Windows :: Windows XP',
'Operating System :: POSIX',
'Operating System :: POSIX :: Linux',
'Programming Language :: Python',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: Implementation',
'Topic :: Education :: Testing',
'Topic :: Software Development',
'Topic :: Software Development :: Testing'
],
)