Skip to content

Commit 3da93ec

Browse files
codeskyblueCopilot
andauthored
udpate harmony install, change source to pypi (#67)
* udpate harmony install, change source to pypi * Update pyproject.toml Co-authored-by: Copilot <[email protected]> * Update README.md Co-authored-by: Copilot <[email protected]> --------- Co-authored-by: Copilot <[email protected]>
1 parent 54bf3b9 commit 3da93ec

File tree

3 files changed

+9
-8
lines changed

3 files changed

+9
-8
lines changed

README.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,11 @@ UI Inspector for Android, iOS and Harmony help inspector element properties, and
1111
# Install
1212
```bash
1313
pip install uiautodev
14-
```
15-
16-
To enable Harmony support, run the following command to install its dependencies:
1714

18-
```sh
19-
uiautodev install-harmony
15+
# or with Harmony support
16+
pip install "uiautodev[harmony]"
17+
# ref
18+
# https://developer.huawei.com/consumer/cn/doc/harmonyos-guides/hypium-python-guidelines
2019
```
2120

2221
# Usage

pyproject.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@ httpx = ">=0.28.1"
2828
uvicorn = ">=0.33.0"
2929
rich = "*"
3030
python-multipart = ">=0.0.18"
31+
hypium = {version=">=6.0.7.200,<7.0.0", optional=true}
32+
33+
[tool.poetry.extras]
34+
harmony = ["hypium"]
3135

3236
[tool.poetry.scripts]
3337
"uiauto.dev" = "uiautodev.__main__:main"

uiautodev/cli.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -135,9 +135,7 @@ def self_update():
135135

136136
@cli.command('install-harmony')
137137
def install_harmony():
138-
for lib_url in HARMONY_PACKAGES:
139-
click.echo(f"Installing {lib_url} ...")
140-
pip_install(lib_url)
138+
pip_install("hypium")
141139

142140
@retry(tries=2, delay=3, backoff=2)
143141
def pip_install(package: str):

0 commit comments

Comments
 (0)