mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Try using DYLD_INSERT_LIBRARIES instead
This commit is contained in:
parent
829f3d4e0e
commit
7ee339ab14
@ -46,8 +46,6 @@ class Test(Command):
|
||||
sys.libxslt_dylib = ctypes.CDLL(os.path.join(os.environ['SW'], 'lib', 'libxslt.dylib'))
|
||||
sys.libexslt_dylib = ctypes.CDLL(os.path.join(os.environ['SW'], 'lib', 'libexslt.dylib'))
|
||||
print(sys.libxml2_dylib, sys.libxslt_dylib, sys.libexslt_dylib, file=sys.stderr, flush=True)
|
||||
os.non_calibre_subprocess_env = e = os.environ
|
||||
del e['DYLD_LIBRARY_PATH']
|
||||
from calibre.utils.run_tests import (
|
||||
filter_tests_by_name, remove_tests_by_name, run_cli, find_tests
|
||||
)
|
||||
|
@ -161,7 +161,8 @@ username = api
|
||||
if ismacos:
|
||||
os.environ['SSL_CERT_FILE'] = os.path.abspath(
|
||||
'resources/mozilla-ca-certs.pem')
|
||||
os.environ['DYLD_LIBRARY_PATH'] = os.path.join(SW, 'lib') # needed to ensure correct libxml2.dylib is loaded
|
||||
# needed to ensure correct libxml2 is loaded
|
||||
os.environ['DYLD_INSERT_LIBRARIES'] = ':'.join(os.path.join(SW, 'lib', x) for x in 'libxml2.dylib libxslt.dylib libexslt.dylib'.split())
|
||||
|
||||
install_env()
|
||||
run_python('setup.py test')
|
||||
|
@ -233,7 +233,7 @@ class TestAuth(BaseTest):
|
||||
if curl:
|
||||
def docurl(data, *args):
|
||||
cmd = [curl] + list(args) + ['http://localhost:%d/closed' % server.address[1]]
|
||||
p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.DEVNULL, env=getattr(os, 'non_calibre_subprocess_env', os.environ))
|
||||
p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.DEVNULL)
|
||||
x = p.stdout.read()
|
||||
p.wait()
|
||||
self.ae(x, data)
|
||||
|
Loading…
x
Reference in New Issue
Block a user