-
Notifications
You must be signed in to change notification settings - Fork 6
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
Initialise environment from global Python variables #989
Conversation
So do I understand correctly that with this change the warnings on bhaviour changes is remvoed by default when using dlite-validate? Can it be added if the users wants to? It would be good to write two sentences about this in the tools documentation (on dlite-validate) |
Yes, the behavior warning is now removed in dlite-validate. It is possible to add a separate or extend the --debug option to turn on behavior warnings. In that case we have to process the options before importing dlite. Would you prefer that? |
I am not sure we need it. but if it easy do add witht he debug option it might be a good idea. |
Done. Also made sure that needed cmake configurations are available in dlite-pyembed.c |
Description
Alternative to PR #988 for fixing issue #978.
This PR allows Python application to configure
dlite
via global variables.Global variables in (the
__main__
module of) Python that starts with "DLITE_" will be set as environment variables seen bydlite
.Hence, starting your application as
has the same effect as setting
DLITE_BEHAVIOR="ON"
before importingdlite
inapp.py
.Type of change
Checklist for the reviewer
This checklist should be used as a help for the reviewer.