mirror of
https://github.com/DarrylNixon/melamine.git
synced 2024-04-22 06:27:20 -07:00
Doing libzfs the hard way, but it works
This commit is contained in:
parent
176820cd81
commit
9534c30bd7
4 changed files with 21 additions and 9 deletions
12
README.md
12
README.md
|
@ -0,0 +1,12 @@
|
|||
# melamine
|
||||
|
||||
todo!
|
||||
|
||||
## install
|
||||
|
||||
```bash
|
||||
sudo apt install --yes --no-install-recommends build-essential python3-dev libzfslinux-dev && \
|
||||
sudo pip3 install Cython && \
|
||||
git clone https://github.com/truenas/py-libzfs && \
|
||||
cd py-libzfs && ./configure --prefix=/usr && sudo make install
|
||||
```
|
|
@ -39,7 +39,7 @@ class ext2_inode_large_p(ctypes.POINTER(ext2_inode_large)):
|
|||
|
||||
|
||||
class EXT23Handler:
|
||||
def __init__(self, fs: str) -> None:
|
||||
def __init__(self) -> None:
|
||||
self.fs = "ext2/ext3"
|
||||
self.libext2fs = ctypes.CDLL("libext2fs.so.2")
|
||||
self.libext2fs.ext2fs_open.restype = ctypes.c_int
|
||||
|
|
|
@ -5,7 +5,7 @@ import libzfs
|
|||
|
||||
|
||||
class ZFSHandler:
|
||||
def __init__(self, fs: str) -> None:
|
||||
def __init__(self) -> None:
|
||||
self.fs = "zfs"
|
||||
|
||||
async def get_hardlinks(self, path: Path) -> Generator:
|
||||
|
|
|
@ -10,13 +10,13 @@ description = "A comprehensive file shredder for Linux"
|
|||
readme = "README.md"
|
||||
requires-python = ">=3.9"
|
||||
license = { text = "MIT" }
|
||||
dependencies = [
|
||||
"loguru==0.7.0",
|
||||
"aiofiles==23.1.0",
|
||||
"uvloop==0.17.0",
|
||||
"asyncstdlib==3.10.8",
|
||||
"psutil==5.9.5",
|
||||
]
|
||||
|
||||
[project.dependencies]
|
||||
loguru = "0.7.0"
|
||||
aiofiles = "23.1.0"
|
||||
uvloop = "0.17.0"
|
||||
asyncstdlib = "3.10.8"
|
||||
psutil = "5.9.5"
|
||||
|
||||
[project.scripts]
|
||||
melamine = "melamine.cli:run"
|
||||
|
|
Loading…
Reference in a new issue