sagemath / sage

Main repository of SageMath
https://www.sagemath.org
Other
1.38k stars 471 forks source link

Update jsMath-image-fonts install path detection #7778

Closed e14f4152-4982-4ace-8c95-73a0599b109b closed 14 years ago

e14f4152-4982-4ace-8c95-73a0599b109b commented 14 years ago

Post-#7467, the SageNB install path depends on its version, but jsmath-image-fonts-1.4.p2.spkg expects a slightly different format.

This ticket just updates spkg-install.

See sage-devel, sage-devel.

Related tickets: #7196, #7229, #7467, #7755.

CC: @sagetrac-drkirkby @robert-marik @TimDumol @williamstein

Component: notebook

Author: Mitesh Patel

Reviewer: Robert Marik

Issue created by migration from https://trac.sagemath.org/ticket/7778

e14f4152-4982-4ace-8c95-73a0599b109b commented 14 years ago
comment:1

There's a trial package at

I've CC'd Dr. Kirkby, because I see

$ checkbashisms -x -f spkg-install
possible bashism in spkg-install line 36 (bash arrays, ${name[0|*|@]}):
for DIR in ${CANDIDATES[@]}; do
possible bashism in spkg-install line 44 (bash arrays, ${name[0|*|@]}):
    echo "${CANDIDATES[*]}"

I don't know if these are problems on Solaris or, if they are, how to work around them.

34f90a52-c114-47db-a93b-3f83978622c0 commented 14 years ago
comment:2

Works with Sage 4.3. Positive review. Thanks for fixing.

34f90a52-c114-47db-a93b-3f83978622c0 commented 14 years ago

Reviewer: Robert Marik

mwhansen commented 14 years ago
comment:3

I've merged this in with the optional spkgs.

williamstein commented 14 years ago
comment:4

Hi,

I upgraded sagenb.org to use sagenb-0.5. I then tried to install this spkg. It definitely got confused and didn't work, for some reason (maybe because of an old sagenb from before). I eventually manually copied the fonts to:

/usr/local/sage/local/lib/python/site-packages/sagenb/data/jsmath/fonts

where sagenb is a symlink to sagenb-0.5-*egg/sagenb, and this did work.

Notice that:

root@boxen:/usr/local/sage/local/lib/python/site-packages/sagenb/data/jsmath/fonts# python
Python 2.5.2 (r252:60911, Jul 22 2009, 15:33:10) 
[GCC 4.2.4 (Ubuntu 4.2.4-1ubuntu3)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> from pkg_resources import Requirement, working_set
>>> sagenb_path = working_set.find(Requirement.parse('sagenb')).location
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'NoneType' object has no attribute 'location'

I'm really just recording this for posterity in case there really is something wrong. I don't have time to delve deeper now.

e14f4152-4982-4ace-8c95-73a0599b109b commented 14 years ago
comment:5

I would not be surprised, if it really is wrong. The Python script embedded in spkg-install is run with /usr/bin/env python. Maybe this doesn't always use Sage's python?