summaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2020-04-18 19:13:27 +0100
committerMichael Williamson <mike@zwobble.org>2020-04-18 19:13:27 +0100
commitd7d0c55df6cbfaf4321f65c0a15643062412ad30 (patch)
treed9c39d37c2011ce32d0858a2718c31dc8595ad74 /setup.py
parent1d73d0a074b121e5537bc9ec267ec7bc07e90082 (diff)
Use correct lib dir in _download_tarball()
Diffstat (limited to 'setup.py')
-rw-r--r--setup.py12
1 files changed, 8 insertions, 4 deletions
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("."))