Index: setup.py |
diff --git a/setup.py b/setup.py |
new file mode 100755 |
index 0000000000000000000000000000000000000000..66f6c2d15a9e302c295adb7da41b726709acf8be |
--- /dev/null |
+++ b/setup.py |
@@ -0,0 +1,39 @@ |
+#!/usr/bin/env python |
+# Copyright 2014 The Chromium Authors. All rights reserved. |
+# Use of this source code is governed by a BSD-style license that can be |
+# found in the LICENSE file. |
+ |
+try: |
+ from setuptools import setup |
+except ImportError: |
+ from distutils.core import setup |
+ |
+import ast |
+ |
+ |
+def read_vars(path): |
+ ret = {} |
+ with open(path) as f: |
+ for n in ast.walk(ast.parse(f.read())): |
+ if isinstance(n, ast.Module): |
+ ret['__doc__'] = ast.get_docstring(n) |
+ elif isinstance(n, ast.Assign): |
+ if isinstance(n.targets[0], ast.Name) and isinstance(n.value, ast.Str): |
+ ret[n.targets[0].id] = n.value.s |
+ return ret |
+ |
+ |
+VARS = read_vars('expect_tests/__init__.py') |
+ |
+ |
+setup( |
+ name="Expect Tests", |
+ version=VARS['__version__'], |
+ description=VARS['__doc__'].splitlines()[0], |
+ long_description=open('README.md').read(), |
+ author=VARS['__author__'], |
+ author_email=VARS['__email__'], |
+ url=VARS['__url__'], |
+ packages=['expect_tests'], |
+ install_requires=open('requirements.txt').readlines(), |
+) |