5 from distutils.command.build import build
6 from distutils.core import setup
7 from setuptools import find_packages
8 from setuptools.command.test import test as TestCommand
9 from subprocess import call
12 class PyTest (TestCommand):
13 user_options = [("pytest-args=", "a", "Arguments to pass to py.test")]
15 def initialize_options (self):
16 TestCommand.initialize_options (self)
19 def finalize_options (self):
20 TestCommand.finalize_options (self)
22 self.test_suite = True
25 # import here, cause outside the eggs aren't loaded
27 sys.exit (pytest.main (self.pytest_args))
30 class UpdateVersion (build):
35 call (["make", "build/crypto-install"])
37 self.execute (compile, [], "Updating version")
40 setup (name = "crypto_install",
42 scripts = ["crypto-install"],
43 install_requires = [],
44 tests_require = ["pytest"],
47 "build": UpdateVersion