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

Side by Side Diff: tools/telemetry/third_party/rope/setup.py

Issue 1132103009: Example of refactoring using rope library. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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 | « tools/telemetry/third_party/rope/ropetest/testutils.py ('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 from distutils.core import setup, Command
2 import sys
3 import unittest
4
5 import rope
6 import ropetest
7 import ropetest.contrib
8 import ropetest.refactor
9
10
11 class RunTests(Command):
12 """New setup.py command to run all tests for the package.
13 """
14 description = "run all tests for the package"
15
16 user_options = []
17
18 def initialize_options(self):
19 pass
20
21 def finalize_options(self):
22 pass
23
24 def run(self):
25 tests = unittest.TestSuite(ropetest.suite())
26 runner = unittest.TextTestRunner(verbosity=2)
27 results = runner.run(tests)
28 sys.exit(0 if results.wasSuccessful() else 1)
29
30
31 classifiers = [
32 'Development Status :: 4 - Beta',
33 'Operating System :: OS Independent',
34 'Environment :: X11 Applications',
35 'Environment :: Win32 (MS Windows)',
36 'Environment :: MacOS X',
37 'Intended Audience :: Developers',
38 'License :: OSI Approved :: GNU General Public License (GPL)',
39 'Natural Language :: English',
40 'Programming Language :: Python',
41 'Topic :: Software Development']
42
43
44 def get_long_description():
45 lines = open('README.rst').read().splitlines(False)
46 end = lines.index('Getting Started')
47 return '\n' + '\n'.join(lines[:end]) + '\n'
48
49 setup(name='rope',
50 version=rope.VERSION,
51 description='a python refactoring library...',
52 long_description=get_long_description(),
53 author='Ali Gholami Rudi',
54 author_email='aligrudi@users.sourceforge.net',
55 url='http://rope.sf.net/',
56 packages=['rope', 'rope.base', 'rope.base.oi', 'rope.refactor',
57 'rope.refactor.importutils', 'rope.contrib'],
58 license='GNU GPL',
59 classifiers=classifiers,
60 cmdclass={
61 'test': RunTests,
62 })
OLDNEW
« no previous file with comments | « tools/telemetry/third_party/rope/ropetest/testutils.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698