Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
134 lines (114 loc) · 3.5 KB
/
Copy pathpyproject.toml
File metadata and controls
134 lines (114 loc) · 3.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "uthelper"
version = "2.5.0"
description = "UTHelper — Ứng dụng theo dõi bài tập và deadline UTH E-learning"
readme = "README.md"
requires-python = ">=3.11"
dependencies = [
# ── Core (cross-platform) ──
# HTTP: uses urllib.request (stdlib) — zero dependency, Cloudflare-friendly
"certifi>=2024.2.2",
"beautifulsoup4>=4.12.3",
"pydantic>=2.6.4",
"flet==0.86.5",
"python-dateutil>=2.8.2",
"packaging>=24.2",
"sentry-sdk>=2,<3",
]
[project.optional-dependencies]
windows = [
"flet[cli,desktop]==0.86.5",
"pystray>=0.19.5",
"pywin32>=306.0",
"windows-toasts>=1.3.1",
"winrt-Windows.ApplicationModel==3.2.1",
"keyring>=25.0.0",
"pillow>=12.3.0",
"lxml>=6.1.0",
]
android-build = [
"flet-android-notifications==0.10.0",
]
[project.scripts]
uth-alert = "main:main"
[tool.hatch.build.targets.wheel]
packages = ["src"]
[tool.flet]
org = "com.uthelper"
product = "UTHelper"
artifact = "UTHelper"
company = "UTHelper"
copyright = "Copyright (c) 2026"
[tool.flet.app]
path = "src"
module = "main"
[tool.flet.compile]
app = true
packages = true
[tool.flet.cleanup]
# Keep adjacent runtime bytecode; remove redundant build-time cache directories.
app = true
[tool.flet.flutter.pubspec.dependency_overrides]
# Flet 0.86.5's template pins 1.0.0; current generated JNI bindings require 1.1.
# https://github.com/flet-dev/flet/issues/6919
jni = "1.1.0"
# ── Windows-specific configuration ──
[tool.flet.windows]
dependencies = [
"pystray>=0.19.5",
"pywin32>=306.0",
"windows-toasts>=1.3.1",
"winrt-Windows.ApplicationModel==3.2.1",
"keyring>=25.0.0",
"pillow>=12.3.0",
"lxml>=6.1.0",
]
[tool.flet.windows.cleanup]
# PyWin32 compiled help is not used at runtime; retain every runtime module.
package_files = ["**.chm"]
# ── Android-specific configuration ──
[tool.flet.android]
legacy_packaging = true
bundle_id = "com.uthelper.uthelper"
adaptive_icon_background = "#0F172A"
dependencies = [
"flet-android-notifications==0.10.0",
"flet-uth-background-sync==0.1.0",
]
[tool.flet.android.dev_packages]
flet-uth-background-sync = "extensions/flet_uth_background_sync"
[tool.flet.android.permission]
"android.permission.INTERNET" = true
"android.permission.POST_NOTIFICATIONS" = true
"android.permission.RECEIVE_BOOT_COMPLETED" = true
"android.permission.SCHEDULE_EXACT_ALARM" = true
"android.permission.REQUEST_INSTALL_PACKAGES" = true # Auto-update APK
"android.permission.FOREGROUND_SERVICE" = true
"android.permission.FOREGROUND_SERVICE_DATA_SYNC" = true
# Android needs cleartext traffic for some Moodle instances
[tool.flet.android.manifest_application]
"usesCleartextTraffic" = "true"
# ── iOS-specific configuration ──
[tool.flet.ios]
bundle_id = "com.uthelper.UTHelper"
dependencies = ["flet-uth-background-sync==0.1.0"]
[tool.flet.ios.dev_packages]
flet-uth-background-sync = "extensions/flet_uth_background_sync"
[tool.flet.ios.info]
# Allow cleartext HTTP for Moodle instances without HTTPS
NSAppTransportSecurity = { NSAllowsArbitraryLoads = true }
# Permission descriptions (required by App Store)
NSUserNotificationsUsageDescription = "UTHelper cần quyền thông báo để nhắc deadline bài tập."
[dependency-groups]
dev = [
"pytest>=9.0.3",
"pytest-timeout>=2.3,<3",
]
[tool.pytest.ini_options]
testpaths = ["tests"]
markers = [
"windows_integration: isolated tests against real Windows user APIs",
]