Skip to content
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

Merged
merged 8 commits into from
Mar 31, 2020

Conversation

mdavis36
Copy link
Collaborator

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.

@jmikeowen
Copy link
Collaborator

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?

@mdavis36
Copy link
Collaborator Author

@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

@jmikeowen
Copy link
Collaborator

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.

@mdavis36
Copy link
Collaborator Author

Okay, I'll look into this more then

@mdavis36
Copy link
Collaborator Author

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

@mdavis36 mdavis36 requested a review from jmikeowen March 31, 2020 15:29
@jmikeowen
Copy link
Collaborator

This looks good to me -- I don't see any reason not to go ahead and merge it.

@jmikeowen jmikeowen merged commit 4d2e9cb into master Mar 31, 2020
@mdavis36 mdavis36 deleted the pyb11-module-depends branch March 31, 2020 18:07
jmikeowen pushed a commit that referenced this pull request Jun 12, 2020
…ster

* commit '74d050931384beda4ff545077d5552d6c81133f5':
  Fixed a missing thetamin variable in GenerateRatioSphere. Added log option to SpheralMatplotlib.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants