Ticket #7778 (closed defect: fixed)

Opened 3 years ago

Last modified 3 years ago

Update jsMath-image-fonts install path detection

Reported by: mpatel Owned by: was
Priority: major Milestone: sage-4.3.1
Component: notebook Keywords:
Cc: drkirkby, robert.marik, timdumol, was Work issues:
Report Upstream: N/A Reviewers: Robert Marik
Authors: Mitesh Patel Merged in:
Dependencies: Stopgaps:

Description

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.

Change History

comment:1 Changed 3 years ago by mpatel

  • Cc drkirkby, robert.marik, timdumol, was added
  • Status changed from new to needs_review

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.

comment:2 Changed 3 years ago by robert.marik

  • Status changed from needs_review to positive_review
  • Reviewers set to Robert Marik

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

comment:3 Changed 3 years ago by mhansen

  • Status changed from positive_review to closed
  • Resolution set to fixed

I've merged this in with the optional spkgs.

comment:4 Changed 3 years ago by was

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.

comment:5 Changed 3 years ago by mpatel

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?

Note: See TracTickets for help on using tickets.