|
4 | 4 | import hashlib |
5 | 5 | import os |
6 | 6 |
|
7 | | -packagesPath = "package_air_index.json" |
8 | | -packagesCNPath = "package_air_cn_index.json" |
| 7 | +packagesPath = "package_py32_index.json" |
| 8 | +packagesCNPath = "package_py32_cn_index.json" |
9 | 9 |
|
10 | 10 | GCCVersion = "12.2.1-1.2" |
11 | 11 | AirISPVersion = "" # 不定义具体的版本,在GetAirISPVersion函数中创造 |
@@ -104,7 +104,7 @@ def DownloadAndCheck(url, fileName, host, suffixName): |
104 | 104 | temp['size'] = ComputeSize(tempPath) |
105 | 105 |
|
106 | 106 | tempCn = temp.copy() |
107 | | - tempCn['url'] = "https://arduino.luatos.com/" + fileName + suffixName |
| 107 | + tempCn['url'] = "https://arduino.py32.halfsweet.cn/" + fileName + suffixName |
108 | 108 | return temp, tempCn |
109 | 109 |
|
110 | 110 |
|
@@ -221,45 +221,45 @@ def f(host, suffixName): |
221 | 221 | return data, dataCn |
222 | 222 |
|
223 | 223 |
|
224 | | -def PlatformsAirMCU(version): |
225 | | - fileName = "AirMCU-" + version + ".zip" |
226 | | - url = "https://github.com/Air-duino/Arduino-AirMCU/releases/download/" + version + "/" + fileName |
| 224 | +def PlatformsPY32(version): |
| 225 | + fileName = "Arduino-PY32-" + version + ".zip" |
| 226 | + url = "https://github.com/py32duino/Arduino-PY32/releases/download/" + version + "/" + fileName |
227 | 227 | downloadFile(url) |
228 | 228 | data = {} |
229 | 229 | dataCn = {} |
230 | | - data['name'] = "Air MCU" |
231 | | - data['architecture'] = "AirMCU" |
| 230 | + data['name'] = "PY32 Arduino" |
| 231 | + data['architecture'] = "PY32" |
232 | 232 | data['version'] = version |
233 | 233 | data['category'] = "Contributed" |
234 | | - data['help'] = {'online': "https://arduino.luatos.com"} |
| 234 | + data['help'] = {'online': "https://arduino.py32.halfsweet.cn"} |
235 | 235 | data['url'] = url |
236 | 236 | data['archiveFileName'] = fileName |
237 | 237 | data['checksum'] = "SHA-256:" + ComputeSHA256(fileName) |
238 | 238 | data['size'] = ComputeSize(fileName) |
239 | 239 | data['boards'] = [{'name': "Air001"}] |
240 | | - data['toolsDependencies'] = [{'packager': "AirM2M", 'name': "xpack-arm-none-eabi-gcc", 'version': GCCVersion}, |
241 | | - {'packager': "AirM2M", 'name': "CMSIS", 'version': CMSISVersion}, |
242 | | - {'packager': "AirM2M", 'name': "AirISP", 'version': AirISPVersion}] |
| 240 | + data['toolsDependencies'] = [{'packager': "PY32Duino", 'name': "xpack-arm-none-eabi-gcc", 'version': GCCVersion}, |
| 241 | + {'packager': "PY32Duino", 'name': "CMSIS", 'version': CMSISVersion}, |
| 242 | + {'packager': "PY32Duino", 'name': "AirISP", 'version': AirISPVersion}] |
243 | 243 | dataCn = data.copy() |
244 | | - dataCn['url'] = "https://arduino.luatos.com/" + fileName |
| 244 | + dataCn['url'] = "https://arduino.py32.halfsweet.cn/" + fileName |
245 | 245 | return data, dataCn |
246 | 246 |
|
247 | 247 |
|
248 | | -def PackagesAirM2M(): |
| 248 | +def PackagesPY32Duino(): |
249 | 249 | data = {} |
250 | 250 | dataCn = {} |
251 | | - data['name'] = "AirM2M" |
252 | | - data['maintainer'] = "AirM2M" |
253 | | - data['websiteURL'] = "https://arduino.luatos.com" |
| 251 | + data['name'] = "PY32Duino" |
| 252 | + data['maintainer'] = "PY32Duino" |
| 253 | + data['websiteURL'] = "https://arduino.py32.halfsweet.cn" |
254 | 254 | data[ 'email'] = "[email protected]" |
255 | | - data['help'] = {'online': "https://arduino.luatos.com"} |
| 255 | + data['help'] = {'online': "https://arduino.py32.halfsweet.cn"} |
256 | 256 | dataCn = data.copy() |
257 | 257 | platforms = [] |
258 | 258 | platformsCn = [] |
259 | 259 |
|
260 | | - PlatformsVersion.extend(GetRepoVersion("Air-duino", "Arduino-AirMCU")) |
| 260 | + PlatformsVersion.extend(GetRepoVersion("PY32Duino", "Arduino-PY32")) |
261 | 261 | for item in PlatformsVersion: |
262 | | - temp, tempCn = PlatformsAirMCU(item) |
| 262 | + temp, tempCn = PlatformsPY32(item) |
263 | 263 | platforms.append(temp) |
264 | 264 | platformsCn.append(tempCn) |
265 | 265 | data['platforms'] = platforms |
@@ -287,7 +287,7 @@ def PackagesAirM2M(): |
287 | 287 | def Encode(): |
288 | 288 | data = {} |
289 | 289 | dataCn = {} |
290 | | - temp, tempCn = PackagesAirM2M() |
| 290 | + temp, tempCn = PackagesPY32Duino() |
291 | 291 | data['packages'] = [temp] |
292 | 292 | dataCn['packages'] = [tempCn] |
293 | 293 | json_str = json.dumps(data, indent=2) |
|
0 commit comments