Skip to content

Commit

Permalink
Merge pull request #769 from snipsco/fix/resources-direct-download
Browse files Browse the repository at this point in the history
Fix issue with egg fragments in download cli
  • Loading branch information
adrienball authored Mar 11, 2019
2 parents 020906f + 7947c88 commit 7886f8d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion snips_nlu/cli/download.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,11 @@ def download(resource_name, direct=False,
*pip_args): # pylint:disable=keyword-arg-before-vararg
"""Download compatible language resources"""
if direct:
url_tail = '{r}/{r}.tar.gz#egg={r}'.format(r=resource_name)
components = resource_name.split("-")
name = "".join(components[:-1])
version = components[-1]
url_tail = '{n}-{v}/{n}-{v}.tar.gz#egg={n}=={v}'.format(
n=name, v=version)
download_url = __about__.__download_url__ + '/' + url_tail
dl = install_remote_package(download_url, pip_args)
if dl != 0:
Expand Down

0 comments on commit 7886f8d

Please sign in to comment.