1 |
Vlastimil Babka kirjoitti: |
2 |
> |
3 |
> Index: src/java_config/EnvironmentManager.py |
4 |
> =================================================================== |
5 |
> --- src/java_config/EnvironmentManager.py (revision 4675) |
6 |
> +++ src/java_config/EnvironmentManager.py (working copy) |
7 |
> @@ -308,6 +308,43 @@ |
8 |
> |
9 |
> return path |
10 |
> |
11 |
> + def add_pkg_env(self, pkg, env): |
12 |
> + env_vars = pkg.query("ENV_VARS") |
13 |
> + if (env_vars): |
14 |
> + for var in env_vars.split(' '): |
15 |
> + val = pkg.query(var) |
16 |
> + assert val |
17 |
> + if (not env.has_key(var)): |
18 |
> + env[var] = val |
19 |
|
20 |
This probably could be named a bit better as I confuse pkg_env with the |
21 |
package.env file. |
22 |
|
23 |
if (not env.has_key(var)): |
24 |
|
25 |
This is the same as not var in env |
26 |
>>> dict = { "foo":"bar", "foo2":"bar2" } |
27 |
>>> "foo" in dict |
28 |
True |
29 |
>>> "foo3" in dict |
30 |
False |
31 |
|
32 |
|
33 |
> + |
34 |
> + def build_dep_env(self, pkgs, missing_deps): |
35 |
> + env = {} |
36 |
> + |
37 |
> + unresolved = Set() |
38 |
> + resolved = Set() |
39 |
> + |
40 |
> + for p in pkgs[:]: |
41 |
|
42 |
for p in pkgs: |
43 |
|
44 |
Although the current functions are not documented, it would help if we |
45 |
documented all new functions using pydoc: |
46 |
http://www.python.org/dev/peps/pep-0287/ |
47 |
|
48 |
If it works, I am fine with you committing it. Should probably get a |
49 |
couple of other fixes in there at the same time too for a new release. |
50 |
|
51 |
Regards, |
52 |
Petteri |