فهرست منبع

rename BORG_LZ4_PREFIX env var to BORG_LIBLZ4_PREFIX

consistency:
we also have BORG_LIBB2_PREFIX and BORG_LIBZSTD_PREFIX.
Thomas Waldmann 7 سال پیش
والد
کامیت
9b6924d27f
2فایلهای تغییر یافته به همراه5 افزوده شده و 4 حذف شده
  1. 3 2
      docs/usage_general.rst.inc
  2. 2 2
      setup.py

+ 3 - 2
docs/usage_general.rst.inc

@@ -220,8 +220,9 @@ Directories and files:
 Building:
     BORG_OPENSSL_PREFIX
         Adds given OpenSSL header file directory to the default locations (setup.py).
-    BORG_LZ4_PREFIX
-        Adds given LZ4 header file directory to the default locations (setup.py).
+    BORG_LIBLZ4_PREFIX
+        Adds given prefix directory to the default locations. If a 'include/lz4.h' is found Borg
+        will be linked against the system liblz4 instead of a bundled implementation. (setup.py)
     BORG_LIBB2_PREFIX
         Adds given prefix directory to the default locations. If a 'include/blake2.h' is found Borg
         will be linked against the system libb2 instead of a bundled implementation. (setup.py)

+ 2 - 2
setup.py

@@ -177,8 +177,8 @@ library_dirs.append(os.path.join(ssl_prefix, 'lib'))
 
 possible_liblz4_prefixes = ['/usr', '/usr/local', '/usr/local/opt/lz4', '/usr/local/lz4',
                          '/usr/local/borg', '/opt/local', '/opt/pkg', ]
-if os.environ.get('BORG_LZ4_PREFIX'):
-    possible_liblz4_prefixes.insert(0, os.environ.get('BORG_LZ4_PREFIX'))
+if os.environ.get('BORG_LIBLZ4_PREFIX'):
+    possible_liblz4_prefixes.insert(0, os.environ.get('BORG_LIBLZ4_PREFIX'))
 liblz4_prefix = setup_lz4.lz4_system_prefix(possible_liblz4_prefixes)
 if prefer_system_liblz4 and liblz4_prefix:
     print('Detected and preferring liblz4 over bundled LZ4')