File
Blob: src/workerd/server/tests/python/pth-file/pth-file.wd-test
| 1 | using Workerd = import "/workerd/workerd.capnp"; |
| 2 | |
| 3 | const unitTests :Workerd.Config = ( |
| 4 | services = [ |
| 5 | ( name = "pth-file", |
| 6 | worker = ( |
| 7 | modules = [ |
| 8 | (name = "worker.py", pythonModule = embed "worker.py"), |
| 9 | # The .pth file must live in python_modules/ so that addsitedir() picks |
| 10 | # it up. |
| 11 | (name = "python_modules/setup.pth", data = embed "setup.pth"), |
| 12 | # The .pth file adds "extra_dir" (relative to python_modules/) to |
| 13 | # sys.path. extra_module lives there. |
| 14 | (name = "python_modules/extra_dir/extra_module.py", |
| 15 | pythonModule = embed "extra_module.py"), |
| 16 | ], |
| 17 | compatibilityFlags = [%PYTHON_FEATURE_FLAGS, "disable_python_no_global_handlers", "python_process_pth_files"], |
| 18 | ) |
| 19 | ), |
| 20 | ], |
| 21 | ); |