diff options
author | Thomas Waldmann <tw@waldmann-edv.de> | 2019-03-15 19:54:33 +0100 |
---|---|---|
committer | Thomas Waldmann <tw@waldmann-edv.de> | 2019-03-15 19:54:33 +0100 |
commit | 7b27082a730ee2a38ac2a70433f08f6193080dcd (patch) | |
tree | 409058c8fff373ca75f6bb33b445807794f2e4b6 /setup.py | |
parent | f4e7133a1e705e57c78da58c613c879b32ed9807 (diff) |
setup.py: bundled code vs system libs: use env vars we use anyway
these are already used internally when the build system can not find
a system library (neither via pkginfo nor BORG_LIBXXX_PREFIX is given)
and then triggers usage of the bundled code via these env vars.
now they are also used to tell right from the beginning "use the
bundled code" and in that case it will not try to locate system libs
and headers.
Diffstat (limited to 'setup.py')
-rw-r--r-- | setup.py | 17 |
1 files changed, 11 insertions, 6 deletions
@@ -24,14 +24,19 @@ import setup_compress import setup_crypto import setup_docs -# True: use the shared liblz4 (>= 1.7.0 / r129) from the system, False: use the bundled lz4 code -prefer_system_liblz4 = True +# BORG_USE_BUNDLED_XXX=YES --> use the bundled code +# BORG_USE_BUNDLED_XXX undefined --> try using system lib +# Note: do not use =NO, that is not supported! -# True: use the shared libzstd (>= 1.3.0) from the system, False: use the bundled zstd code -prefer_system_libzstd = True +# needed: lz4 (>= 1.7.0 / r129) +prefer_system_liblz4 = not bool(os.environ.get('BORG_USE_BUNDLED_LZ4')) + +# needed: zstd (>= 1.3.0) +prefer_system_libzstd = not bool(os.environ.get('BORG_USE_BUNDLED_ZSTD')) + +# needed: blake2 (>= 0.98.1) +prefer_system_libb2 = not bool(os.environ.get('BORG_USE_BUNDLED_B2')) -# True: use the shared libb2 (>= 0.98.1) from the system, False: use the bundled blake2 code -prefer_system_libb2 = True cpu_threads = multiprocessing.cpu_count() if multiprocessing else 1 |