Python Forum
how to download a tarball on github? - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: General (https://python-forum.io/forum-1.html)
+--- Forum: News and Discussions (https://python-forum.io/forum-31.html)
+--- Thread: how to download a tarball on github? (/thread-6003.html)

Pages: 1 2


how to download a tarball on github? - Skaperen - Nov-01-2017

does anyone here in the bar know where/how to download a tarball (as opposed to a zip file) of a package/project on github?


RE: how to download a tarball on github? - Larz60+ - Nov-01-2017

Here's something that apparently will create one if one is not offered.
git archive --format=tar --prefix=git-1.4.0/ v1.4.0 | gzip >git-1.4.0.tar.gz
pypi has links to the tarballs that exist. Many are just zip files

To create a json file with package information, use:
https://pypi.python.org/pypi/<packagename>/json



RE: how to download a tarball on github? - Skaperen - Nov-01-2017

so it sends uncompressed .tar and you can compress it?  i hope it's not send a zip and converting that to to format.  i am thinking of using github but i know some of my packages won't work via zip (it messes up permissions).

got this:

Output:
lt1/forums /home/forums 1> git archive --format=tar --prefix=git-1.4.0/ v1.4.0 | gzip >git-1.4.0.tar.gz fatal: Not a git repository (or any parent up to mount point /home) Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set). lt1/forums /home/forums 2>



RE: how to download a tarball on github? - nilamo - Nov-02-2017

I don't think github compresses anything.  The individual project would need to have uploaded a tar.


RE: how to download a tarball on github? - metulburr - Nov-02-2017

I would actually consider this a discussion rather than a bar thread. Bar i am thinking of nothing to do with programming or even computers even. Where downloading from github has some relativity to python. So i think discussions would be better suited.


RE: how to download a tarball on github? - Skaperen - Nov-02-2017

(Nov-02-2017, 02:14 AM)metulburr Wrote: I would actually consider this a discussion rather than a bar thread. Bar i am thinking of nothing to do with programming or even computers even. Where downloading from github has some relativity to python. So i think discussions would be better suited.
i chose bar because it was off-topic.  sure, many python coders may be interested.  the git command does not appear to be implemented in python, either.


RE: how to download a tarball on github? - metulburr - Nov-02-2017

git is so entwined with coding though. And discussion is not discussion about python, but general coding.
but yeah i guess it could go on the fence here


RE: how to download a tarball on github? - Skaperen - Nov-02-2017

anyway, Larz's command didn't work for me


RE: how to download a tarball on github? - snippsat - Nov-02-2017

Doc
Example with TextBlob
λ curl -L https://github.com/sloria/TextBlob/tarball/master > TextBlob.tar.gz
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 130 0 130 0 0 209 0 --:--:-- --:--:-- --:--:-- 220
100 667k 100 667k 0 0 340k 0 0:00:01 0:00:01 --:--:-- 1039k
I have never used this method,if need a Repo i always use git clone.
λ git clone https://github.com/sloria/TextBlob.git
Cloning into 'TextBlob'...
remote: Counting objects: 3499, done.
remote: Total 3499 (delta 0), reused 0 (delta 0), pack-reused 3499R
Receiving objects: 100% (3499/3499), 7.89 MiB | 2.61 MiB/s, done.
Resolving deltas: 100% (1907/1907), done.
Checking connectivity... done.



RE: how to download a tarball on github? - Larz60+ - Nov-02-2017

The first part of my answer was bogus (sorry about that). The second part will give you a json file with details of a package.
In that json data, you'll find release data, which can be contains filename keys, with: filename    "speech-0.4.6.tar.gz"
for example. In that node, you will find a url tag containing the complete url for the tar file.
There's a page with developer info here: https://wiki.python.org/moin/CheeseShopDev