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

Side by Side Diff: setup.py

Issue 412773002: Copy expect_tests from build (Closed) Base URL: https://chromium.googlesource.com/infra/testing/expect_tests@master
Patch Set: Fancy ast walker Created 6 years, 5 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
« no previous file with comments | « requirements.txt ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 #!/usr/bin/env python
2 # Copyright 2014 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file.
5
6 try:
7 from setuptools import setup
8 except ImportError:
9 from distutils.core import setup
10
11 import ast
12
13
14 def read_vars(path):
15 ret = {}
16 with open(path) as f:
17 for n in ast.walk(ast.parse(f.read())):
18 if isinstance(n, ast.Module):
19 ret['__doc__'] = ast.get_docstring(n)
20 elif isinstance(n, ast.Assign):
21 if isinstance(n.targets[0], ast.Name) and isinstance(n.value, ast.Str):
22 ret[n.targets[0].id] = n.value.s
23 return ret
24
25
26 VARS = read_vars('expect_tests/__init__.py')
27
28
29 setup(
30 name="Expect Tests",
31 version=VARS['__version__'],
32 description=VARS['__doc__'].splitlines()[0],
33 long_description=open('README.md').read(),
34 author=VARS['__author__'],
35 author_email=VARS['__email__'],
36 url=VARS['__url__'],
37 packages=['expect_tests'],
38 install_requires=open('requirements.txt').readlines(),
39 )
OLDNEW
« no previous file with comments | « requirements.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698