Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(869)

Side by Side Diff: recipe_modules/python/example.resources/test.py

Issue 2875823002: Add vpython support to Python recipe module. (Closed)
Patch Set: rebase Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 # Copyright 2017 The LUCI Authors. All rights reserved.
2 # Use of this source code is governed under the Apache License, Version 2.0
3 # that can be found in the LICENSE file.
4
5 import argparse
6 import os
7 import sys
8
9
10 def main():
11 parser = argparse.ArgumentParser()
12 parser.add_argument('--verify-enum34', action='store_true')
13 parser.add_argument('--verify-six', action='store_true')
14 opts = parser.parse_args()
15
16 if opts.verify_enum34:
17 import enum
18 assert enum.version == (1, 1, 6)
19 if opts.verify_six:
20 import six
21 assert six.__version__ == '1.10.0'
22 return 0
23
24
25 if __name__ == '__main__':
26 sys.exit(main())
27
28
29 ##
30 # Inline VirtualEnv "vpython" spec.
31 #
32 # Pick a test package with no dependencies from "/bootstrap/venv.cfg" that
33 # differs from the package in "test.vpython" file.
34 #
35 # This is used in "example.py" along with the "--verify-enum34" flag.
36 ##
37 # [VPYTHON:BEGIN]
38 #
39 # wheel: <
40 # name: "infra/python/wheels/enum34-py2"
41 # version: "version:1.1.6"
42 # >
43 #
44 # [VPYTHON:END]
45 ##
OLDNEW
« no previous file with comments | « recipe_modules/python/example.expected/basic.json ('k') | recipe_modules/python/example.resources/test.vpython » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698