diff options
author | Gianfranco Costamagna <locutusofborg@debian.org> | 2021-01-21 09:31:35 +0100 |
---|---|---|
committer | Gianfranco Costamagna <locutusofborg@debian.org> | 2021-01-21 09:31:35 +0100 |
commit | 10b786fdc213d09cd80fed2d8f0e77cac00281f1 (patch) | |
tree | 7dd92246b96eb012db429f8de86963ac77fa549b | |
parent | c369c9f655707a9e3ebc404289bfbc18303b731b (diff) |
Fix usage of system xxhash
Forwarded: <no|not-needed|url proving that it has been forwarded>
Last-Update: 2021-01-10
Gbp-Pq: Name bundled-xxhash.patch
-rw-r--r-- | setup.py | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -222,6 +222,7 @@ libxxhash_prefix = setup_xxhash.xxhash_system_prefix(possible_libxxhash_prefixes if prefer_system_libxxhash and libxxhash_prefix: print('Detected and preferring libxxhash over bundled XXHASH') define_macros.append(('BORG_USE_LIBXXHASH', 'YES')) + define_macros.append(('XXH_PRIVATE_API', 'YES')) libxxhash_system = True else: libxxhash_system = False @@ -809,6 +810,13 @@ if not on_rtd: system_prefix=libxxhash_prefix, system=libxxhash_system, **crypto_ext_kwargs) + algorithms_ext_kwargs = dict(sources=[checksums_source], include_dirs=include_dirs, library_dirs=library_dirs, + define_macros=define_macros) + + algorithms_ext_kwargs = setup_xxhash.xxhash_ext_kwargs(bundled_path='src/borg/algorithms/', + system_prefix=libxxhash_prefix, system=libxxhash_system, + **algorithms_ext_kwargs) + msgpack_endian = '__BIG_ENDIAN__' if (sys.byteorder == 'big') else '__LITTLE_ENDIAN__' msgpack_macros = [(msgpack_endian, '1')] msgpack_packer_ext_kwargs = dict( @@ -834,7 +842,7 @@ if not on_rtd: 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', **algorithms_ext_kwargs), ] if not sys.platform.startswith(('win32', )): ext_modules.append(Extension('borg.platform.posix', [platform_posix_source])) |