-
-
Notifications
You must be signed in to change notification settings - Fork 49
/
Copy pathsetup.py
112 lines (99 loc) · 3.25 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
111
112
# 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__)
__README_CONTENTS__ = open("README.md").read()
# mandatory requirements for the radish base features
requirements = [
"docopt",
"pysingleton",
"colorful>=0.3.11",
"tag-expressions>=2.0.0",
"parse_type>0.4.0",
"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"),
long_description=__README_CONTENTS__,
long_description_content_type="text/markdown",
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"]},
python_requires=">=3",
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 :: 6 - Mature",
"Environment :: Console",
"Intended Audience :: Developers",
"Intended Audience :: Education",
"Intended Audience :: Other Audience",
"License :: OSI Approved :: MIT License",
"Natural Language :: English",
"Operating System :: OS Independent",
"Operating System :: MacOS :: MacOS X",
"Operating System :: Microsoft :: Windows",
"Operating System :: POSIX",
"Operating System :: POSIX :: Linux",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: Implementation",
"Topic :: Education :: Testing",
"Topic :: Software Development",
"Topic :: Software Development :: Testing",
],
)