-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Build time dependency checking on pybind module files #10
Conversation
So if we change the set of files imported by a *MOD.py file, does it automatically regenerate the set of dependencies? I'm guessing it needs to rerun cmake? |
@jmikeowen Correct if a file is added or removed it will rebuild the module (since the top parent file was changed), but if you make any changes later to that added file you will have to rerun cmake as make won't know the added file exists as a dependency. I don't know if there is a way to do build time dependency generation |
Hmm. We should check it to be sure. This would represent losing capability that works in autoconf, and there ought to be some way to fix this. |
Okay, I'll look into this more then |
…n regenerated on each build and replaced if any dependencies have changed prompting a new configure call on the next build.
Okay so the latest changes now seem to handle everything we want to do. It works by generating a cmake file that contains a list of the python deps during configure time. During build time the cmake file is regenerated and if any changes to the dependency list have been made it is replaced. This then prompts cmake to rerun a configure stage automatically, to make sure the new file is tracked as a dependency during build time. @jmikeowen |
This looks good to me -- I don't see any reason not to go ahead and merge it. |
…ster * commit '74d050931384beda4ff545077d5552d6c81133f5': Fixed a missing thetamin variable in GenerateRatioSphere. Added log option to SpheralMatplotlib.
These changes should allow the make system to rebuild pybind modules whenever a *MOD.py file changes or any of its imported python files.
It works by generating an initial list of dependency files at configuration time that are then checked for changes during the build.