dduper icon indicating copy to clipboard operation
dduper copied to clipboard

Publish dduper to pypi and make available via pip

Open Lakshmipathi opened this issue 5 years ago • 3 comments

Provide one-liner installation using pypi. pip3 install dduper

Lakshmipathi avatar Aug 13 '20 05:08 Lakshmipathi

$ 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

Lakshmipathi avatar Aug 13 '20 05:08 Lakshmipathi

"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.

leggewie avatar Apr 21 '21 13:04 leggewie

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

Thesola10 avatar Sep 22 '22 09:09 Thesola10