File tree Expand file tree Collapse file tree 3 files changed +8
-10
lines changed
Expand file tree Collapse file tree 3 files changed +8
-10
lines changed Original file line number Diff line number Diff line change 77- Install from pip
88
99 ```
10- pip install TIoTExploreSDK
10+ pip install tencent-iot-device
1111 ```
1212
1313
Original file line number Diff line number Diff line change 77- Install from pip
88
99 ```
10- pip install TIotHubSDK
10+ pip install tencent-iot-device
1111 ```
1212
1313
Original file line number Diff line number Diff line change 44import setuptools
55
66name = "tencent-iot-device"
7- # resp = urllib.request.urlopen(f'https://pypi.org/pypi/{name}/json')
8- # resp = urllib.request.urlopen(f'https://test.pypi.org/pypi/{name}/json')
9- # data = json.loads(resp.read().decode("utf-8"))
10- # version = data['info']['version']
11- # last_num = re.findall(r'\d+', version)[-1]
12- # version = version[:-len(last_num)] + str(int(last_num) + 1)
7+ resp = urllib .request .urlopen (f'https://test.pypi.org/pypi/{ name } /json' )
8+ data = json .loads (resp .read ().decode ("utf-8" ))
9+ version = data ['info' ]['version' ]
10+ last_num = re .findall (r'\d+' , version )[- 1 ]
11+ version = version [:- len (last_num )] + str (int (last_num ) + 1 )
1312
1413with open ("README.md" , mode = 'r' , encoding = 'UTF-8' ) as fh :
1514 long_description = fh .read ()
1615
1716setuptools .setup (
1817 name = ("%s" % name ),
19- version = "1.0.0" ,
20- # version=f"{version}",
18+ version = f"{ version } " ,
2119 author = "larrytin" ,
2220 author_email = "dev_tester@163.com" ,
2321 description = "Tencent IoT Explorer SDK for Python" ,
You can’t perform that action at this time.
0 commit comments