summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Ramacher <sebastian@ramacher.at>2012-10-14 12:59:59 +0200
committerDwayne Litzenberger <dlitz@dlitz.net>2013-02-02 19:29:05 -0800
commitab110a4113f5e8672d80c5845178268774b7ea23 (patch)
treeca0c8f60c05e5e8da04e99af21443a54b70bcb39
parent48e2b718aeefb35caac8498cf4dbbd3a12e8ba83 (diff)
downloadpycrypto-ab110a4113f5e8672d80c5845178268774b7ea23.tar.gz
Add build to TestCommand's sub_commands
... and run the sub_commands in TestCommand.run. So if python setup.py test is executed before ever running the build target, the extension modules are built. Bug: https://bugs.launchpad.net/pycrypto/+bug/1055256 Bug: https://bugs.launchpad.net/pycrypto/+bug/976171
-rw-r--r--setup.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/setup.py b/setup.py
index 0334939..c36efc2 100644
--- a/setup.py
+++ b/setup.py
@@ -318,6 +318,10 @@ class TestCommand(Command):
self.config = {'slow_tests': not self.skip_slow_tests}
def run(self):
+ # Run sub commands
+ for cmd_name in self.get_sub_commands():
+ self.run_command(cmd_name)
+
# Run SelfTest
self.announce("running self-tests")
old_path = sys.path[:]
@@ -346,6 +350,8 @@ class TestCommand(Command):
# Run slower self-tests
self.announce("running extended self-tests")
+ sub_commands = [ ('build', None) ]
+
kw = {'name':"pycrypto",
'version':"2.6", # See also: lib/Crypto/__init__.py
'description':"Cryptographic modules for Python.",