Skip to content
This repository was archived by the owner on Mar 8, 2020. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 16 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@
# The VERSION line is edited automatically during deployments.
# You may change the contents of the string, but do not otherwise edit the line.
VERSION = "3.x.x-dev"
LIBUAST_VERSION = "v3.3.0"
LIBUAST_ARCH = "linux-amd64"
LIBUAST_VERSION = "v3.3.1"
SDK_V1_VERSION = "v1.17.0"
SDK_V1_MAJOR = SDK_V1_VERSION.split('.')[0]
SDK_V2_VERSION = "v2.16.4"
Expand Down Expand Up @@ -132,6 +131,18 @@ def create_inits(sdk_major):
open(f, "w").close()


def get_libuast_arch():
"""Return the os-arch tag to use when fetching libuast.
"""

# See https://github.com/bblfsh/client-python/issues/156.
if sys.platform == 'win32':
return 'windows-amd64'
elif sys.platform:
return sys.platform + '-amd64'
return 'linux-amd64'


def get_libuast():
if not GET_LIBUAST:
return
Expand All @@ -141,8 +152,9 @@ def get_libuast():
mkdir(local_libuast)

# Retrieve libuast
untar_url("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/bblfsh/libuast/releases/download/%s/libuast-%s.tar.gz" % (LIBUAST_VERSION, LIBUAST_ARCH))
mv(LIBUAST_ARCH, local_libuast)
untar_url("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/bblfsh/libuast/releases/download/%s/libuast-%s.tar.gz" % (
LIBUAST_VERSION, get_libuast_arch()))
mv(get_libuast_arch(), local_libuast)


def proto_download_v1():
Expand Down