mirror of
https://github.com/borgbackup/borg.git
synced 2026-10-12 02:11:36 +00:00
buzhash64: integrate into build
This commit is contained in:
@@ -7,6 +7,7 @@ src/borg/compress.c
|
||||
src/borg/crypto/low_level.c
|
||||
src/borg/item.c
|
||||
src/borg/chunkers/buzhash.c
|
||||
src/borg/chunkers/buzhash64.c
|
||||
src/borg/chunkers/reader.c
|
||||
src/borg/checksums.c
|
||||
src/borg/platform/darwin.c
|
||||
|
||||
@@ -543,6 +543,7 @@ cython_sources = """
|
||||
src/borg/compress.pyx
|
||||
src/borg/crypto/low_level.pyx
|
||||
src/borg/chunkers/buzhash.pyx
|
||||
src/borg/chunkers/buzhash64.pyx
|
||||
src/borg/chunkers/reader.pyx
|
||||
src/borg/hashindex.pyx
|
||||
src/borg/item.pyx
|
||||
|
||||
@@ -51,6 +51,7 @@ cflags = ["-Wall", "-Wextra", "-Wpointer-arith", "-Wno-unreachable-code-fallthro
|
||||
compress_source = "src/borg/compress.pyx"
|
||||
crypto_ll_source = "src/borg/crypto/low_level.pyx"
|
||||
buzhash_source = "src/borg/chunkers/buzhash.pyx"
|
||||
buzhash64_source = "src/borg/chunkers/buzhash64.pyx"
|
||||
reader_source = "src/borg/chunkers/reader.pyx"
|
||||
hashindex_source = "src/borg/hashindex.pyx"
|
||||
item_source = "src/borg/item.pyx"
|
||||
@@ -66,6 +67,7 @@ cython_sources = [
|
||||
compress_source,
|
||||
crypto_ll_source,
|
||||
buzhash_source,
|
||||
buzhash64_source,
|
||||
reader_source,
|
||||
hashindex_source,
|
||||
item_source,
|
||||
@@ -185,6 +187,7 @@ if not on_rtd:
|
||||
Extension("borg.hashindex", [hashindex_source], extra_compile_args=cflags),
|
||||
Extension("borg.item", [item_source], extra_compile_args=cflags),
|
||||
Extension("borg.chunkers.buzhash", [buzhash_source], extra_compile_args=cflags, undef_macros=["NDEBUG"]),
|
||||
Extension("borg.chunkers.buzhash64", [buzhash64_source], extra_compile_args=cflags, undef_macros=["NDEBUG"]),
|
||||
Extension("borg.chunkers.reader", [reader_source], extra_compile_args=cflags, undef_macros=["NDEBUG"]),
|
||||
Extension("borg.checksums", **checksums_ext_kwargs),
|
||||
]
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
from .buzhash import Chunker
|
||||
from .buzhash64 import ChunkerBuzHash64
|
||||
from .failing import ChunkerFailing
|
||||
from .fixed import ChunkerFixed
|
||||
from .reader import * # noqa
|
||||
@@ -11,6 +12,10 @@ def get_chunker(algo, *params, **kw):
|
||||
seed = kw["seed"]
|
||||
sparse = kw["sparse"]
|
||||
return Chunker(seed, *params, sparse=sparse)
|
||||
if algo == "buzhash64":
|
||||
seed = kw["seed"]
|
||||
sparse = kw["sparse"]
|
||||
return ChunkerBuzHash64(seed, *params, sparse=sparse)
|
||||
if algo == "fixed":
|
||||
sparse = kw["sparse"]
|
||||
return ChunkerFixed(*params, sparse=sparse)
|
||||
|
||||
Reference in New Issue
Block a user