Simple Python interface for librsync
Project description
Simple Python interface for librsync
Install
pip install simple-rsync
Build
- Make sure Rust toolchain is installed. If not goto https://rustup.rs/ to install it.
- Create an virtual environment and run:
python setup.py develop
for develop build orpython setup.py install
for release build
Verify
python setup.py test
Use
from simple_rsync import signature, delta, patch
base_file = "base"
new_file = "new"
signature_file = "sig"
delta_file = "delta"
result_file = "result"
signature(base_file, signature_file, block_len=1024, strong_len=8)
delta(new_file, signature_file, delta_file)
patch(base_file, delta_file, result_file)
with open(new_file, "rb") as expected:
with open(result_file, "rb") as result:
assert expected.read() == result.read()
Release on Mac OSX
Set MACOSX_DEPLOYMENT_TARGET
if you want the wheel to be compatible with older versions.
For CPython from Python.org: MACOSX_DEPLOYMENT_TARGET=10.9 python setup.py bdist_wheel
.
For custom bulid of librsync
again see the instructions for Windows.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
Close
Hashes for simple_rsync-1.0.0-cp311-cp311-macosx_10_13_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4519ac5214692f94c86c534db2e4c32cd58a62c99fd416b97b816eab9d6f0876 |
|
MD5 | 6ed3d4f0e8c85eab12c496edba77f56c |
|
BLAKE2b-256 | b1a7c8333cc8279b30328eafc7621f6007b665b75012f9199c336a638b767da4 |