Commit Graph

64 Commits

Author SHA1 Message Date
Guido van Rossum ce7695191f Simplified version of a patch by Chih-Hao Huang, who wrote:
"""
When there are additional Setup files, specified by -e option of freeze,
checkextenstions.py assumes that *.o, *.a, -Lpath, and -Rpath are all
relative to where the Setup file is. select() inserts the path to the
Setup file to make them absolute. However, the assumption is not true.
There are cases that absolute paths are specified for them. The inserted
prefix, by select(), results in error.

The following fix check for absolute paths. The assumption is: an
absolute path begins with either '/' or '$'. In the latter case, it is
from the environmental variable. (Variables defined locally in the Setup
file have already been handled by expandvars())
"""

My version of the patch has been verified by Charles Waldman (a
colleague of Chih-Hao).
1999-06-23 21:37:57 +00:00
Guido van Rossum 43128905be Patch submitted by Toby Dickenson and approved by Mark Hammond.
Toby writes:

winmakemakefile.py tries to allow for spaces in the python install
path, by adding quotes around the appropriate filenames. It doesn't
quite get this correct; sometimes the quotes end up in the middle of
the path.

Microsoft's NMAKE version 6.0 is happy with this (!!!!)  unless there
is also a space in the name. I guess most users of freeze on windows
do not use the same path as the binary distribution.

I've tested the following changes on systems with and without a space
in the path.
1999-06-21 22:36:53 +00:00
Guido van Rossum 7039f50828 Bug submitted by Wayne Knowles, who writes:
Under Windows, python freeze.py -o hello hello.py
   creates all the correct files in the hello subdirectory, but the
   Makefile has the directory prefix in it for frozen_extensions.c
   nmake fails because it tries to locate hello/frozen_extensions.c

(His fix adds a call to os.path.basename() in the appropriate place.)
1999-03-12 22:07:05 +00:00
Guido van Rossum a0d5d700e0 # Accidentally checked in a test version of this file with a bogus
# "import fooblurg" :-)
1999-02-16 23:05:46 +00:00
Guido van Rossum fdd302820e Fix for modulefinder so that it prints all modules an unknown module
was referenced in instead of only the last.  (Sjoerd Mullender)
1998-12-22 13:44:01 +00:00
Guido van Rossum 38b92eb56a Sjoerd Mullender:
When printing missing modules, also print the module they were
imported from.
1998-12-15 15:35:23 +00:00
Guido van Rossum e7e632ab6b Nannified. 1998-09-14 16:02:28 +00:00
Guido van Rossum 859b407cf1 Ignore cruft generating by the test run for hello.py. 1998-08-25 15:27:36 +00:00
Guido van Rossum baf0603493 New version, with contributions from Sjoerd Mullender and Mark Hammond.
Sjoerd writes:

This version of freeze creates one file per Python module, instead of
one humongous file for all Python modules.
bkfile: new module to used to write files with backups.  No new file
is produced if the new contents is identical to the old.
New option "-x excluded-module" for modulefinder test program.
New option "-i filename" for freeze main program to include a list of
options in place of the -i option.
1998-08-25 14:06:55 +00:00
Guido van Rossum 5e32a77fcd Minor change for windows; set extensions_c later and set
frozendllmain_c at the right place.
1998-07-07 22:47:38 +00:00
Guido van Rossum c8f859a487 Jonathan Giddy:
This second problem only shows up if LDLAST is not an empty string (such
as with threads enabled on DEC Alphas).
1998-06-12 14:09:34 +00:00
Guido van Rossum 590fc2c4fa Jonathan Giddy:
The first one only shows up if $prefix != $exec_prefix, and the problem
is caused by the recent change in location for config.h.
1998-06-12 14:09:03 +00:00
Guido van Rossum 0f1e1fc3fa Don't die if win32api doesn't exist. 1998-05-26 02:51:40 +00:00
Guido van Rossum 110f3652d6 Additions for Mark Hammond's Win32 specific hacks. 1998-05-19 20:18:37 +00:00
Guido van Rossum e35c60156b Add a feature to support specifying an additional search directory for
packages.  (Mark Hammond)

Folded some long lines.
1998-05-18 20:25:54 +00:00
Guido van Rossum ce5988b3d9 Remove Emacs cruft. 1998-05-18 20:22:31 +00:00
Guido van Rossum f1b5a0e3aa Add a feature to support specifying an additional search directory for
packages.  (Mark Hammond)

Remove Emacs cruft.
1998-05-18 20:21:56 +00:00
Guido van Rossum 4a114313a8 After variable expansion, what was formerly a single word can now
contain multiple words, all of which may have to be joined with the
path of the extension directory.
(Sjoerd)
1998-05-06 14:38:30 +00:00
Guido van Rossum e10053b881 Remove Emacs cruft at end. 1998-05-06 14:37:41 +00:00
Guido van Rossum a937afd363 Freeze assumes that all built-in modules are part of the Python core.
This is not necessarily the case.  It is possible to create a Python
binary which contains built-in extension modules.  Therefore
checkextensions should be used for all unknown and builtin modules.
(Sjoerd Mullender)
1998-04-23 14:39:24 +00:00
Guido van Rossum 1abfb9c0f5 If freezing with the -O option, the optimized bytecode files are
used.  It is useful to implicitly set the -O flag in the frozen
application.
(Sjoerd Mullender)
1998-04-23 14:39:05 +00:00
Guido van Rossum df1940717d When using extention modules, relative path names that occur in the
Setup file are fixed so that they will work from the freeze build
directory.  However, relative path names in liner -L and -R options
are not fixed in this way.
(Sjoerd Mullender)
1998-04-23 14:38:46 +00:00
Guido van Rossum 23cff3170e Shouldn't import addpack! 1998-04-20 17:53:19 +00:00
Guido van Rossum 78fc3634cb Big changes by Mark Hammond to support freezing with DLLs on Windows. 1998-03-20 17:37:24 +00:00
Guido van Rossum 2addd2a6da Add quotes around some variable definitions; add a "clean" target. 1998-03-07 05:10:00 +00:00
Guido van Rossum cef85a29f7 Adapted to the new situation. 1998-03-07 04:51:54 +00:00
Guido van Rossum a0e18357e7 Rearrange some stuff so that the warning for unknown modules is also
issued on Windows.
1998-03-07 04:51:03 +00:00
Guido van Rossum 31d53ed93c When writing the Windows Makefile, don't forget to strip some filenames
of their output directory prefix.
1998-03-07 04:08:04 +00:00
Guido van Rossum 0b0e7b5686 Got rid of the last tab character in this file. 1998-03-06 19:55:36 +00:00
Guido van Rossum ab045f952c Always set the __file__ attribute, so dynamic link modules are indicated. 1998-03-06 19:55:10 +00:00
Guido van Rossum b7da642e2e Fix typo -- -e takes a flag, -h doesn't. Somehow the colon and the h
got transposed.
1998-03-06 17:44:57 +00:00
Guido van Rossum e0394259b0 Unfold some lines that were previously folded but don't need to be
now we're reindented.

Remove files before renaming something to them -- for Windows.

Change check for Python home directory so it works correct on Windows.
1998-03-05 05:39:50 +00:00
Guido van Rossum 541e783664 Reindented, removed tabs.
Also added simple "clean" target (removes *.o and executable).
1998-03-05 05:22:36 +00:00
Guido van Rossum 3c51cf2b69 Oops, bug omission: also scan internal code objects for imports! 1998-03-05 05:15:07 +00:00
Guido van Rossum 912a14c028 Reindented, removed tabs. 1998-03-05 04:56:37 +00:00
Guido van Rossum 1e07403bbf Some nits...
Add the script directory to the path.

Fix the sanity checks on the arguments so they don't mess up the -m
option; remove the requirement that the script must have a .py
extension.
1998-03-05 04:05:38 +00:00
Guido van Rossum 75dc4969ab Added support for packages.
We have a whole new module finder that uses the actual Python
parser and scans the bytecode for IMPORT_NAME and IMPORT_FROM.
This requires some support in import.c (that hasn't been checked in).
New command line options for this: -d, -q, -m.
1998-03-05 03:42:00 +00:00
Guido van Rossum f888350dec Untested changes to make the '-s windows' option
work on Windows.
1998-03-04 18:12:39 +00:00
Guido van Rossum 94ce0d1963 Add special handling for Python modules that are imported implicitly
by the Python runtime: 'site' and 'exceptions'.
1997-12-08 05:01:06 +00:00
Guido van Rossum 345df170e6 os2 patch by Jeff Rush 1997-11-22 22:10:01 +00:00
Guido van Rossum 77b300895c Add XXX warning about fishy line 1997-08-14 20:13:46 +00:00
Guido van Rossum 7ba3de44a2 Added Windows NT instructions. 1997-08-14 02:12:04 +00:00
Guido van Rossum 58a594829c Changes for building under windows. 1997-08-14 01:45:33 +00:00
Guido van Rossum 0b4b8a21ce Changed indents to 4 *spaces*; added Emacs variables to avoid
inserting tabs.  All this (and the previous patch) in preparation for
porting to NT.
1997-08-10 16:56:48 +00:00
Guido van Rossum 9a6e855a27 Support using -p/-P to point to the source/build directory instead of
the install directory.  Added -h option to print the full usage
message; by default, only two lines are now printed for errors.
1997-08-10 16:47:17 +00:00
Guido van Rossum b3afce5763 Updated for new style build/install; much simpler! 1997-07-19 21:58:30 +00:00
Guido van Rossum f06ee5fa07 /usr/local/bin/python -> /usr/bin/env python 1996-11-27 19:52:01 +00:00
Guido van Rossum 96c4dd95cf 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.
1996-08-26 05:14:20 +00:00
Guido van Rossum 6498cad34e Get rid of it totally 1996-08-26 04:10:33 +00:00
Guido van Rossum f34bf1c07b Added warning that this is unsupported 1996-08-26 03:50:10 +00:00