File tree Expand file tree Collapse file tree 1 file changed +20
-1
lines changed
Expand file tree Collapse file tree 1 file changed +20
-1
lines changed Original file line number Diff line number Diff line change 55import base64
66import io
77import json as _json
8+ import os
9+ import sys
810import uuid
911from datetime import timedelta
1012from http .client import responses as http_responses
13+ from pathlib import Path
1114from urllib .parse import parse_qs , urlencode , urlparse , urlunparse
1215
16+ # On Windows, add DLL search paths for dependencies
17+ if sys .platform == "win32" and hasattr (os , "add_dll_directory" ):
18+ # Add vcpkg DLL directory
19+ vcpkg_bin = Path ("C:/vcpkg/installed/x64-windows/bin" )
20+ if vcpkg_bin .exists ():
21+ os .add_dll_directory (str (vcpkg_bin ))
22+
23+ # Add vendor DLL directories if they exist
24+ try :
25+ # Get the project root (3 levels up from this file)
26+ project_root = Path (__file__ ).parent .parent .parent
27+ boringssl_dll = project_root / "vendor" / "boringssl" / "build" / "Release"
28+ if boringssl_dll .exists ():
29+ os .add_dll_directory (str (boringssl_dll ))
30+ except Exception :
31+ pass # Silently ignore if we can't determine paths
32+
1333try :
1434 from httpmorph import _httpmorph
1535
1636 HAS_C_EXTENSION = True
1737except ImportError as e :
18- import sys
1938 print (f"WARNING: Failed to import _httpmorph: { e } " , file = sys .stderr )
2039 import traceback
2140 traceback .print_exc ()
You can’t perform that action at this time.
0 commit comments