|
24 | 24 | import logging |
25 | 25 |
|
26 | 26 | """ |
27 | | -setup module for core. |
| 27 | +Setup module for core. |
28 | 28 |
|
29 | 29 | Created on 6/24/2015 |
30 | 30 |
|
31 | 31 | @author: Alibaba Cloud |
32 | 32 | """ |
33 | 33 |
|
34 | 34 | PACKAGE = "aliyunsdkcore" |
35 | | -NAME = "aliyun-python-sdk-core" |
36 | 35 | DESCRIPTION = "The core module of Aliyun Python SDK." |
37 | | -AUTHOR = "Aliyun" |
38 | | -AUTHOR_EMAIL = "aliyun-developers-efficiency@list.alibaba-inc.com" |
39 | | -URL = "http://develop.aliyun.com/sdk/python" |
| 36 | +AUTHOR = "Alibaba Cloud" |
| 37 | +AUTHOR_EMAIL = "alibaba-cloud-sdk-dev-team@list.alibaba-inc.com" |
| 38 | +URL = "https://github.com/aliyun/aliyun-openapi-python-sdk" |
| 39 | + |
40 | 40 |
|
41 | 41 | TOPDIR = os.path.dirname(__file__) or "." |
42 | 42 | VERSION = __import__(PACKAGE).__version__ |
43 | 43 |
|
44 | | -desc_file = open("README.rst") |
45 | | -try: |
46 | | - LONG_DESCRIPTION = desc_file.read() |
47 | | -finally: |
48 | | - desc_file.close() |
| 44 | + |
| 45 | +with open("README.rst") as fp: |
| 46 | + LONG_DESCRIPTION = fp.read() |
| 47 | + |
49 | 48 |
|
50 | 49 | requires = [] |
51 | 50 | if platform.system() != "Windows": |
52 | 51 | requires.append("pycryptodome>=3.4.7") |
53 | 52 | else: |
54 | 53 | logging.warning( |
55 | | - "auth type [publicKeyId] is disabled because 'pycrypto' not support windows, we will resolve this soon") |
56 | | - |
57 | | -setup( |
58 | | - name=NAME, |
59 | | - version=VERSION, |
60 | | - description=DESCRIPTION, |
61 | | - long_description=LONG_DESCRIPTION, |
62 | | - author=AUTHOR, |
63 | | - author_email=AUTHOR_EMAIL, |
64 | | - license="Apache", |
65 | | - url=URL, |
66 | | - keywords=["aliyun", "sdk", "core"], |
67 | | - packages=find_packages(exclude=["tests*"]), |
68 | | - package_data={'aliyunsdkcore' : ['endpoint/*.json']}, |
69 | | - platforms='any', |
70 | | - install_requires=requires, |
71 | | - classifiers=( |
| 54 | + "auth type [publicKeyId] is disabled because " |
| 55 | + "'pycrypto' not support windows, we will resolve this soon") |
| 56 | + |
| 57 | + |
| 58 | +setup_args = { |
| 59 | + 'version': VERSION, |
| 60 | + 'description': DESCRIPTION, |
| 61 | + 'long_description': LONG_DESCRIPTION, |
| 62 | + 'author': AUTHOR, |
| 63 | + 'author_email': AUTHOR_EMAIL, |
| 64 | + 'license': "Apache License 2.0", |
| 65 | + 'url': URL, |
| 66 | + 'keywords': ["aliyun", "sdk", "core"], |
| 67 | + 'packages': find_packages(exclude=["tests*"]), |
| 68 | + 'package_data': {'aliyunsdkcore': ['endpoint/*.json']}, |
| 69 | + 'platforms': 'any', |
| 70 | + 'install_requires': requires, |
| 71 | + 'classifiers': ( |
72 | 72 | 'Development Status :: 5 - Production/Stable', |
73 | 73 | 'Intended Audience :: Developers', |
74 | 74 | 'License :: OSI Approved :: Apache Software License', |
|
83 | 83 | 'Programming Language :: Python :: 3.7', |
84 | 84 | 'Topic :: Software Development', |
85 | 85 | ) |
86 | | -) |
| 86 | +} |
| 87 | + |
| 88 | + |
| 89 | +setup(name='aliyun-python-sdk-core', **setup_args) |
| 90 | + |
| 91 | +setup(name='aliyun-python-sdk-core-v3', **setup_args) |
| 92 | + |
0 commit comments