CH-J SM Mobileupravljanje strežnikov prek SSH
Meni
Objavljen vir

CH-J SM Mobile

Brskajte po imenikih in datotekah za določeno izdajo programa.

Prenos vir ZIP
CH-J / SM Mobile 134 datoteke
sm-mobile-20261016T050549Z-3678f2a05fa9 Dodano: · Zgrajena:
Datoteke
notices.py Dodano: Datum, ki ni zabeležen 2,1 KB · 32 vrstice
Prenesi datoteko
1#!/usr/bin/env python3
2"""Bundle exact resolved package licenses; no network or parent-project dependency."""
3import json,pathlib,urllib.parse
4root=pathlib.Path(__file__).resolve().parents[1]
5config=root/'.dart_tool/package_config.json'
6packages=json.loads(config.read_text())['packages']
7sections=[]; index=[]
8for package in sorted(packages,key=lambda p:p['name']):
9 if package['name']=='sm_mobile': continue
10 uri=urllib.parse.urljoin(config.as_uri(),package['rootUri'])
11 path=pathlib.Path(urllib.parse.unquote(urllib.parse.urlparse(uri).path))
12 texts=[]
13 for file in sorted(path.iterdir()):
14 if file.is_file() and file.name.upper().split('.')[0] in ['LICENSE','LICENCE','COPYING','NOTICE']:
15 texts.append(file.name+'\n'+file.read_text(errors='replace'))
16 if not texts and package['name'] in ['flutter_driver','flutter_test','integration_test','flutter_localizations','flutter_web_plugins','flutter','fuchsia_remote_debug_protocol']:
17 for parent in path.parents:
18 license_file=parent/'LICENSE'
19 if license_file.is_file():
20 texts.append('Flutter SDK LICENSE\n'+license_file.read_text());break
21 if not texts: raise SystemExit('Missing license: '+package['name'])
22 version='SDK'
23 pubspec=path/'pubspec.yaml'
24 if pubspec.exists():
25 import re
26 m=re.search(r'^version:\s*([^\n]+)',pubspec.read_text(),re.M)
27 if m: version=m.group(1)
28 index.append(f"| {package['name']} | {version} |")
29 sections.append('\n'+'='*72+'\n'+package['name']+' '+version+'\n'+'\n'.join(texts))
30(root/'assets/legal/third_party_notices.txt').write_text('SM Mobile — licenses of resolved Dart/Flutter components\n'+''.join(sections))
31(root/'docs/RESOLVED_COMPONENTS.md').write_text('# Resolved Dart and Flutter components\n\nGenerated from package_config.json and the exact package license files.\nFull texts: `assets/legal/third_party_notices.txt`. Flutter also embeds NOTICES.Z in each build.\n\n| Component | Version |\n| --- | --- |\n'+'\n'.join(index)+'\n')
32print(f'Collected {len(sections)} component license notices.')
SHA-25689c6a6aad51e46a4fdf3eece5149e823bfe1569094de7d30811a7570b8678b98

CH-J Proprietary Software License 1.14 · Vir je na voljo pod CH-J Proprietary Software License 1.14. Njena razpoložljivost ne spreminja pogojev licence ali dodeljuje dodatnih pravic.

Arhiv SHA-256c486a807e4828998b9c57ab0f2e760f7980b31965fe118e89d3e1a5a2b65be65