dduper
dduper copied to clipboard
Publish dduper to pypi and make available via pip
Provide one-liner installation using pypi. pip3 install dduper
$ cat setup.py
from setuptools import setup
setup(
name='dduper',
description='Fastest block-level offline BTRFS deduplication tool',
long_description='dduper is a block-level offline (out-of-band) BTRFS dedupe tool. This works by fetching in-built checksum from BTRFS csum-tree, instead of reading file blocks and computing checksum. This hugely improves the performance.',
url='https://github.com/lakshmipathi/dduper',
author='Lakshmipathi.G',
author_email='[email protected]',
license='GPL',
version='0.04',
scripts=['dduper'],
data_files=[('/usr/sbin',['btrfs.static'])],
install_requires=['numpy','PTable'],
python_requires='>=3'
)
After uploading the files to test.pypi.org. Installing via pip show the files under home dir.
~/.local/bin/dduper
~/.local/lib/python3.8/site-packages/dduper-0.04.dist-info/*
~/.local/lib/python3.8/site-packages/usr/sbin/btrfs.static
Only one issue above, I'd like to see btrfs.static installed on /usr/sbin/btrfs.static not under ~/.local/lib/python3.8/site-packages/usr/sbin/btrfs.static
"Only one issue above, I'd like to see btrfs.static installed on /usr/sbin/btrfs.static not under ~/.local/lib/python3.8/site- packages/usr/sbin/btrfs.static"
That is most likely related to how you install the package rather than how you publish it. IOW, unless you are installing system-wide from the root account nothing will end up under /usr/sbin.
You could consider natively interfacing with btrfs-progs code and ship the entire thing as a native Python module, here's a project of mine for example