1
0
Fork 0

environment variables instead of patch

This commit is contained in:
Robert Schade 2017-11-25 20:29:18 +01:00
parent 4b8ab7392b
commit a62732b506
2 changed files with 3 additions and 33 deletions

View file

@ -1,31 +0,0 @@
diff --git setup.py setup.py
index 33116acd..40db200f 100644
--- setup.py
+++ setup.py
@@ -115,7 +115,7 @@ def detect_lz4(prefixes):
include_dirs = []
library_dirs = []
-possible_openssl_prefixes = ['/usr', '/usr/local', '/usr/local/opt/openssl', '/usr/local/ssl', '/usr/local/openssl', '/usr/local/borg', '/opt/local']
+possible_openssl_prefixes = ['/usr', '/usr/local', '/usr/local/opt/openssl', '/usr/local/ssl', '/usr/local/openssl', '/usr/local/borg', '/opt/local', '/data/data/com.termux/files/usr/']
if os.environ.get('BORG_OPENSSL_PREFIX'):
possible_openssl_prefixes.insert(0, os.environ.get('BORG_OPENSSL_PREFIX'))
ssl_prefix = detect_openssl(possible_openssl_prefixes)
@@ -125,7 +125,7 @@ def detect_lz4(prefixes):
library_dirs.append(os.path.join(ssl_prefix, 'lib'))
-possible_lz4_prefixes = ['/usr', '/usr/local', '/usr/local/opt/lz4', '/usr/local/lz4', '/usr/local/borg', '/opt/local']
+possible_lz4_prefixes = ['/usr', '/usr/local', '/usr/local/opt/lz4', '/usr/local/lz4', '/usr/local/borg', '/opt/local', '/data/data/com.termux/files/usr/']
if os.environ.get('BORG_LZ4_PREFIX'):
possible_lz4_prefixes.insert(0, os.environ.get('BORG_LZ4_PREFIX'))
lz4_prefix = detect_lz4(possible_lz4_prefixes)
@@ -161,7 +161,7 @@ def detect_libb2(prefixes):
crypto_libraries = ['crypto']
possible_openssl_prefixes = ['/usr', '/usr/local', '/usr/local/opt/openssl', '/usr/local/ssl', '/usr/local/openssl',
- '/usr/local/borg', '/opt/local', '/opt/pkg', ]
+ '/usr/local/borg', '/opt/local', '/opt/pkg', '/data/data/com.termux/files/usr/']
if os.environ.get('BORG_OPENSSL_PREFIX'):
possible_openssl_prefixes.insert(0, os.environ.get('BORG_OPENSSL_PREFIX'))
ssl_prefix = detect_openssl(possible_openssl_prefixes)

View file

@ -65,8 +65,9 @@ make
make install install-lib install-dev
cd ..
#patching paths in setup.py
patch -p0 < ../borg.patch
#patching paths
export BORG_OPENSSL_PREFIX="/data/data/com.termux/files/usr/"
export BORG_LZ4_PREFIX="/data/data/com.termux/files/usr/"
pip install -e .