From 41d7ab3aa6a7165ec969fd62b428c938d7396ea1 Mon Sep 17 00:00:00 2001 From: Thomas Nagy Date: Mon, 26 Sep 2011 02:37:05 +0200 Subject: [PATCH] #1045, disable the .py file installation when setting install_path=None --- waflib/Tools/python.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/waflib/Tools/python.py b/waflib/Tools/python.py index 3da9c894..07af7271 100644 --- a/waflib/Tools/python.py +++ b/waflib/Tools/python.py @@ -64,7 +64,10 @@ def process_py(self, node): except: return - if not getattr(self, 'install_path', None): + try: + if not self.install_path: + return + except AttributeError: self.install_path = '${PYTHONDIR}' # i wonder now why we wanted to do this after the build is over @@ -136,7 +139,10 @@ def init_pyext(self): Change the values of *cshlib_PATTERN* and *cxxshlib_PATTERN* to remove the *lib* prefix from library names. """ - if not getattr(self, 'install_path', None): + try: + if not self.install_path: + return + except AttributeError: self.install_path = '${PYTHONARCHDIR}' self.uselib = self.to_list(getattr(self, 'uselib', [])) if not 'PYEXT' in self.uselib: