#10192: SageNB broken when SAGE_PATH contains flavours of  '.' during 
installation
--------------------------------------------------------------------------------------------------------+
    Reporter:  hivert                                                           
                        |         Owner:  jason, was    
        Type:  defect                                                           
                        |        Status:  needs_review  
    Priority:  major                                                            
                        |     Milestone:  sage-5.0      
   Component:  build                                                            
                        |    Resolution:                
    Keywords:  notebook installation dot PYTHONPATH easy_install easy-install 
pth sage-spkg setuptools  |   Work_issues:                
    Upstream:  N/A                                                              
                        |      Reviewer:  Florent Hivert
      Author:  Leif Leonhardy                                                   
                        |        Merged:                
Dependencies:  #11073                                                           
                        |  
--------------------------------------------------------------------------------------------------------+
Changes (by ppurka):

  * status:  new => needs_review


Old description:

> When `SAGE_PATH` (and hence also `PYTHONPATH`) contains "`.`" (the
> current working directory) during the installation of `sagenb`, Python is
> able to find `sagenb` in its path and therefore refuses to add it to
> `easy-install.pth`. Later, Sage won't find it, leading to the following
> error message:
> {{{
> ImportError: No module named sagenb.misc.sphinxify
> Error importing ipy_profile_sage - perhaps you should run %upgrade?
> WARNING: Loading of ipy_profile_sage failed.
> }}}
>
> This is a follow-up to #10176, and there has been some discussion on
> [http://groups.google.com/group/sage-
> release/browse_thread/thread/bb636656e2153332 sage-release].
>
> ----
>
> Apply only
>
> [attachment:10192-remove_dot_from_PYTHONPATH_in_sage-spkg.patch]
> to the Sage '''root repository'''.

New description:

 When `SAGE_PATH` (and hence also `PYTHONPATH`) contains "`.`" (the current
 working directory) during the installation of `sagenb`, Python is able to
 find `sagenb` in its path and therefore refuses to add it to `easy-
 install.pth`. Later, Sage won't find it, leading to the following error
 message:
 {{{
 ImportError: No module named sagenb.misc.sphinxify
 Error importing ipy_profile_sage - perhaps you should run %upgrade?
 WARNING: Loading of ipy_profile_sage failed.
 }}}

 This is a follow-up to #10176, and there has been some discussion on
 [http://groups.google.com/group/sage-
 release/browse_thread/thread/bb636656e2153332 sage-release].

 ----

 Apply only

 [attachment:10192-remove_dot_from_PYTHONPATH_in_sage-spkg.2.patch]
 to the Sage '''root repository'''.

--

Comment:

 Updated the patch with the stated modifications. Please review.

 Here is the output in busybox (probably the closest system to POSIX I have
 around here, but the earlier version also works fine):
 {{{
 ~> busybox sh


 BusyBox v1.18.4 (Ubuntu 1:1.18.4-2ubuntu2) built-in shell (ash)
 Enter 'help' for a list of built-in commands.

 ~ $ EXAMPLE=".::./././//./://bingo//:baz:::://///:./.:."
 ~ $ echo :$EXAMPLE: | busybox sed -e 's|//*|/|g' -e 's|:\(\./\)\{1,\}|:|g'
 -e 's
 |\(/\.\)\{1,\}:|:|g' -e 's|\(:\.\)\{1,\}:|:|g' -e 's|::*|:|g' -e
 's|^::*||' -e '
 s|::*$||'
 /bingo/:baz:/
 }}}

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/10192#comment:26>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

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

Reply via email to