diff options
author | Guido van Rossum <guido@python.org> | 1996-08-26 05:14:20 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1996-08-26 05:14:20 (GMT) |
commit | 96c4dd95cfdd3ed761c7030de047839419689a68 (patch) | |
tree | 74df60533eb501de0f79e53776f29cbb3912b292 /Tools/freeze/README | |
parent | 6498cad34eaaa724e140b813c74c4593c247cb02 (diff) | |
download | cpython-96c4dd95cfdd3ed761c7030de047839419689a68.zip cpython-96c4dd95cfdd3ed761c7030de047839419689a68.tar.gz cpython-96c4dd95cfdd3ed761c7030de047839419689a68.tar.bz2 |
OK, now it uses sys.[exec_]prefix and supports
a -o option to specify an output directory. *Much* more convenient.
Removed a whole lot of hullabaloo from the README file, too.
Diffstat (limited to 'Tools/freeze/README')
-rw-r--r-- | Tools/freeze/README | 92 |
1 files changed, 15 insertions, 77 deletions
diff --git a/Tools/freeze/README b/Tools/freeze/README index 5befaf0..32c7458 100644 --- a/Tools/freeze/README +++ b/Tools/freeze/README @@ -69,63 +69,16 @@ to run.) How do I use Freeze? -------------------- -Ideally, you should be able to use it as follows: +Normally, you should be able to use it as follows: python freeze.py hello.py where hello.py is your program and freeze.py is the main file of Freeze (in actuality, you'll probably specify an absolute pathname -such as /ufs/guido/src/python/Tools/freeze/freeze.py). +such as /usr/joe/python/Tools/freeze/freeze.py). -Unfortunately, this doesn't work. Well, it might, but somehow it's -extremely unlikely that it'll work on the first try. (If it does, -skip to the next section.) Most likely you'll get this error message: - - needed directory /usr/local/lib/python/lib not found - -The reason is that Freeze require that some files that are normally -kept inside the Python build tree are installed, and it searches for -it in the default install location. (The default install prefix is -/usr/local; these particular files are installed at lib/python/lib -under the install prefix.) - -The particular set of files needed is installed only if you run "make -libainstall" (note: "liba", not "lib") in the Python build tree (which -is the tree where you build Python -- often, but not necessarily, this -is also the Python source tree). If you have in fact done a "make -libainstall" but used a different prefix, all you need to do is pass -that same prefix to Freeze with the -p option: - - python freeze.py -p your-prefix hello.py - -If you haven't run "make libainstall" yet, you should do it now -(perhaps figuring out first *where* you want everything to be -installed). - - -How do I configure Freeze? --------------------------- - -It's a good idea to change the first line marked with XXX in freeze.py -(an assignment to variable PACK) to point to the absolute pathname of -the directory where Freeze lives (Tools/freeze in the Python source -tree.) This makes it possible to call Freeze from other directories. - -You can also edit the assignment to variable PREFIX (also marked with -XXX) -- this saves a lot of -p options. - - -How do I use Freeze with extensions modules? --------------------------------------------- - -XXX to be written. (In short: pass -e extensionbuilddir.) - - -How do I use Freeze with dynamically loaded extension modules? --------------------------------------------------------------- - -XXX to be written. (In short: pass -e modulebuilddir -- this even -works if you built the modules in Python's own Modules directory.) +(With Python 1.4, freeze is much more likely to work "out of the box" +than before, provided Python has been installed properly.) What do I do next? @@ -134,37 +87,22 @@ What do I do next? Freeze creates three files: frozen.c, config.c and Makefile. To produce the frozen version of your program, you can simply type "make". This should produce a binary file. If the filename argument -to Freeze was "hello.py", the binary will be called "hello". On the -other hand, if the argument was "hello", the binary will be called -"hello.bin". If you passed any other filename, all bets are off. :-) -In any case, the name of the file will be printed as the last message -from Freeze. +to Freeze was "hello.py", the binary will be called "hello". + +Note: you can use the -o option to freeze to specify an alternative +directory where these files are created. This makes it easier to +clean up after you've shipped the frozen binary. Troubleshooting --------------- If you have trouble using Freeze for a large program, it's probably -best to start playing with a really simple program first (like the -file hello.py). If you can't get that to work there's something -fundamentally wrong -- read the text above to find out how to install -relevant parts of Python properly and how to configure Freeze to find -them. - -A common problem is having installed an old version -- rerunning "make -libainstall" often clears up problems with missing modules or -libraries at link time. - - -What is nfreeze.py? -------------------- - -The script nfreeze.py is an unsupported variant on freeze.py which -creates all files in a temporary directory and runs "make" there. It -has the advantage that it doesn't overwrite files in the current -directory, but the disadvantage is that it removes all files when it -is finished. +best to start playing with a really simple program first (like the file +hello.py). If you can't get that to work there's something +fundamentally wrong -- perhaps you haven't installed Python. To do a +proper install, you should do "make install" in the Python root +directory. ---Guido van Rossum, CWI, Amsterdam <mailto:Guido.van.Rossum@cwi.nl> -<http://www.cwi.nl/cwi/people/Guido.van.Rossum.html> +--Guido van Rossum (home page: http://www.python.org/~guido/) |