forked from HypothesisWorks/hypothesis
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
79 lines (63 loc) · 2.33 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
# coding=utf-8
# Copyright (C) 2013-2015 David R. MacIver (david@drmaciver.com)
# This file is part of Hypothesis (https://github.com/DRMacIver/hypothesis)
# This Source Code Form is subject to the terms of the Mozilla Public License,
# v. 2.0. If a copy of the MPL was not distributed with this file, You can
# obtain one at http://mozilla.org/MPL/2.0/.
# END HEADER
from distutils.core import setup
from setuptools.command.test import test as TestCommand
from setuptools import find_packages
import sys
import os
def local_file(name):
return os.path.join(os.path.dirname(__file__), name)
SOURCE = local_file("src")
README = local_file("README.rst")
# Assignment to placate pyflakes. The actual version is from the exec that
# follows.
__version__ = None
with open(local_file("src/hypothesis/version.py")) as o:
exec(o.read())
assert __version__ is not None
class PyTest(TestCommand):
def finalize_options(self):
TestCommand.finalize_options(self)
self.test_args = ["tests"]
self.test_suite = True
def run_tests(self):
import pytest
errno = pytest.main(self.test_args)
sys.exit(errno)
setup(
name='hypothesis',
version=__version__,
author='David R. MacIver',
author_email='david@drmaciver.com',
packages=find_packages(SOURCE),
package_dir={"": SOURCE},
url='https://github.com/DRMacIver/hypothesis',
license='MPL v2',
description='A library for property based testing',
zip_safe=False,
classifiers=[
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)",
"Operating System :: Unix",
"Operating System :: POSIX",
"Operating System :: Microsoft :: Windows",
"Programming Language :: Python",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3.2",
"Programming Language :: Python :: 3.3",
"Programming Language :: Python :: 3.4",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
"Topic :: Software Development :: Testing",
],
long_description=open(README).read(),
tests_require=[
'pytest', 'flake8'],
cmdclass={'test': PyTest},
)