[Distutils] lineendings
Andy Todd
andy47@halfcooked.com
Tue Oct 15 16:52:01 2002
M.-A. Lemburg wrote:
> Andy Robinson wrote:
>
>>> Why do you think you need support for line ends in distutils ?
>>> For text data files, maybe ? (Python doesn't have a problem with
>>> them for source code.)
>>
>>
>>
>> When you make a package on Windows and ship it to Unix it looks
>> really ugly in VI :-) The converse is true when some sysadmin
>> opens a Unix-built python file in Notepad. We just assumed that it
>> would 'do the right thing' for the platform and normalize stuff
>> somewhere.
>> This is more of a gripe about making zip and tar.gz files than
>> about anything else. If it's all 'unpacked' then who is to say what's
>> right? But if you are making a zip or EXE distro, surely known text
>> files or source files should be \r\n, and if a tar.gz then just \n.
>
>
> distutils uses Unix standard internally (e.g. for pathnames),
> so the "standard line ending" would be \n only...
>
>> I presume the answer is that distutils doesn't do this :-)
>
>
> ...nothing a few subclasses wouldn't be able to add, though.
>
> Of course, the right solution would be getting a decent
> text editor ;-)
>
Which would be VIM ;-)
But seriously, to avoid this problem whilst packaging PythonCard we
build the windows packages using good old 'cmd' and the *nix packages
using either Cygwin or Linux (depending on what I've booted into that
day). Distutils seems to use the native platform line endings when
assembling the package.
Regards,
Andy
--
----------------------------------------------------------------------
From the desk of Andrew J Todd esq - http://www.halfcooked.com