-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Problem
When generating wrappers for local Python modules, users need to set PYTHONPATH manually:
PYTHONPATH=./python npx tywrap generateThe generator silently produces nothing if Python can't find the modules. There's no config option to specify where local modules live.
Current Behavior
// tywrap.config.ts
export default defineConfig({
pythonModules: {
'my_local_module': { functions: ['my_func'] } // Won't find without PYTHONPATH
}
});Proposed Solution
Add a pythonPath or localModules option to the config:
export default defineConfig({
pythonPath: ['./python', './src/python'], // Added to PYTHONPATH during generation
// or
localModules: {
path: './python',
modules: ['my_local_module']
},
pythonModules: {
'my_local_module': { functions: ['my_func'] }
}
});Additional Context
- Related to Add pythonPath/localModules config option for local Python modules #131 (silent failures) - better error messages would help here too
- Should document this behavior in getting-started guide
Labels
enhancement, config, developer-experience
Metadata
Metadata
Assignees
Labels
No labels