| Bill Wendling | 7d62345 | 2015-03-18 13:36:07 -0700 | [diff] [blame] | 1 | #!/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 |  | 
|  | 16 | import unittest | 
|  | 17 | from distutils.core import setup, Command | 
|  | 18 |  | 
|  | 19 | import yapf | 
|  | 20 | import yapftests | 
|  | 21 |  | 
|  | 22 |  | 
|  | 23 | class 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 Wendling | 1ea6265 | 2015-03-18 14:44:36 -0700 | [diff] [blame] | 38 | with open('README.rst', 'r') as fd: | 
| Bill Wendling | 7d62345 | 2015-03-18 13:36:07 -0700 | [diff] [blame] | 39 | 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 | ) |