|
| 1 | +from __future__ import print_function |
1 | 2 | import sys |
2 | 3 | import os |
3 | 4 |
|
|
13 | 14 | print("Python 2.6 or greater is required.") |
14 | 15 | sys.exit(1) |
15 | 16 |
|
16 | | -extra = {} |
17 | | - |
18 | | -requires = [ |
| 17 | +REQUIRES = [ |
19 | 18 | 'six >= 1.7.0', |
20 | 19 | 'prettytable >= 0.7.0', |
21 | 20 | 'click', |
22 | 21 | 'requests', |
23 | 22 | ] |
24 | 23 |
|
25 | 24 | if sys.version_info < (2, 7): |
26 | | - requires.append('importlib') |
| 25 | + REQUIRES.append('importlib') |
27 | 26 |
|
28 | | -description = "A library for SoftLayer's API" |
| 27 | +DESCRIPTION = "A library for SoftLayer's API" |
29 | 28 |
|
30 | 29 | if os.path.exists('README.rst'): |
31 | | - f = open('README.rst') |
32 | | - try: |
33 | | - long_description = f.read() |
34 | | - finally: |
35 | | - f.close() |
| 30 | + with open('README.rst') as readme_file: |
| 31 | + LONG_DESCRIPTION = readme_file.read() |
36 | 32 | else: |
37 | | - long_description = description |
| 33 | + LONG_DESCRIPTION = DESCRIPTION |
38 | 34 |
|
39 | 35 | setup( |
40 | 36 | name='SoftLayer', |
41 | 37 | version='3.3.0', |
42 | | - description=description, |
43 | | - long_description=long_description, |
| 38 | + description=DESCRIPTION, |
| 39 | + long_description=LONG_DESCRIPTION, |
44 | 40 | author='SoftLayer Technologies, Inc.', |
45 | 41 | |
46 | 42 | packages=find_packages(exclude=["SoftLayer.tests"]), |
|
50 | 46 | entry_points={ |
51 | 47 | 'console_scripts': ['sl = SoftLayer.CLI.core:main'], |
52 | 48 | }, |
53 | | - package_data={'SoftLayer': ['tests/fixtures/*.conf']}, |
54 | 49 | test_suite='nose.collector', |
55 | | - install_requires=requires, |
| 50 | + install_requires=REQUIRES, |
| 51 | + keywords=['softlayer', 'cloud'], |
56 | 52 | classifiers=[ |
57 | 53 | 'Environment :: Console', |
58 | 54 | 'Environment :: Web Environment', |
|
69 | 65 | 'Programming Language :: Python :: Implementation :: CPython', |
70 | 66 | 'Programming Language :: Python :: Implementation :: PyPy', |
71 | 67 | ], |
72 | | - **extra |
73 | 68 | ) |
0 commit comments