From 38b45919b55617801d6297e1f32d60523479e71d Mon Sep 17 00:00:00 2001 From: Dan Liew Date: Mon, 7 Dec 2015 07:38:24 +0000 Subject: [PATCH] Unbreak running ``make install``. The python ``site-package`` directory was not created before trying to create files in it. The ``install_deps()`` method was also dead. It looks like that should have been named ``mk_install_deps()`` but even if we give it the right name it does the wrong thing. That method is supposed emit target names (i.e. dependencies) not commands. --- scripts/mk_util.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts/mk_util.py b/scripts/mk_util.py index 100199156..9c3bae270 100644 --- a/scripts/mk_util.py +++ b/scripts/mk_util.py @@ -1300,9 +1300,13 @@ class DLLComponent(Component): dllfile = '%s$(SO_EXT)' % self.dll_name dllInstallPath = os.path.join(INSTALL_LIB_DIR, dllfile) MakeRuleCmd.install_files(out, dllfile, dllInstallPath) + # FIXME: This belongs in ``PythonInstallComponent`` but + # it currently doesn't have access to this component so + # it can't emit these rules if not is_python_install_enabled(): return pythonPkgDirWithoutPrefix = strip_path_prefix(PYTHON_PACKAGE_DIR, PREFIX) + MakeRuleCmd.make_install_directory(out, pythonPkgDirWithoutPrefix) if IS_WINDOWS: MakeRuleCmd.install_files(out, dllfile, os.path.join(pythonPkgDirWithoutPrefix, dllfile)) else: @@ -1349,14 +1353,10 @@ class PythonInstallComponent(Component): def main_component(self): return False - def install_deps(self, out): - if not is_python_install_enabled(): - return - MakeRuleCmd.make_install_directory(out, self.pythonPkgDirWithoutPrefix) - def mk_install(self, out): if not is_python_install_enabled(): return + MakeRuleCmd.make_install_directory(out, self.pythonPkgDirWithoutPrefix) MakeRuleCmd.install_files(out, 'z3*.py', self.pythonPkgDirWithoutPrefix) if sys.version >= "3": pythonPycacheDir = os.path.join(self.pythonPkgDirWithoutPrefix, '__pycache__')