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

Side by Side Diff: setup.py

Issue 418643004: Copy git tooling into testing_support. (Closed) Base URL: https://chromium.googlesource.com/infra/testing/testing_support@master
Patch Set: fix scripts 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 | « README.md ('k') | testing_support/__init__.py » ('j') | 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 NAME = 'testing_support'
27 VARS = read_vars(NAME + '/__init__.py')
28
29
30 setup(
31 name=NAME,
32 version=VARS['__version__'],
33 description=VARS['__doc__'].splitlines()[0],
34 long_description=open('README.md').read(),
35 author=VARS['__author__'],
36 author_email=VARS['__email__'],
37 url=VARS['__url__'],
38 packages=[NAME],
39 )
OLDNEW
« no previous file with comments | « README.md ('k') | testing_support/__init__.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698