mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-10-23 01:52:48 +03:00
Add the directory containing libxml2.dll with os.add_dll_directory to make tests work on MinGW. This has changed in Python 3.8 but for some reason, the issue only turned up with Python 3.11 on MinGW. Contrary to documentation, copying libxml2.dll into the directory containing the .pyd file doesn't work.
8 lines
164 B
Python
8 lines
164 B
Python
import os
|
|
import sys
|
|
|
|
sys.path += ('..', '../.libs')
|
|
|
|
if hasattr(os, 'add_dll_directory'):
|
|
os.add_dll_directory(os.path.join(os.getcwd(), '..', '..', '.libs'))
|