1
0
Fork 0
mirror of https://github.com/borgbackup/borg.git synced 2024-12-25 17:27:31 +00:00

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.
This commit is contained in:
Thomas Waldmann 2019-03-15 19:54:33 +01:00
parent f4e7133a1e
commit 7b27082a73

View file

@ -24,14 +24,19 @@
import setup_crypto import setup_crypto
import setup_docs import setup_docs
# True: use the shared liblz4 (>= 1.7.0 / r129) from the system, False: use the bundled lz4 code # BORG_USE_BUNDLED_XXX=YES --> use the bundled code
prefer_system_liblz4 = True # 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 # needed: lz4 (>= 1.7.0 / r129)
prefer_system_libzstd = True 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 cpu_threads = multiprocessing.cpu_count() if multiprocessing else 1