allow main script to run under virtualenv
ClosedPublic

Authored by kparal on Oct 14 2014, 2:01 PM.

Details

Summary

Don't hardcode python binary path, use env instead.

Test Plan

Before the patch:

(env_taskotron) kparal@medusa ~/devel/taskotron/task-depcheck (master)
$ ./run_depcheck.py -h
Traceback (most recent call last):
  File "./run_depcheck.py", line 8, in <module>
    import depcheck
  File "/home/kparal/devel/taskotron/task-depcheck/depcheck/__init__.py", line 43, in <module>
    from . import squash_results
  File "/home/kparal/devel/taskotron/task-depcheck/depcheck/squash_results.py", line 7, in <module>
    from libtaskotron.koji_utils import KojiClient
ImportError: No module named libtaskotron.koji_utils

After the patch:

$ ./run_depcheck.py -h
usage: run_depcheck.py [-h] [-a {i386,x86_64,armhfp}] [-r REPOS [REPOS ...]]
                       [-f {rpms,updates}]
                       rpm [rpm ...]

positional arguments:
  rpm                   RPM to be tested

optional arguments:
  -h, --help            show this help message and exit
  -a {i386,x86_64,armhfp}, --arch {i386,x86_64,armhfp}
                        Architecture to be tested; support arches are x86,
                        x86_64, and armhfp. If omitted, defaults to current
                        machine architecture.
  -r REPOS [REPOS ...], --repos REPOS [REPOS ...]
                        Repo to be tested against, in the form of
                        reponame:repolocation where repolocation can be local
                        (in the form /dir/of/repo) or remote (direct link or
                        standard metalink), to be tested against.
  -f {rpms,updates}, --format {rpms,updates}
                        Specify output format to override configuration

Diff Detail

Repository
rDEPCK task-depcheck
Lint
Lint Skipped
Unit
Unit Tests Skipped
kparal retitled this revision from to allow main script to run under virtualenv.Oct 14 2014, 2:01 PM
kparal updated this object.
kparal edited the test plan for this revision. (Show Details)
kparal added a reviewer: tflink.
tflink accepted this revision.Oct 14 2014, 2:06 PM

LGTM

This revision is now accepted and ready to land.Oct 14 2014, 2:06 PM
kparal closed this revision.Oct 14 2014, 2:37 PM
kparal updated this revision to Diff 695.

Closed by commit rDEPCK97f1dc64074b (authored by @kparal).