How can I use auto-generated Python modules with editable builds #840
-
|
Is it possible to use auto-generated Python modules in editable builds? I am generating a Python module with a bunch of |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
|
Yes it is possible, we do this in Your question is too brief to know exactly what the problem is - you may be talking about callbacks from C to Python or some such thing? If you provide a standalone reproducer of the problem you're seeing or share your actual project, we can say more. |
Beta Was this translation helpful? Give feedback.
Providing a standalone reproduces would be a non-trivial task. However, here is a more detailed explanation:
A
custom_targetgenerates a Python file like this example:<path>/module.pyBecause it is generated as part of a
custom_target, the file is placed in<project dir>/build/cp314/<path>.Now, in my Python application, I want to do
import <path>.<module>. What I was seeing is that it would attempt to load it from<project dir>/<path>rather then<project dir>/build/cp314/<path>/module.py.However, I don't know what I did but it is working properly now. We can close this discussion.