pyinstaller
This commit is contained in:
parent
51b5964224
commit
8552f13320
6
.github/workflows/lint.yml
vendored
6
.github/workflows/lint.yml
vendored
@ -7,6 +7,8 @@ jobs:
|
||||
lint:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-python@v2
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.12'
|
||||
- uses: psf/black@stable
|
||||
|
30
.github/workflows/pyinstaller.yml
vendored
Normal file
30
.github/workflows/pyinstaller.yml
vendored
Normal file
@ -0,0 +1,30 @@
|
||||
name: pyinstaller
|
||||
|
||||
on: [push]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.12'
|
||||
- name: prep
|
||||
shell: bash
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
python -m pip install pipenv pyinstaller==6.3.0
|
||||
pipenv install
|
||||
rm -rf build dist
|
||||
- name: build
|
||||
shell: bash
|
||||
run: |
|
||||
pipenv --venv
|
||||
pipenv run pyinstaller run.py --hidden-import chkbit --hidden-import chkbit_cli --onefile --name chkbit --console --paths $(pipenv --venv)/lib/*/site-packages
|
||||
cat build/chkbit/warn-chkbit.txt
|
||||
- name: artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: chkbit
|
||||
path: dist/chkbit
|
2
.gitignore
vendored
2
.gitignore
vendored
@ -1,5 +1,7 @@
|
||||
README.rst
|
||||
build/
|
||||
dist/
|
||||
chkbit.spec
|
||||
.cache/
|
||||
.chkbit
|
||||
.pytest_cache/
|
||||
|
1
Pipfile
1
Pipfile
@ -3,6 +3,7 @@ url = "https://pypi.org/simple"
|
||||
verify_ssl = true
|
||||
name = "pypi"
|
||||
|
||||
# keep in sync with pyproject.toml
|
||||
[packages]
|
||||
blake3 = ">=0.3.4"
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
import hashlib
|
||||
from blake3 import blake3
|
||||
from typing import Callable
|
||||
|
||||
|
||||
@ -11,8 +12,6 @@ def hashfile(path: str, hash_algo: str, *, hit: Callable[[str], None]):
|
||||
elif hash_algo == "sha512":
|
||||
h = hashlib.sha512()
|
||||
elif hash_algo == "blake3":
|
||||
from blake3 import blake3
|
||||
|
||||
h = blake3()
|
||||
else:
|
||||
raise Exception(f"algo '{hash_algo}' is unknown.")
|
||||
|
5
chkbit_cli/__init__.py
Normal file
5
chkbit_cli/__init__.py
Normal file
@ -0,0 +1,5 @@
|
||||
from chkbit_cli.cli import CLI
|
||||
from chkbit_cli.progress import Progress
|
||||
from chkbit_cli.sparklines import sparkify
|
||||
from chkbit_cli.rate_calc import RateCalc
|
||||
from chkbit_cli.main import Main, main
|
@ -5,6 +5,8 @@ description = "chkbit checks the data integrity of your files"
|
||||
authors = [
|
||||
{name = "Christian Zangl", email = "laktak@cdak.net"},
|
||||
]
|
||||
|
||||
# keep in sync with Pipfile
|
||||
dependencies = [
|
||||
"blake3>=0.3.4",
|
||||
]
|
||||
|
1
requirements.txt
Normal file
1
requirements.txt
Normal file
@ -0,0 +1 @@
|
||||
blake3>=0.3.4
|
Loading…
x
Reference in New Issue
Block a user