From d7d0c55df6cbfaf4321f65c0a15643062412ad30 Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Sat, 18 Apr 2020 19:13:27 +0100 Subject: Use correct lib dir in _download_tarball() --- setup.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'setup.py') diff --git a/setup.py b/setup.py index a225565..0522778 100644 --- a/setup.py +++ b/setup.py @@ -70,7 +70,11 @@ class jq_build_ext(build_ext): ]) def _build_lib(self, source_url, tarball_path, lib_dir, commands): - self._download_tarball(source_url, tarball_path) + self._download_tarball( + source_url=source_url, + tarball_path=tarball_path, + lib_dir=lib_dir, + ) macosx_deployment_target = sysconfig.get_config_var("MACOSX_DEPLOYMENT_TARGET") if macosx_deployment_target: @@ -83,15 +87,15 @@ class jq_build_ext(build_ext): for command in commands: run_command(command) - def _download_tarball(self, source_url, tarball_path): + def _download_tarball(self, source_url, tarball_path, lib_dir): if os.path.exists(tarball_path): os.unlink(tarball_path) print("Downloading {}".format(source_url)) urlretrieve(source_url, tarball_path) print("Downloaded {}".format(source_url)) - if os.path.exists(jq_lib_dir): - shutil.rmtree(jq_lib_dir) + if os.path.exists(lib_dir): + shutil.rmtree(lib_dir) tarfile.open(tarball_path, "r:gz").extractall(dependency_path(".")) -- cgit v1.2.3