Skip to content

Commit

Permalink
Update script for misisng wheels (does not check versions)
Browse files Browse the repository at this point in the history
  • Loading branch information
bolkedebruin authored and mistercrunch committed Oct 21, 2015
1 parent c939ec6 commit 685f545
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 deletions.
17 changes: 17 additions & 0 deletions scripts/ci/wheel_factory.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/usr/bin/env python
import requirements
import argparse
import glob
import os

parser = argparse.ArgumentParser()
parser.add_argument('file', help="requirements.txt", type=str)
parser.add_argument('wheeldir', help="wheeldir location", type=str)

args = parser.parse_args()

req_file = open(args.file, 'r')

for req in requirements.parse(req_file):
if not glob.glob(args.wheeldir + os.path.pathsep + req.name + "*.whl"):
os.system("pip wheel --wheel-dir=" + args.wheeldir + " " + req.name + "".join(req.specs) + "".join(req.extras))
4 changes: 2 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ find_links =

[testenv]
deps = wheel
--find-links=~/.wheelhouse --no-index -rrequirements.txt

requirements-parser
setenv =
cdh: HADOOP_DISTRO=cdh
cdh: HADOOP_HOME=/tmp/hadoop-cdh
Expand All @@ -29,6 +28,7 @@ setenv =
hdp: PIP_FIND_LINKS="$PIP_WHEEL_DIR"
passenv = USER JAVA_HOME
commands =
{toxinidir}/scripts/ci/wheel_factory.py {toxinidir}/requirements.txt ~/.wheelhouse
pip install --find-links=~/.wheelhouse --no-index -rrequirements.txt
{toxinidir}/scripts/ci/setup_kdc.sh
{toxinidir}/scripts/ci/setup_env.sh
Expand Down

0 comments on commit 685f545

Please sign in to comment.