Provide input at thread start.
[crypto-install.git] / setup.py
1 #!/usr/bin/env python
2
3 import sys
4
5 from distutils.core import setup
6 from setuptools import find_packages
7 from setuptools.command.test import test as TestCommand
8
9
10 class PyTest (TestCommand):
11     user_options = [("pytest-args=", "a", "Arguments to pass to py.test")]
12
13     def initialize_options (self):
14         TestCommand.initialize_options (self)
15         self.pytest_args = []
16
17     def finalize_options (self):
18         TestCommand.finalize_options (self)
19         self.test_args = []
20         self.test_suite = True
21
22     def run_tests (self):
23         # import here, cause outside the eggs aren't loaded
24         import pytest
25         sys.exit (pytest.main (self.pytest_args))
26
27
28 setup (name = "crypto_install",
29        version = "0.0.1",
30        scripts = ["crypto-install"],
31        install_requires = [],
32        tests_require = ["pytest"],
33        cmdclass = {"test": PyTest})