1 |
On 03/12/12 14:12, Thomas Kahle wrote: |
2 |
> Hi, |
3 |
> |
4 |
> I'm trying to make an ebuild that installes this here into my |
5 |
> sage-on-gentoo installation: |
6 |
> https://bitbucket.org/matroid/sage_matroids |
7 |
> |
8 |
> Their setup.py does the following: |
9 |
> |
10 |
> if not os.environ.has_key('SAGE_ROOT'): |
11 |
> print " ERROR: The environment variable SAGE_ROOT must be defined." |
12 |
> sys.exit(1) |
13 |
> else: |
14 |
> SAGE_ROOT = os.environ['SAGE_ROOT'] |
15 |
> SAGE_LOCAL = SAGE_ROOT + '/local' |
16 |
> SAGE_DEVEL = SAGE_ROOT + '/devel' |
17 |
> SAGE_INC = SAGE_LOCAL + '/include/' |
18 |
> |
19 |
> and I wonder if this is wrong? Is SAGE_LOCAL="/usr" on Gentoo? In |
20 |
> particular, where should python packages go that were installed by such |
21 |
> an ebuild? Maybe into /usr/lib/python/site-packages ? |
22 |
> |
23 |
|
24 |
Hi Thomas, |
25 |
|
26 |
this is totally wrong for sage-on-gentoo. I have been pushing for |
27 |
minimizing the use of SAGE_ROOT as much as possible. |
28 |
SAGE_LOCAL must not be defined that way on sage-on-gentoo. |
29 |
|
30 |
My recommendation for sage-on-gentoo (and it wouldn't work with |
31 |
vanilla sage so don't try to push upstream) would be to replace that |
32 |
section with: |
33 |
|
34 |
from sage.misc.variables import SAGE_ROOT, SAGE_LOCAL |
35 |
SAGE_DEVEL = SAGE_ROOT + '/devel' |
36 |
SAGE_INC = SAGE_LOCAL + '/include/' |
37 |
|
38 |
The package should go in $(python_get_sitedir)/sage/${PN} as the |
39 |
recommendation on their page is under the sage hierarchy. |
40 |
I would personally prefer it under $(python_get_sitedir)/${PN} but |
41 |
you may have to |
42 |
1) fix some import. |
43 |
2) adjust the tutorial and manual. |
44 |
Unless the code is planned to be merged in sage proper in the future |
45 |
there is no reason to put it in the sage folder in the first place. |
46 |
|
47 |
I just had a quick look at the code and the variable "INCLUDE" will need |
48 |
fixing too. They also have a "module_list.py" which mirror (uselessly) |
49 |
setup.py and will need the same fixes. |
50 |
|
51 |
Francois |