1 |
Fabian Groffen kirjoitti: |
2 |
> |
3 |
> would it be possible to do it like we do it in Portage? |
4 |
> |
5 |
> sys.path.insert(0, os.path.join(os.path.dirname(os.path.dirname(os.path. realpath(__file__))), "pym")) |
6 |
> |
7 |
|
8 |
Or we could just depend on a new enough Portage where just import |
9 |
portage works. This probably works in prefix too? |
10 |
|
11 |
> |
12 |
> The globs in findclass I guess we'll have to patch in the prefix case, |
13 |
> though I'm wondering if that doesn't need ROOT support anyway? |
14 |
> If you'd really want to make be happy you'd do a |
15 |
> try: |
16 |
> from portage.const import EPREFIX |
17 |
> catch ImportError: |
18 |
> EPREFIX = '' |
19 |
> |
20 |
> pkg = glob.glob(EPREFIX + '/usr/share/*/package.env') |
21 |
> |
22 |
|
23 |
Well you build against the stuff in / so ROOT should not be used I think. |
24 |
|
25 |
Regards, |
26 |
Petteri |