setup: has_ext_modules always returns false when pure is specified
When pure is specified ext_modules is emptied in hgbuildpy.finalize_options.
Before this happens has_ext_modules returned True.
--- a/setup.py Sat Jul 23 05:57:39 2011 +0200
+++ b/setup.py Tue Nov 01 20:13:52 2011 +0100
@@ -229,6 +229,11 @@
"code instead of C extensions"),
]
+ def has_ext_modules(self):
+ # self.ext_modules is emptied in hgbuildpy.finalize_options which is
+ # too late for some cases
+ return not self.pure and Distribution.has_ext_modules(self)
+
class hgbuildext(build_ext):
def build_extension(self, ext):