Commit 055ffef4 authored by Rafael Monnerat's avatar Rafael Monnerat

OBS: better download of source egg

Unfortunately, pip download is no good at downloading only. It always want to instal the egg which is not feasible (see this issue https://github.com/pypa/pip/issues/1884).

Fixup for 6e5b4d76
parent 6e5b4d76
......@@ -52,8 +52,9 @@ do
package=${f%%-*}
version=${f#*-}
version=${version%%-*}
echo "Fetching $package at version $version"
pip download --no-binary :all: $package==$version
url=$(python3 $CURRENT_DIRECTORY/pypi_download.py $package $version)
echo "Fetching $package at version $version (at $url)"
wget $url
rm $f
done
cd -
......
#!/usr/bin/python3
from pypi_simple import PyPISimple
import argparse
parser = argparse.ArgumentParser()
parser.add_argument("egg")
parser.add_argument("version")
args = parser.parse_args()
with PyPISimple() as client:
page = client.get_project_page(args.egg)
for pkg in page.packages:
#print(pkg.version)
#print(pkg)
if pkg.version == args.version and pkg.package_type == 'sdist':
print(pkg.url)
exit()
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment