Skip to content

Commit 816669f

Browse files
authored
Merge pull request #78 from onekey-sec/move-to-poetry
Move to poetry
2 parents 13d82d6 + 9013766 commit 816669f

5 files changed

Lines changed: 95 additions & 30 deletions

File tree

.github/workflows/release.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: PyPI Release
2+
3+
on:
4+
release:
5+
types: [created]
6+
7+
jobs:
8+
release:
9+
runs-on: ubuntu-20.04
10+
11+
steps:
12+
13+
- name: Setup Python
14+
uses: actions/setup-python@v2
15+
with:
16+
python-version: "3.8"
17+
18+
- name: Pip install
19+
run: python -m pip install --upgrade pip poetry
20+
shell: bash
21+
22+
- name: Checkout source code
23+
uses: actions/checkout@v2
24+
25+
- run: poetry publish --build
26+
env:
27+
POETRY_PYPI_TOKEN_PYPI: ${{secrets.POETRY_PYPI_TOKEN_PYPI}}

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@ Latest Version
2828

2929
$ git clone https://github.com/jrspruitt/ubi_reader
3030
$ cd ubi_reader
31-
$ sudo python setup.py install
31+
$ poetry install
3232

3333
Or
3434

35-
$ sudo pip install ubi_reader
35+
$ pip install --user ubi_reader
3636

3737

3838
## Usage:

poetry.lock

Lines changed: 24 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
[tool.poetry]
2+
name = "ubi-reader"
3+
version = "0.8.6"
4+
description = "Extract files from UBI and UBIFS images."
5+
authors = ["ONEKEY <support@onekey.com>", "Jason Pruitt <jrspruitt@gmail.com>"]
6+
license = "GNU GPL"
7+
readme = "README.md"
8+
packages = [{include = "ubi_reader"}]
9+
10+
[tool.poetry.dependencies]
11+
python = "^3.8"
12+
lzallright = "^0.1.0"
13+
14+
[build-system]
15+
requires = ["poetry-core"]
16+
build-backend = "poetry.core.masonry.api"
17+
18+
[tool.pytest.ini_options]
19+
addopts = "--cov=ubi_reader --cov=tests --cov-branch --cov-fail-under=90"
20+
norecursedirs = """
21+
*.egg
22+
*_extract
23+
.*
24+
dist
25+
build
26+
target
27+
"""
28+
29+
[tool.vulture]
30+
paths = ["ubireader/", "scripts/", "vulture_whitelist.py"]
31+
exclude = []
32+
33+
[tool.pyright]
34+
exclude = ["build"]
35+
36+
[tool.poetry.scripts]
37+
ubireader_display_blocks = "scripts.ubireader_display_blocks:main"
38+
ubireader_display_info = "scripts.ubireader_display_info:main"
39+
ubireader_extract_files = "scripts.ubireader_extract_files:main"
40+
ubireader_extract_images = "scripts.ubireader_extract_images:main"
41+
ubireader_list_files = "scripts.ubireader_list_files:main"
42+
ubireader_utils_info = "scripts.ubireader_utils_info:main"

setup.py

Lines changed: 0 additions & 28 deletions
This file was deleted.

0 commit comments

Comments
 (0)