convert to pyproject.toml
This commit is contained in:
parent
3ec18ba976
commit
ce914ff1d9
@ -45,7 +45,7 @@ chkbit will
|
|||||||
Run `chkbit PATH` to verify only.
|
Run `chkbit PATH` to verify only.
|
||||||
|
|
||||||
```
|
```
|
||||||
usage: chkbit.py [-h] [-u] [--algo ALGO] [-f] [-i] [-s] [-w N] [-q] [-v] [PATH ...]
|
usage: chkbit [-h] [-u] [--algo ALGO] [-f] [-i] [-s] [-w N] [-q] [-v] [PATH ...]
|
||||||
|
|
||||||
Checks the data integrity of your files. See https://github.com/laktak/chkbit-py
|
Checks the data integrity of your files. See https://github.com/laktak/chkbit-py
|
||||||
|
|
||||||
|
@ -1,9 +1,5 @@
|
|||||||
import hashlib
|
|
||||||
|
|
||||||
|
|
||||||
class Context:
|
class Context:
|
||||||
def __init__(self, verify_index, update, force, hash_algo, skip_symlinks):
|
def __init__(self, verify_index, update, force, hash_algo, skip_symlinks):
|
||||||
|
|
||||||
self.verify_index = verify_index
|
self.verify_index = verify_index
|
||||||
self.update = update
|
self.update = update
|
||||||
self.force = force
|
self.force = force
|
||||||
|
@ -5,7 +5,6 @@ BLOCKSIZE = 2**10 * 128 # kb
|
|||||||
|
|
||||||
|
|
||||||
def hashfile(path, hash_algo=None):
|
def hashfile(path, hash_algo=None):
|
||||||
|
|
||||||
if not hash_algo or hash_algo == "md5":
|
if not hash_algo or hash_algo == "md5":
|
||||||
h = hashlib.md5()
|
h = hashlib.md5()
|
||||||
elif hash_algo == "sha512":
|
elif hash_algo == "sha512":
|
||||||
|
@ -41,7 +41,6 @@ class IndexThread:
|
|||||||
# load index
|
# load index
|
||||||
e = Index(parent, files, log=self._log)
|
e = Index(parent, files, log=self._log)
|
||||||
if e.load() or not self.verify_index_only:
|
if e.load() or not self.verify_index_only:
|
||||||
|
|
||||||
# calc the new hashes
|
# calc the new hashes
|
||||||
e.update(self.context)
|
e.update(self.context)
|
||||||
|
|
||||||
|
@ -30,7 +30,6 @@ class Main:
|
|||||||
self._parse_args()
|
self._parse_args()
|
||||||
|
|
||||||
def _log(self, idx, stat, path):
|
def _log(self, idx, stat, path):
|
||||||
|
|
||||||
if stat == Stat.FLAG_MOD:
|
if stat == Stat.FLAG_MOD:
|
||||||
self.modified = True
|
self.modified = True
|
||||||
else:
|
else:
|
||||||
@ -121,7 +120,6 @@ class Main:
|
|||||||
self.res_queue.task_done()
|
self.res_queue.task_done()
|
||||||
|
|
||||||
def process(self):
|
def process(self):
|
||||||
|
|
||||||
self.res_queue = queue.Queue()
|
self.res_queue = queue.Queue()
|
||||||
|
|
||||||
# the todo queue is used to distribute the work
|
# the todo queue is used to distribute the work
|
||||||
|
17
pyproject.toml
Normal file
17
pyproject.toml
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
[project]
|
||||||
|
name = "chkbit"
|
||||||
|
version = "2.3.0"
|
||||||
|
description = "chkbit checks the data integrity of your files"
|
||||||
|
authors = [
|
||||||
|
{name = "Christian Zangl", email = "laktak@cdak.net"},
|
||||||
|
]
|
||||||
|
dependencies = []
|
||||||
|
requires-python = ">=3.6.0"
|
||||||
|
readme = "README.md"
|
||||||
|
license = {file = "LICENSE"}
|
||||||
|
|
||||||
|
[project.urls]
|
||||||
|
Homepage = "https://github.com/laktak/chkbit-py"
|
||||||
|
|
||||||
|
[project.scripts]
|
||||||
|
chkbit = "chkbit.main:main"
|
25
setup.py
25
setup.py
@ -1,25 +0,0 @@
|
|||||||
import sys
|
|
||||||
from setuptools import setup
|
|
||||||
import os
|
|
||||||
|
|
||||||
if sys.version_info < (3, 6):
|
|
||||||
sys.exit("Please install with Python >= 3.6")
|
|
||||||
|
|
||||||
with open(os.path.join(os.path.dirname(__file__), "README.md"), encoding="utf-8") as f:
|
|
||||||
readme = f.read()
|
|
||||||
|
|
||||||
|
|
||||||
setup(
|
|
||||||
name="chkbit",
|
|
||||||
version="2.3.0",
|
|
||||||
url="https://github.com/laktak/chkbit-py",
|
|
||||||
author="Christian Zangl",
|
|
||||||
author_email="laktak@cdak.net",
|
|
||||||
description="chkbit checks the data integrity of your files",
|
|
||||||
long_description=readme,
|
|
||||||
long_description_content_type="text/markdown",
|
|
||||||
entry_points={"console_scripts": ["chkbit = chkbit.main:main"]},
|
|
||||||
packages=["chkbit"],
|
|
||||||
install_requires=[],
|
|
||||||
python_requires=">=3.6.0",
|
|
||||||
)
|
|
Reference in New Issue
Block a user