*[gentoo-science] Making ebuilds for sage packages@ 2012-12-03 1:12 Thomas Kahle2012-12-03 8:01 ` Francois Bissey 2012-12-03 10:56 ` Christopher Schwan 0 siblings, 2 replies; 3+ messages in thread From: Thomas Kahle @ 2012-12-03 1:12 UTC (permalink / raw To: Gentoo Science [-- Attachment #1: Type: text/plain, Size: 762 bytes --] Hi, I'm trying to make an ebuild that installes this here into my sage-on-gentoo installation: https://bitbucket.org/matroid/sage_matroids Their setup.py does the following: if not os.environ.has_key('SAGE_ROOT'): print " ERROR: The environment variable SAGE_ROOT must be defined." sys.exit(1) else: SAGE_ROOT = os.environ['SAGE_ROOT'] SAGE_LOCAL = SAGE_ROOT + '/local' SAGE_DEVEL = SAGE_ROOT + '/devel' SAGE_INC = SAGE_LOCAL + '/include/' and I wonder if this is wrong? Is SAGE_LOCAL="/usr" on Gentoo? In particular, where should python packages go that were installed by such an ebuild? Maybe into /usr/lib/python/site-packages ? Cheers, Thomas -- Thomas Kahle http://dev.gentoo.org/~tomka/ [-- Attachment #2: Digital signature --] [-- Type: application/pgp-signature, Size: 316 bytes --] ^ permalink raw reply [flat|nested] 3+ messages in thread

*Re: [gentoo-science] Making ebuilds for sage packages2012-12-03 1:12 [gentoo-science] Making ebuilds for sage packages Thomas Kahle@ 2012-12-03 8:01 ` Francois Bissey2012-12-03 10:56 ` Christopher Schwan 1 sibling, 0 replies; 3+ messages in thread From: Francois Bissey @ 2012-12-03 8:01 UTC (permalink / raw To: gentoo-science On 03/12/12 14:12, Thomas Kahle wrote: > Hi, > > I'm trying to make an ebuild that installes this here into my > sage-on-gentoo installation: > https://bitbucket.org/matroid/sage_matroids > > Their setup.py does the following: > > if not os.environ.has_key('SAGE_ROOT'): > print " ERROR: The environment variable SAGE_ROOT must be defined." > sys.exit(1) > else: > SAGE_ROOT = os.environ['SAGE_ROOT'] > SAGE_LOCAL = SAGE_ROOT + '/local' > SAGE_DEVEL = SAGE_ROOT + '/devel' > SAGE_INC = SAGE_LOCAL + '/include/' > > and I wonder if this is wrong? Is SAGE_LOCAL="/usr" on Gentoo? In > particular, where should python packages go that were installed by such > an ebuild? Maybe into /usr/lib/python/site-packages ? > Hi Thomas, this is totally wrong for sage-on-gentoo. I have been pushing for minimizing the use of SAGE_ROOT as much as possible. SAGE_LOCAL must not be defined that way on sage-on-gentoo. My recommendation for sage-on-gentoo (and it wouldn't work with vanilla sage so don't try to push upstream) would be to replace that section with: from sage.misc.variables import SAGE_ROOT, SAGE_LOCAL SAGE_DEVEL = SAGE_ROOT + '/devel' SAGE_INC = SAGE_LOCAL + '/include/' The package should go in $(python_get_sitedir)/sage/${PN} as the recommendation on their page is under the sage hierarchy. I would personally prefer it under $(python_get_sitedir)/${PN} but you may have to 1) fix some import. 2) adjust the tutorial and manual. Unless the code is planned to be merged in sage proper in the future there is no reason to put it in the sage folder in the first place. I just had a quick look at the code and the variable "INCLUDE" will need fixing too. They also have a "module_list.py" which mirror (uselessly) setup.py and will need the same fixes. Francois ^ permalink raw reply [flat|nested] 3+ messages in thread

*2012-12-03 1:12 [gentoo-science] Making ebuilds for sage packages Thomas Kahle 2012-12-03 8:01 ` Francois BisseyRe: [gentoo-science] Making ebuilds for sage packages@ 2012-12-03 10:56 ` Christopher Schwan1 sibling, 0 replies; 3+ messages in thread From: Christopher Schwan @ 2012-12-03 10:56 UTC (permalink / raw To: gentoo-science On Sunday 02 December 2012 17:12:37 you wrote: > Hi, > > I'm trying to make an ebuild that installes this here into my > sage-on-gentoo installation: > https://bitbucket.org/matroid/sage_matroids > > Their setup.py does the following: > > if not os.environ.has_key('SAGE_ROOT'): > print " ERROR: The environment variable SAGE_ROOT must be defined." > sys.exit(1) > else: > SAGE_ROOT = os.environ['SAGE_ROOT'] > SAGE_LOCAL = SAGE_ROOT + '/local' > SAGE_DEVEL = SAGE_ROOT + '/devel' > SAGE_INC = SAGE_LOCAL + '/include/' > > and I wonder if this is wrong? Is SAGE_LOCAL="/usr" on Gentoo? In > particular, where should python packages go that were installed by such > an ebuild? Maybe into /usr/lib/python/site-packages ? > > Cheers, > Thomas For sage-on-gentoo it is wrong, because here SAGE_LOCAL != SAGE_ROOT/local. In particular, we have SAGE_ROOT="${EPREFIX}/usr/share/sage" SAGE_LOCAL="${EPREFIX}/usr/" SAGE_DATA="${EPREFIX}/usr/share/sage" SAGE_SHARE="${EPREFIX}/usr/share/sage" SAGE_DOC="${EPREFIX}/usr/share/sage/devel/sage/doc" SAGE_EXTCODE="${EPREFIX}/usr/share/sage/ext" (from sage-4.5.1-r1.ebuild). Python packages should be installed to the default location, just use python/distutils eclasses for that. Cheers, Christopher ^ permalink raw reply [flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-12-03 12:03 UTC | newest]Thread overview:3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2012-12-03 1:12 [gentoo-science] Making ebuilds for sage packages Thomas Kahle 2012-12-03 8:01 ` Francois Bissey 2012-12-03 10:56 ` Christopher Schwan

This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox