[Python-Dev] using pyhon from the MSYS shell

2005-06-29 Thread lode leroy
I was trying to compile a python plugin (for gimp) using the MSYS shell and 
the MINGW compiler.

I now have put this in 'sitecustomize'
$ cat /c/Python24/lib/site-packages/sitecustomize.py
import sys
import os
import re
if os.environ.get("MSYSTEM") == "MINGW32":
os.sep='/'
os.pathsep='/'
sys.prefix = re.sub('','/',sys.prefix)
sys.exec_prefix = re.sub('','/',sys.exec_prefix)


It would probably be better to have python detect that it's running from 
inside the msys shell,
and output '/'es instead of '\'es.

maybe someone could extend os.path to do this in the standard distribution:
implement an msyspath.py, which calls ntpath for each function, and does a 
replace at the end of the evaluation. Unfortunately, I'm just starting to 
look into python, so I do not know what the cleanest implementation of this 
would be...


___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] using pyhon from the MSYS shell

2005-07-06 Thread lode leroy

From: "Martin v. Löwis" <[EMAIL PROTECTED]>
I'm personally in favour of supporting "MSYS" as a target system.
If you want to do it, I'm willing to review patches, but I'm not
willing to do them myself, as I don't use MSYS.

If you believe that MSYS is a target system in a way similar to
mingw32, and to cygwin,


actually, MSYS is the package that has the command line tools
(i.e. bash, tar, cp, automake, ...) required to be able to compile
a native windows binary from a source distribution that is depending
on autotools.


I believe it should get the same treatment
as mingw32 and cygwin. That means all places that currently deal
with either of these two systems should also deal with MSYS in
a similar way. What this means in actual code, I don't know.

OTOH, I already fail to follow you in the very first assumption:
why is it that you need to change os.sep on MSYS?


"configure" detects what the install-path is (python -c "print os.syspath")
which returns C:\Python. MSYS uses a bash shell which does not
like "\" but needs "/" as os.sep.

Anyways, in the mean time, it's been solved in the m4 files...
Maybe it's better to ask the automake guys to support Python
with MSYS...



Regards,
Martin



___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com