-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathsetup.py
executable file
·49 lines (44 loc) · 1.37 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
#!/usr/bin/env python
import sys, subprocess
from distutils.core import setup, Command
import versioneer
versioneer.VCS = "git"
versioneer.versionfile_source = "spake2/_version.py"
versioneer.versionfile_build = versioneer.versionfile_source
versioneer.tag_prefix = "v"
versioneer.parentdir_prefix = "python-spake2-"
cmdclass = {}
cmdclass.update(versioneer.get_cmdclass())
class Test(Command):
description = "run unit tests"
user_options = []
boolean_options = []
def initialize_options(self):
pass
def finalize_options(self):
pass
def run(self):
for t in ["spake2/test_spake2.py",
]:
rc = self.do_test(t)
if rc != 0:
sys.exit(rc)
def do_test(self, which):
print "======= running %s" % which
p = subprocess.Popen([sys.executable, which])
rc = p.wait()
if rc != 0:
print >>sys.stderr, "Test (%s) FAILED" % which
print "== finished %s" % which
return rc
cmdclass["test"] = Test
setup(name="spake2",
version=versioneer.get_version(),
description="SPAKE2 password-authenticated key exchange (pure python)",
author="Brian Warner",
author_email="warner-pyspake2@lothar.com",
url="http://github.com/warner/python-spake2",
packages=["spake2"],
license="MIT",
cmdclass=cmdclass,
)