commands: |
LD_LIBRARY_PATH.append(‘${LD_LIBRARY_PATH}’)
that should be:
commands: |
env.LD_LIBRARY_PATH.append('${LD_LIBRARY_PATH}')
--
You received this message because you are subscribed to a topic in the Google Groups "rez-config" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/rez-config/BiOYf7ZvT0A/unsubscribe.
To unsubscribe from this group and all its topics, send an email to rez-config+...@googlegroups.com.
To post to this group, send email to rez-c...@googlegroups.com.
Visit this group at http://groups.google.com/group/rez-config.
For more options, visit https://groups.google.com/d/optout.
so in tcsh AFAIK there is no way around it, you have to if/else that line in case the variable did not exists.it ends up writingThanks Chad, Allan:
It does fix the NameError exception, but does not solve the Undefined variable issue
setenv LD_LIBRARY_PATH "${LD_LIBRARY_PATH}"
FedePS: I just did a git pull to get the latest and after workaround a couple of things I tried again with no luck, I still get the same error.
FYI. The 2 things that I had to workaround might be due to my local install, but just in case here they are:
1) I need to pass --no-bootstrap to rez-env
- since if not set is _get_rez_dist_path() or rez utils returns None if the path does not exists hence the validate on the setting module complains.
- I think that just returning an empty string might be better idea
2) I don't know how to specify a version on the package yaml so it does end up with a Version type.- so I changed line 591 on resources.py from
'version': Version('1.2'),
to
'version': OneOf(lambda: None, 'str', 1.2),
On Tue, Jun 3, 2014 at 2:17 AM, allan.johns <nerd...@gmail.com> wrote:
Hi Fede,
Chad is right that should fix the problem. If it doesn't then it's a bug, there's code to deal with this case specifically. Let me know if so and I'll look into it.
Thanks,
A
On Monday, June 2, 2014 7:52:58 AM UTC-7, Chad Dombrova wrote:commands: |
LD_LIBRARY_PATH.append(‘${LD_LIBRARY_PATH}’)that should be:
commands: | env.LD_LIBRARY_PATH.append('${LD_LIBRARY_PATH}')
I'm not sure that that completely fixes your problem, but it should resolve your NameError exception with 2.0.chad.
--
You received this message because you are subscribed to a topic in the Google Groups "rez-config" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/rez-config/BiOYf7ZvT0A/unsubscribe.
To unsubscribe from this group and all its topics, send an email to rez-config+unsubscribe@googlegroups.com.
one thing that is unclear to me is why are you appending LD_LIBRARY_PATH
to itself? Is that really the behavior you’re after?
if you do this:
env.LD_LIBRARY_PATH.append('$BAR')
it should work as long as BAR
exists, even if LD_LIBRARY_PATH
did not previously exist. however, if BAR
does not exist, I think it’s an error, which is valid behavior. Also, I believe this should work:
if env.BAR:
env.LD_LIBRARY_PATH.append('$BAR')
that module has changed around a lot, so I can’t remember the exact syntax. the point is you should be able to check the value of BAR
.
chad.
--
You received this message because you are subscribed to the Google Groups "rez-config" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rez-config+...@googlegroups.com.
if env.BAR:
env.LD_LIBRARY_PATH.append('$BAR')
if defined('BAR'):
env.LD_LIBRARY_PATH.append('$BAR')
...although I think it should be renamed 'envdefined' or 'env_defined', or perhaps 'env.defined'.To unsubscribe from this group and all its topics, send an email to rez-config+unsubscribe@googlegroups.com.
To post to this group, send email to rez-c...@googlegroups.com.
Visit this group at http://groups.google.com/group/rez-config.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "rez-config" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rez-config+unsubscribe@googlegroups.com.
On Monday, June 2, 2014 6:38:43 PM UTC-7, Fede Naum wrote:so in tcsh AFAIK there is no way around it, you have to if/else that line in case the variable did not exists.it ends up writingThanks Chad, Allan:
It does fix the NameError exception, but does not solve the Undefined variable issue
setenv LD_LIBRARY_PATH "${LD_LIBRARY_PATH}"
Ok I know what this is... there is a fix for this but it's only used in certain cases right now. I'll fix this soon so it applies always.
FedePS: I just did a git pull to get the latest and after workaround a couple of things I tried again with no luck, I still get the same error.
FYI. The 2 things that I had to workaround might be due to my local install, but just in case here they are:
1) I need to pass --no-bootstrap to rez-env
- since if not set is _get_rez_dist_path() or rez utils returns None if the path does not exists hence the validate on the setting module complains.
- I think that just returning an empty string might be better idea
If this isn't a showstopper then I'd just hold tight, we're in the middle of reworking the installation process and the way bootstrapped packages are managed.
2) I don't know how to specify a version on the package yaml so it does end up with a Version type.- so I changed line 591 on resources.py from
'version': Version('1.2'),
to
'version': OneOf(lambda: None, 'str', 1.2),
I'm sorry I don't follow, what's the problem you're trying to fix here?
To unsubscribe from this group and all its topics, send an email to rez-config+...@googlegroups.com.
To unsubscribe from this group and all its topics, send an email to rez-config+...@googlegroups.com.
Thanks Chad and Allan,I had a read at the parent_variables setting in rezconfig, and also looked at the code, but I'm don't think this is going to solve the issue. (not for tcsh). if you leave unexpanded values then at the source time if any does not exists tcsh will keep complaining.
Also having in mind something that I discussed with Mark, I think that having something likeif env.BAR: env.LD_LIBRARY_PATH.append('$BAR')
won't work either, because this is just checking that the variable is set at the time that the context.csh file is created. Something that I understood from my discussion with Mark is that you might want to use a generated context file at a later time and potentially in a different parent environment where the variable might/might not be set.
On the other hand if my understanding is wrong then there should be no need to do the if env.BAR on the package.yaml since that can be handled more easily in the shell plugins by just doing aif 'BAR' in os.environwrite a setenv/or equivalent for that particular shellelseyou set the value but remove the ${BAR} bit
what is the behaviour of BASH
In rez-2, contexts are stored into .rxt files, which are *pre*-interpreted. Interpretation happens when that context file is consumed, either via the new API or using the cli command "rez-env --input". So the above will work - control flow is delayed until interpretation time. This is different to Rez-1, where interpretation happened at the same time the context was created, but this meant (A) no control flow capabilities and (B) bash centricity.
On the other hand if my understanding is wrong then there should be no need to do the if env.BAR on the package.yaml since that can be handled more easily in the shell plugins by just doing aif 'BAR' in os.environwrite a setenv/or equivalent for that particular shellelseyou set the value but remove the ${BAR} bit
It is possible to make this work, the question is whether we should, because it deviates from tcsh behaviour. If we did add this then I would say it should be a configurable option in the tcsh shell plugin, which defaults to False. I'd still like to find out more about your particular use case though.
In rez-2, contexts are stored into .rxt files, which are *pre*-interpreted. Interpretation happens when that context file is consumed, either via the new API or using the cli command "rez-env --input". So the above will work - control flow is delayed until interpretation time. This is different to Rez-1, where interpretation happened at the same time the context was created, but this meant (A) no control flow capabilities and (B) bash centricity.
That's sound like would solve the problem then.
just to double check, does the consumer process contemplates the case where the variable is not in the parent environment, but it is defined in a package that get's included earlier
i.e
the variable MOUNT_POINT is not defined in the parent environment,CentOS and Windows package define MOUNT_POINT
CentOS does not define a MOUNT_POINT
Windows MOUNT_POINT=C:/Then a package X uses that like
env.MY_PRESET.setenv('/film/presets/')
if env.MOUNT_POINT: env.MY_PRESET.prepend('$MOUNT_POINT')
So, if I pre-bake this context in linux, would I then be able to consume the .rtx file on windows and get the MOUNT_POINT appened?
On the other hand if my understanding is wrong then there should be no need to do the if env.BAR on the package.yaml since that can be handled more easily in the shell plugins by just doing aif 'BAR' in os.environwrite a setenv/or equivalent for that particular shellelseyou set the value but remove the ${BAR} bit
It is possible to make this work, the question is whether we should, because it deviates from tcsh behaviour. If we did add this then I would say it should be a configurable option in the tcsh shell plugin, which defaults to False. I'd still like to find out more about your particular use case though.
Well I'm not sure if deviating from tcsh behavior is bad in this case, I mean, at the end of the day what you want is to write a package yaml that ends up resolving an environment with the same value for the variables regardless which shell you are using, right?
An option in tcsh plugin to manage this behavior makes sense to me.
--
You received this message because you are subscribed to a topic in the Google Groups "rez-config" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/rez-config/BiOYf7ZvT0A/unsubscribe.
To unsubscribe from this group and all its topics, send an email to rez-config+...@googlegroups.com.