[Numpy-discussion] License.txt inclussion breaks McMillan's Installer.

Tim Hochberg tim.hochberg at ieee.org
Thu Jan 8 15:38:02 CST 2004

The way LICENSE.txt is included in the __init__ file for numarray breaks 
McMillan's installer (and probably py2exe as well, although I haven't 
checked that). The offending line is:

    __LICENSE__ = open(_os.path.join(__path__[0],"LICENSE.txt")).read()

The first problem is that the installer doesn't pick up the dependancy 
on LICENSE.txt. That's not a huge deal as it's relatively simple to add 
that to the list of dependancy's by hand.

More serious is that the __path__ variable is bogus in an installer 
archive so that the reading of the license file fails, even if it's present.

One solution is just include the license text directly instead of 
reading it from a separate file. This is simple and the license is short 
enough that this shouldn't clutter things too much. It's not like 
there's all that much in the __init__ file anyway <0.5 wink>.

A second solution is to wrap the  above incantation in try, except; 
however, this doesn't guarantee that the license file is included.

A third solution is to come up with a different incantation that works 
for installer. I've looked at this briefly and it looks a little messy. 
Nevertheless, I'll come up with something that works if this is deemed 
the preferred solution. Someone else will have to figure out what works 
with py2exe.

[ If the above makes no sense to those of you unfamilar with McMillan's 
installer, I apologize -- ask away and I'll try to clarify]



More information about the Numpy-discussion mailing list