summaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
authorSebastian Ramacher <s.ramacher@gmx.at>2011-10-29 18:20:01 +0200
committerDwayne C. Litzenberger <dlitz@dlitz.net>2011-11-04 15:01:30 -0400
commit6a62dc30067bd359660d5b586d3337560d2dc0d5 (patch)
treeefe687ae5516d3f1d05344b642129678917e4a06 /setup.py
parentfb29a28275e3a693566c936af6b7fae6e4b253e4 (diff)
downloadpycrypto-6a62dc30067bd359660d5b586d3337560d2dc0d5.tar.gz
Run build_configure from build_ext.
When installing with easy_install build_ext ist called directly. Thus we have to ensure that build_configure is run before we're building the extensions in build_ext.
Diffstat (limited to 'setup.py')
-rw-r--r--setup.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/setup.py b/setup.py
index 0f1ef01..a822938 100644
--- a/setup.py
+++ b/setup.py
@@ -287,12 +287,17 @@ class PCTBuildExt (build_ext):
f.close()
return result
-class PCTBuild(build):
+ def run(self):
+ for cmd_name in self.get_sub_commands():
+ self.run_command(cmd_name)
+
+ build_ext.run(self)
+
def has_configure(self):
compiler = new_compiler(compiler=self.compiler)
return compiler.compiler_type != 'msvc'
- sub_commands = [ ('build_configure', has_configure) ] + build.sub_commands
+ sub_commands = [ ('build_configure', has_configure) ] + build_ext.sub_commands
class PCTBuildConfigure(Command):
description = "Generate config.h using ./configure (autoconf)"
@@ -384,7 +389,7 @@ kw = {'name':"pycrypto",
'author_email':"dlitz@dlitz.net",
'url':"http://www.pycrypto.org/",
- 'cmdclass' : {'build': PCTBuild, 'build_configure': PCTBuildConfigure, 'build_ext':PCTBuildExt, 'build_py': PCTBuildPy, 'test': TestCommand },
+ 'cmdclass' : {'build_configure': PCTBuildConfigure, 'build_ext': PCTBuildExt, 'build_py': PCTBuildPy, 'test': TestCommand },
'packages' : ["Crypto", "Crypto.Hash", "Crypto.Cipher", "Crypto.Util",
"Crypto.Random",
"Crypto.Random.Fortuna",