forked from elliterate/capybara.py
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
70 lines (55 loc) · 2.08 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
import os
from setuptools import setup, find_packages
import sys
tests_require = ["flask", "lxml", "pytest >= 3", "selenium < 3", "werkzeug"]
if sys.version_info < (3, 3):
tests_require.append("mock")
def read(filename):
"""
Returns the contents of the given package file.
Args:
filename (str): The name of the file to read, relative to the current
directory.
Returns:
str: The contents of the given package file.
"""
path = os.path.join(os.path.dirname(__file__), filename)
with open(path) as f:
return f.read()
def get_version():
""" str: The package version. """
global_vars = {}
# Compile and execute the individual file to prevent
# the package from being automatically loaded.
source = read(os.path.join("capybara", "version.py"))
code = compile(source, "version.py", "exec")
exec(code, global_vars)
return global_vars['__version__']
setup(
name="capybara-py",
version=get_version(),
description="Acceptance test framework for web applications",
long_description=read("README.rst"),
url="https://github.com/elliterate/capybara.py",
author="Ian Lesperance",
author_email="[email protected]",
license="MIT",
keywords="capybara",
classifiers=[
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Intended Audience :: Information Technology",
"License :: OSI Approved :: MIT License",
"Natural Language :: English",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3.5",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Software Development :: Quality Assurance",
"Topic :: Software Development :: Testing"],
packages=find_packages(exclude=["tests", "tests.*", "*.tests.*", "*.tests"]),
install_requires=["xpath-py >= 0.0.4"],
setup_requires=["pytest-runner"],
tests_require=tests_require,
extras_require={
# Expose test dependencies for external scripts, like pip.
"test": tests_require})