Skip to content

Commit

Permalink
fix xxh64 module confusion
Browse files Browse the repository at this point in the history
the xxh64 lib is used by borg's "checksums" module, not by borg's "crypto" module.

inspired by LocutusOfBorg's debian packaging patch.
  • Loading branch information
ThomasWaldmann committed Jul 20, 2021
1 parent b4b1c40 commit 8cce7d7
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -811,10 +811,11 @@ def run(self):
crypto_ext_kwargs = setup_b2.b2_ext_kwargs(bundled_path='src/borg/algorithms/blake2',
system_prefix=libb2_prefix, system=libb2_system,
**crypto_ext_kwargs)

crypto_ext_kwargs = setup_xxhash.xxhash_ext_kwargs(bundled_path='src/borg/algorithms/xxh64',
checksums_ext_kwargs = dict(sources=[checksums_source], include_dirs=include_dirs, library_dirs=library_dirs,
define_macros=define_macros)
checksums_ext_kwargs = setup_xxhash.xxhash_ext_kwargs(bundled_path='src/borg/algorithms/xxh64',
system_prefix=libxxhash_prefix, system=libxxhash_system,
**crypto_ext_kwargs)
**checksums_ext_kwargs)

msgpack_endian = '__BIG_ENDIAN__' if (sys.byteorder == 'big') else '__LITTLE_ENDIAN__'
msgpack_macros = [(msgpack_endian, '1')]
Expand All @@ -841,7 +842,7 @@ def run(self):
Extension('borg.hashindex', [hashindex_source]),
Extension('borg.item', [item_source]),
Extension('borg.chunker', [chunker_source]),
Extension('borg.algorithms.checksums', [checksums_source]),
Extension('borg.algorithms.checksums', **checksums_ext_kwargs),
]
if not sys.platform.startswith(('win32', )):
ext_modules.append(Extension('borg.platform.posix', [platform_posix_source]))
Expand Down

0 comments on commit 8cce7d7

Please sign in to comment.