#12868: Attaching a pyx file in the presence of __init__.py results in wrong 
module
names
-----------------------------+----------------------------------------------
       Reporter:  SimonKing  |         Owner:  jason   
           Type:  defect     |        Status:  new     
       Priority:  major      |     Milestone:  sage-5.1
      Component:  misc       |    Resolution:          
       Keywords:             |   Work issues:          
Report Upstream:  N/A        |     Reviewers:          
        Authors:             |     Merged in:          
   Dependencies:             |      Stopgaps:          
-----------------------------+----------------------------------------------

Comment (by SimonKing):

 Replying to [comment:7 leif]:
 > Currently changing the patch to remove the (in your opinion) undesirable
 link to `__init__.py` earlier, such that `cython`, when invoked, won't see
 it.

 That wouldn't be a solution. Perhaps the user ''wants'' (for some reason)
 to have it in the folder (in particular, it is no user error).

 I believe that it should simply not matter for attaching files whether or
 not `__init__.py` is there. Of course, if you have a Python file and want
 that you can import (not attach) it, then you would create the
 `__init__.py` (this is why I created it, anyway).

 Attaching a file should be independent from importing, and both should
 simultaneously be possible. So, unlinking `__init__.py` is bad.

 Up to yesterday, I was in the belief that "attaching a pyx-file means"
 that

  1. the file is copied into a temporary directory,
  2. the compilation is done there, and
  3. the module is imported from the temporary directory.

 Since the temporary directory would not contain `__init__.py`, there
 should be no problem, isn't it?

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/12868#comment:8>
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