blob: f226164af2e050b32a9078df3a66f311187ff64e [file] [log] [blame]
Bill Wendling7d623452015-03-18 13:36:07 -07001#!/usr/bin/env python
2# Copyright 2015 Google Inc. All Rights Reserved.
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8# http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15
16import unittest
17from distutils.core import setup, Command
18
19import yapf
20import yapftests
21
22
23class RunTests(Command):
24 user_options = []
25
26 def initialize_options(self):
27 pass
28
29 def finalize_options(self):
30 pass
31
32 def run(self):
33 tests = unittest.TestSuite(yapftests.suite())
34 runner = unittest.TextTestRunner()
35 runner.run(tests)
36
37
Bill Wendling1ea62652015-03-18 14:44:36 -070038with open('README.rst', 'r') as fd:
Bill Wendling7d623452015-03-18 13:36:07 -070039 setup(
40 name='yapf',
41 version=yapf.__version__,
42 description='A formatter for Python code.',
43 long_description=fd.read(),
44 license='Apache License, Version 2.0',
45 author='Google Inc.',
46 maintainer='Bill Wendling',
47 maintainer_email='morbo@google.com',
48 packages=['yapf', 'yapf.yapflib'],
49 classifiers=[
50 'Development Status :: 3 - Alpha',
51 'Environment :: Console',
52 'Intended Audience :: Developers',
53 'License :: OSI Approved :: Apache Software License',
54 'Operating System :: OS Independent',
55 'Programming Language :: Python',
56 'Programming Language :: Python :: 2',
57 'Programming Language :: Python :: 2.7',
58 'Programming Language :: Python :: 3',
59 'Programming Language :: Python :: 3.2',
60 'Programming Language :: Python :: 3.3',
61 'Programming Language :: Python :: 3.4',
62 'Topic :: Software Development :: Libraries :: Python Modules',
63 'Topic :: Software Development :: Quality Assurance',
64 ],
65 cmdclass={
66 'test': RunTests,
67 },
68 )