This patch [1] always fails when applied to sage-5.4.rc1 compiled from
source on Ubuntu 12.04/12.10.
I was able to get the Sage Cell Server to install by learning enough about
the Mercurial mq patch system to manually apply the changes from the broken
patch [1] in a new patch, 'bc_patch_01'.
Here are my installation commands:

# applied first round of patches:
*hg qimport -P
http://trac.sagemath.org/sage_trac/raw-attachment/ticket/12719/trac_12719_ROOT_configuration_files.patch
*
*hg qimport -P
http://trac.sagemath.org/sage_trac/raw-attachment/ticket/12719/trac_12719-ipythondir013.patch
*
*hg -R local/bin qimport -P
http://trac.sagemath.org/sage_trac/raw-attachment/ticket/12719/trac_12719-scripts.patch
*
*hg -R local/bin qimport -P
http://trac.sagemath.org/sage_trac/raw-attachment/ticket/12719/trac_12719_remove_sage_gdb_ipython.patch
*
*hg -R local/bin qimport -P
http://trac.sagemath.org/sage_trac/raw-attachment/ticket/12719/12719-test-displayhook.patch
*
*hg -R devel/sage qimport -P
http://trac.sagemath.org/sage_trac/raw-attachment/ticket/12719/trac_12719-5.1beta1.patch
*

# manually applied changes from broken 'move_to_preparser_rebased.patch' (
http://goo.gl/VcSyf):
*cd devel/sage*
*gedit ./sage/misc/interpreter.py*
*gedit ./sage/misc/preparser.py*
*hg qnew -f bc_patch_01*
*cd ../..*

# applied second round of patches:
*hg -R devel/sage qimport -P
http://trac.sagemath.org/sage_trac/raw-attachment/ticket/12719/trac_12719_ipython_fixes.patch
*
*hg -R devel/sage qimport -P
http://trac.sagemath.org/sage_trac/raw-attachment/ticket/12719/trac_12719_dedent.patch
*
*hg -R devel/sage qimport -P
http://trac.sagemath.org/sage_trac/raw-attachment/ticket/12719/trac_12719-crash.patch
*
*hg -R devel/sage qimport -P
http://trac.sagemath.org/sage_trac/raw-attachment/ticket/12719/trac_12719-cellmagics013.patch
*
*hg -R devel/sage qimport -P
http://trac.sagemath.org/sage_trac/raw-attachment/ticket/12719/12719-newipython-take2.patch
*
*hg -R devel/sage qimport -P
http://trac.sagemath.org/sage_trac/raw-attachment/ticket/12719/12719-displayhook.patch
*
*hg -R devel/sage qimport -P
http://trac.sagemath.org/sage_trac/raw-attachment/ticket/12719/12719-fix-transformer.patch
*
*hg -R devel/sage qimport -P
http://trac.sagemath.org/sage_trac/raw-attachment/ticket/12719/12719-5.4rc1.patch
*
*hg -R devel/sage qimport -P
http://trac.sagemath.org/sage_trac/raw-attachment/ticket/12719/12719-remove-plugin.patch
*
*hg -R devel/sage qimport -P
http://trac.sagemath.org/sage_trac/raw-attachment/ticket/12719/12719-displayhook-library.patch
*
*hg -R devel/sage qimport -P
http://trac.sagemath.org/sage_trac/raw-attachment/ticket/12719/trac_12719-pager.patch
*
*hg -R devel/sage qimport -P
http://trac.sagemath.org/sage_trac/raw-attachment/ticket/12719/trac_12719-preparse-doctest.patch
*

# Install the newer ipython and compile:
*./sage -i http://sage.math.washington.edu/home/jason/ipython-0.13.1.spkg*
*./sage -b*

# Install the even newer ipython:
*./sage -sh -c "easy_install
https://github.com/ipython/ipython/zipball/master"*

# install the Sage Cell Server spkg:
*./sage -i
http://sage.math.washington.edu/home/jason/sagecell-spkg/sagecell-2012-09-25.spkg
*

# configure the Sage Cell Server (change sage, host, and username - 'ssh
localhost' must work without password prompt!):
*cd devel/sagecell*
*cp config_default.py config.py*
*nano config.py*

# compile the Sage Cell Server; -B is "unconditionally make all targets"
# ./sage --advanced says that -sh is "run $SHELL (/bin/bash) with Sage
environment variables"
# and -c is "evaluate cmd as sage code"
*../../sage -sh -c "make -B"*

# fire up the Sage Cell Server (visit it at localhost:8888)
*../../sage web_server.py*
=============================================
The Sage Notebook starts and runs fine and all features seem to work.
Sage Cell Server starts and runs and basic functions work, but advanced
functionality (e.g. graphing) fails with an "Internal Python error in the
inspect module": http://pastebin.com/UF3gePzX

Can you point me in the right direction to fix this?

[1]
http://trac.sagemath.org/sage_trac/attachment/ticket/12719/trac_12719-move_to_preparser_rebased.patch

*
  Brandon Curtis, PhD Candidate
UC Berkeley - Chem/Bio Eng <http://www.linkedin.com/in/brandoncurtis>
<https://kindle.amazon.com/profile/Brandon-Curtis/5046185>
  <https://plus.google.com/u/0/105858766264293200612/about>
<http://brandoncurtis.net>
  <http://jbei.org>
*


On Fri, Nov 2, 2012 at 10:07 AM, Brandon Curtis <[email protected]>wrote:

> Upon closer observation, two of the listed patches appear to fail:
> ===========================================
> *./sage --hg -R devel/sage qimport -P
> http://trac.sagemath.org/sage_trac/raw-attachment/ticket/12719/trac_12719-move_to_preparser_rebased.patch
> *
>
> adding trac_12719-move_to_preparser_rebased.patch to series file
> applying trac_12719-move_to_preparser_rebased.patch
> patching file sage/misc/interpreter.py
> Hunk #1 FAILED at 85
> 1 out of 1 hunks FAILED -- saving rejects to file
> sage/misc/interpreter.py.rej
> patch failed, unable to continue (try -v)
> patch failed, rejects left in working dir
> errors during apply, please fix and refresh
> trac_12719-move_to_preparser_rebased.patch
> ===========================================
> *./sage --hg -R devel/sage qimport -P
> http://trac.sagemath.org/sage_trac/raw-attachment/ticket/12719/12719-5.4rc1.patch
> *
>
> adding 12719-5.4rc1.patch to series file
> applying 12719-5.4rc1.patch
> cleaning up working directory...done
> abort: no username supplied (see "hg help config")
> ===========================================
>
> *
>    Brandon Curtis, PhD Candidate
> UC Berkeley - Chem/Bio Eng <http://www.linkedin.com/in/brandoncurtis> 
> <https://kindle.amazon.com/profile/Brandon-Curtis/5046185>
>   <https://plus.google.com/u/0/105858766264293200612/about> 
> <http://brandoncurtis.net>
>   <http://jbei.org>
> *
> On Thu, Nov 1, 2012 at 5:48 PM, Jason Grout 
> <[email protected]>wrote:
>
>> On 11/1/12 7:01 PM, Brandon Curtis wrote:
>>
>>> I am attempting to follow the instructions here to install Sage Cell
>>> Server 2 on Sage 5.4-rc1: https://github.com/sagemath/**
>>> sagecell/issues/344 <https://github.com/sagemath/sagecell/issues/344>
>>>
>>> Here is my complete list of commands on a fresh install of Ubuntu 12.10
>>> x64 (I'm having the identical problem on a second machine with an old
>>> install of Ubuntu 12.04 x64):
>>>
>>> *sudo apt-get install build-essential m4 gfortran perl dpkg-dev make tar
>>>
>>> dvipng ffmpeg imagemagick openssh-client texlive texlive-latex-extra
>>> xpdf xdvi libssl-dev libssl0.9.8 tk8.5-dev tk8.5-doc bzr git mercurial
>>> uuid-dev python ipython*
>>> *cp sage-5.4.rc1.tar /opt/sage/
>>> *
>>> *cd /opt/sage/
>>> *
>>> *tar -xvf sage-5.4.rc1.tar
>>> *
>>> *cd sage-5.4.rc1/*
>>> *export MAKE="make -j4"
>>> *
>>> *make*
>>>
>>>
>>> # from Sage Trac #12719 (http://trac.sagemath.org/**
>>> sage_trac/ticket/12719 <http://trac.sagemath.org/sage_trac/ticket/12719>
>>> ):
>>>
>>> *./sage --hg qimport -P
>>>
>>> http://trac.sagemath.org/sage_**trac/raw-attachment/ticket/**
>>> 12719/trac_12719_ROOT_**configuration_files.patch<http://trac.sagemath.org/sage_trac/raw-attachment/ticket/12719/trac_12719_ROOT_configuration_files.patch>
>>> ./sage --hg qimport -P
>>> http://trac.sagemath.org/sage_**trac/raw-attachment/ticket/**
>>> 12719/trac_12719-**ipythondir013.patch<http://trac.sagemath.org/sage_trac/raw-attachment/ticket/12719/trac_12719-ipythondir013.patch>
>>> ./sage --hg -R local/bin qimport -P
>>> http://trac.sagemath.org/sage_**trac/raw-attachment/ticket/**
>>> 12719/trac_12719-scripts.patch<http://trac.sagemath.org/sage_trac/raw-attachment/ticket/12719/trac_12719-scripts.patch>
>>> ./sage --hg -R local/bin qimport -P
>>> http://trac.sagemath.org/sage_**trac/raw-attachment/ticket/**
>>> 12719/trac_12719_remove_sage_**gdb_ipython.patch<http://trac.sagemath.org/sage_trac/raw-attachment/ticket/12719/trac_12719_remove_sage_gdb_ipython.patch>
>>> ./sage --hg -R local/bin qimport -P
>>> http://trac.sagemath.org/sage_**trac/raw-attachment/ticket/**
>>> 12719/12719-test-displayhook.**patch<http://trac.sagemath.org/sage_trac/raw-attachment/ticket/12719/12719-test-displayhook.patch>
>>> ./sage --hg -R devel/sage qimport -P
>>> http://trac.sagemath.org/sage_**trac/raw-attachment/ticket/**
>>> 12719/trac_12719-5.1beta1.**patch<http://trac.sagemath.org/sage_trac/raw-attachment/ticket/12719/trac_12719-5.1beta1.patch>
>>> ./sage --hg -R devel/sage qimport -P
>>> http://trac.sagemath.org/sage_**trac/raw-attachment/ticket/**
>>> 12719/trac_12719-move_to_**preparser_rebased.patch<http://trac.sagemath.org/sage_trac/raw-attachment/ticket/12719/trac_12719-move_to_preparser_rebased.patch>
>>> ./sage --hg -R devel/sage qimport -P
>>> http://trac.sagemath.org/sage_**trac/raw-attachment/ticket/**
>>> 12719/trac_12719_ipython_**fixes.patch<http://trac.sagemath.org/sage_trac/raw-attachment/ticket/12719/trac_12719_ipython_fixes.patch>
>>> ./sage --hg -R devel/sage qimport -P
>>> http://trac.sagemath.org/sage_**trac/raw-attachment/ticket/**
>>> 12719/trac_12719_dedent.patch<http://trac.sagemath.org/sage_trac/raw-attachment/ticket/12719/trac_12719_dedent.patch>
>>> ./sage --hg -R devel/sage qimport -P
>>> http://trac.sagemath.org/sage_**trac/raw-attachment/ticket/**
>>> 12719/trac_12719-crash.patch<http://trac.sagemath.org/sage_trac/raw-attachment/ticket/12719/trac_12719-crash.patch>
>>> ./sage --hg -R devel/sage qimport -P
>>> http://trac.sagemath.org/sage_**trac/raw-attachment/ticket/**
>>> 12719/trac_12719-**cellmagics013.patch<http://trac.sagemath.org/sage_trac/raw-attachment/ticket/12719/trac_12719-cellmagics013.patch>
>>> ./sage --hg -R devel/sage qimport -P
>>> http://trac.sagemath.org/sage_**trac/raw-attachment/ticket/**
>>> 12719/12719-newipython-take2.**patch<http://trac.sagemath.org/sage_trac/raw-attachment/ticket/12719/12719-newipython-take2.patch>
>>> ./sage --hg -R devel/sage qimport -P
>>> http://trac.sagemath.org/sage_**trac/raw-attachment/ticket/**
>>> 12719/12719-displayhook.patch<http://trac.sagemath.org/sage_trac/raw-attachment/ticket/12719/12719-displayhook.patch>
>>> ./sage --hg -R devel/sage qimport -P
>>> http://trac.sagemath.org/sage_**trac/raw-attachment/ticket/**
>>> 12719/12719-fix-transformer.**patch<http://trac.sagemath.org/sage_trac/raw-attachment/ticket/12719/12719-fix-transformer.patch>
>>> ./sage --hg -R devel/sage qimport -P
>>> http://trac.sagemath.org/sage_**trac/raw-attachment/ticket/**
>>> 12719/12719-5.4rc1.patch<http://trac.sagemath.org/sage_trac/raw-attachment/ticket/12719/12719-5.4rc1.patch>
>>>
>>
>> Are you sure this patch got applied?  It should have deleted the line
>> about os.chdir(os.environ["CUR"]) that is complaining in your traceback.
>>
>> Can you check to see if the two lines deleted by this patch [1] are
>> actually deleted in devel/sage/sage/misc/**interpreter.py?
>>
>> Thanks,
>>
>> Jason
>>
>>
>> [1] http://trac.sagemath.org/sage_**trac/attachment/ticket/12719/**
>> 12719-5.4rc1.patch<http://trac.sagemath.org/sage_trac/attachment/ticket/12719/12719-5.4rc1.patch>
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "sage-support" group.
>> To post to this group, send email to [email protected].
>> To unsubscribe from this group, send email to sage-support+unsubscribe@**
>> googlegroups.com <sage-support%[email protected]>.
>> Visit this group at 
>> http://groups.google.com/**group/sage-support?hl=en<http://groups.google.com/group/sage-support?hl=en>
>> .
>>
>>
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
Visit this group at http://groups.google.com/group/sage-support?hl=en.


Reply via email to