Custom Python Runtime

Terry Reedy tjreedy at udel.edu
Sat Apr 7 13:43:33 EDT 2007


""Martin v. Löwis"" <martin at v.loewis.de> wrote in message 
news:46176493$0$4042$9b622d9e at news.freenet.de...
|> Is there a way to customize the Windows build? In my case, there is no 
need
| > to build an installer. The best way is to have everything in a 
directory, as
| > long as I know where to find Python and Python knows where to find the
| > necessary libs. Any online docs describing this? Thanks!
|
| The interpreter will search for its libraries relative to the location
| of the .exe file. So if you place python.exe and pythonxy.dll into
| a directory, you need to add a Lib directory
|
| Inside Lib, the minimum file you need to have is os.py: Python will
| use it as a landmark. If you run 'python.exe -S', this is all
| you need.
|
| If you want site.py to work, you also need (tested for 2.4):
| - site, codecs, copy_reg, locale, ntpath, stat, types UserDict,
|  encodings/__init__, encodings/aliases
|
| If you eliminate the aliasmbcs function from site.py, you can drop
| codecs, locale, encodings/*.
|
| If you eliminate the copy_reg references from os.py, you can also drop
| copy_reg.

If this information somewhere on python.org?  This is at least an 
occasional question here.

tjr 






More information about the Python-list mailing list