File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change 1
1
"""
2
2
setup module for Alibaba Cloud OSS SDK V2.
3
3
"""
4
-
5
- import os
4
+ import re
5
+ import os .path
6
+ from io import open
6
7
from setuptools import setup , find_packages
7
8
8
9
PACKAGE_NAME = "alibabacloud-oss-v2"
11
12
AUTHOR = "Alibaba Cloud OSS SDK"
12
13
AUTHOR_EMAIL = "sdk-team@alibabacloud.com"
13
14
URL = "https://github.com/aliyun/alibabacloud-oss-python-sdk-v2"
14
- VERSION = __import__ (PACKAGE_FOLDER_PATH ).__version__
15
15
REQUIRES = [
16
16
"requests>=2.18.4" ,
17
17
"cryptography>=2.1.4" ,
18
18
"crcmod-plus>=2.1.0"
19
19
]
20
20
21
+ with open (os .path .join (PACKAGE_FOLDER_PATH , "_version.py" ), "r" ) as fd :
22
+ VERSION = re .search (r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]' , fd .read (), re .MULTILINE ).group (1 ) # type: ignore
23
+
21
24
if not VERSION :
22
25
raise RuntimeError ('Cannot find version information' )
23
26
52
55
"Programming Language :: Python :: 3.10" ,
53
56
"Programming Language :: Python :: 3.11" ,
54
57
"Programming Language :: Python :: 3.12" ,
55
- ' License :: OSI Approved :: Apache License 2.0' ,
58
+ " License :: OSI Approved :: Apache Software License" ,
56
59
)
57
60
)
You can’t perform that action at this time.
0 commit comments