Debian Codegraph @

setup.py

raw ◀ ▶
Source reconstructed at patch state 0 of 1 — not the installed (fully patched) source.
1 Debian patch touch this file
1 # -*- coding: utf-8 -*
2 """
3 Setup script for behave.
4
5 USAGE:
6 python setup.py install
7 python setup.py behave_test # -- XFAIL on Windows (currently).
8 python setup.py nosetests
9 """
10
11 import sys
12 import os.path
13
14 HERE0 = os.path.dirname(__file__) or os.curdir
15 os.chdir(HERE0)
16 HERE = os.curdir
17 sys.path.insert(0, HERE)
18
19 from setuptools import find_packages, setup
20 from setuptools_behave import behave_test
21
22 # -----------------------------------------------------------------------------
23 # CONFIGURATION:
24 # -----------------------------------------------------------------------------
25 python_version = float("%s.%s" % sys.version_info[:2])
26 BEHAVE = os.path.join(HERE, "behave")
27 README = os.path.join(HERE, "README.rst")
28 description = "".join(open(README).readlines()[4:])
29
30 # -----------------------------------------------------------------------------
31 # UTILITY:
32 # -----------------------------------------------------------------------------
33 def find_packages_by_root_package(where):
34 """
35 Better than excluding everything that is not needed,
36 collect only what is needed.
37 """
38 root_package = os.path.basename(where)
39 packages = [ "%s.%s" % (root_package, sub_package)
40 for sub_package in find_packages(where)]
41 packages.insert(0, root_package)
42 return packages
43
44
45 # -----------------------------------------------------------------------------
46 # SETUP:
47 # -----------------------------------------------------------------------------
48 setup(
49 name="behave",
50 version="1.2.6",
51 description="behave is behaviour-driven development, Python style",
52 long_description=description,
53 author="Jens Engel, Benno Rice and Richard Jones",
54 author_email="[email protected]",
55 url="http://github.com/behave/behave",
56 provides = ["behave", "setuptools_behave"],
57 packages = find_packages_by_root_package(BEHAVE),
58 py_modules = ["setuptools_behave"],
59 entry_points={
60 "console_scripts": [
61 "behave = behave.__main__:main"
62 ],
63 "distutils.commands": [
64 "behave_test = setuptools_behave:behave_test"
65 ]
66 },
67 # -- REQUIREMENTS:
68 # SUPPORT: python2.6, python2.7, python3.3 (or higher)
69 python_requires=">=2.6, !=3.0.*, !=3.1.*, !=3.2.*",
70 install_requires=[
71 "parse >= 1.8.2",
72 "parse_type >= 0.4.2",
73 "six >= 1.11",
74 "argparse; python_version < '2.7'",
75 "importlib; python_version < '2.7'",
76 "ordereddict; python_version < '2.7'",
77 "traceback2; python_version < '3.0'",
78 "enum34; python_version < '3.4'",
79 # PREPARED: "win_unicode_console; python_version < '3.6'",
80 # PREPARED: "colorama",
81 ],
82 test_suite="nose.collector",
83 tests_require=[
84 "pytest >= 3.0",
85 "nose >= 1.3",
86 "mock >= 1.1",
87 "PyHamcrest >= 1.8",
88 "path.py >= 10.1"
89 ],
90 cmdclass = {
91 "behave_test": behave_test,
92 },
93 extras_require={
94 'docs': ["sphinx >= 1.6", "sphinx_bootstrap_theme >= 0.6"],
95 'develop': [
96 "coverage", "pytest >= 3.0", "pytest-cov", "tox",
97 "invoke >= 0.21.0", "path.py >= 8.1.2", "pycmd",
98 "pathlib", # python_version <= '3.4'
99 "modernize >= 0.5",
100 "pylint",
101 ],
102 },
103 # MAYBE-DISABLE: use_2to3
104 use_2to3= bool(python_version >= 3.0),
105 license="BSD",
106 classifiers=[
107 "Development Status :: 4 - Beta",
108 "Environment :: Console",
109 "Intended Audience :: Developers",
110 "Operating System :: OS Independent",
111 "Programming Language :: Python :: 2",
112 "Programming Language :: Python :: 2.6",
113 "Programming Language :: Python :: 2.7",
114 "Programming Language :: Python :: 3",
115 "Programming Language :: Python :: 3.3",
116 "Programming Language :: Python :: 3.4",
117 "Programming Language :: Python :: 3.5",
118 "Programming Language :: Python :: 3.6",
119 "Programming Language :: Python :: Implementation :: CPython",
120 "Programming Language :: Python :: Implementation :: Jython",
121 "Programming Language :: Python :: Implementation :: PyPy",
122 "Topic :: Software Development :: Testing",
123 "License :: OSI Approved :: BSD License",
124 ],
125 zip_safe = True,
126 )
127
128