[Biopython-dev] New line issues in the source zip or tarballs

Peter biopython at maubp.freeserve.co.uk
Sat Sep 6 10:04:08 UTC 2008


I've run into a little issue on Windows while preparing Biopython 1.48,

If you check out the latest code from CVS on Windows, then assuming
the CVS client is setup correctly, all the python files and plain text
input files get DOS/Windows newlines.  Running the test suite looks OK
(there are a few little known issues l've previously mentioned).

However, having built a release on Linux, it seems both the tarball
and the zip file contain the text files using Unix newlines.  I can
build Biopython on Windows from the zip file (Unix newlines are not a
problem for running the python code), but it does break a few of the
unit tests (test_SCOP_Cla.py and test_SCOP_Raf.py and
test_PopGen_SimCoal_nodepend.py).

This is only an issue for the minority of Windows users who will
actually run the test suite.  Most will just use the click-and-run
installers which don't include the tests, and I expect anyone trying
to build Biopython on Windows will probably use CVS.  So we could just
ignore this for the time being...

One solution would be to try and tweak the source code distributions
so the tarball uses linux line endings, while the zip file uses
DOS/Windows.  This does seem nasty.

Or, we can try and tweak the failing unit tests to cope with their
input files in either format.

In the case of test_PopGen_SimCoal_nodepend.py the failure is
expecting simple.par and simple_100_30.par to be exactly the same size
(in class TemplateTest, line 47).  This is not true going to be true
when the input file uses Unix new lines but the generated file uses
Windows new lines.  Perhaps using a simple bit of code to load the
files line by line and compare them would work here?

Peter



More information about the Biopython-dev mailing list