Commit Graph

88 Commits

Author SHA1 Message Date
Marc-André Lemburg 64b4f2770e Updated freeze.py to the new Makefile symbol layout.
Fixed a few compiler warnings.

freeze.py now produces binaries which can import shared
modules (unlike before).
2002-04-04 16:15:41 +00:00
Guido van Rossum 03f7f08874 Part 2/2 of SF patch #416704: More robust freeze, by Toby Dickenson.
(With slight cosmetic improvements to shorten lines and a grammar fix
to a docstring.)

This addes -X and -E options to freeze.  From the docstring:

-X module     Like -x, except the module can never be imported by
              the frozen binary.

-E:           Freeze will fail if any modules can't be found (that
              were not excluded using -x or -X).
2001-10-18 19:15:32 +00:00
Mark Hammond 773c83be04 Fix for bug #442374 - Modulefinder registry support broken 2001-09-05 23:42:36 +00:00
Neil Schemenauer 89e90d67aa Separate CFLAGS and CPPFLAGS. CFLAGS should not contain preprocessor
directives, which is the role of CPPFLAGS.  Closes SF patch #414991.
2001-06-02 06:16:02 +00:00
Martin v. Löwis 2c91c815d4 Patch #409504: Fix regex problems, consider \-continuation lines in Makefile
and Setup.
2001-03-21 06:58:25 +00:00
Guido van Rossum 6b767ac81a Lawrence Hudson, SF #401702: Modify co_filename in frozen programs
This patch was developed primarily to reduce the size of the
  frozen binary.  It is particularly useful when freezing for 'small'
  platforms, such as Palm OS, where you really want to save that
  last miserable byte.

  A limitation of this patch is that it does not provide any feedback
  about the replacements being made.  As the path matching
  is case-sensitive this may lead to unexpected behaviour for DOS
  and Windows people, eg
      > freeze.py -r C:\Python\Lib\=py\ goats.py
  should probably be:
      > freeze.py -r c:\python\lib\=py\ goats.py
2001-03-20 20:43:34 +00:00
Eric S. Raymond 1bb515b0e5 Teach Tools/freeze/makeconfig.py and Tools/freeze/parsesetup.py to use
the re package rather than the obsolete regex.
2001-03-18 11:27:58 +00:00
Tim Peters af449638b6 Patch 103928: Correct zlib freeze settings for Win32. 2001-02-23 03:45:13 +00:00
Tim Peters 19f52c2e34 Windows: ucnhash subproject no longer exists (/F merged into unicodedata). 2001-01-24 10:07:22 +00:00
Guido van Rossum ecc463a617 New, improved README from Mike Clarkson. Wow! 2001-01-03 23:50:59 +00:00
Mark Hammond d3d7bb1c31 Application of [ Patch #102226 ] freeze/modulefinder.py should use _winreg, not win32api 2000-11-06 02:49:27 +00:00
Guido van Rossum 8999053326 Fix for bug #113693: with the changes to the IMPORT_FROM opcodes, this
crashed on an assert.
2000-09-15 16:37:42 +00:00
Guido van Rossum efdf107fb7 Add the exceptions module to the 'never' list -- it is built in. 2000-07-28 10:34:48 +00:00
Peter Schneider-Kamp 332c59c4ef change some occurence of python15.dll to python20.dll
closes patch #100956
2000-07-24 16:02:00 +00:00
Thomas Wouters 7e47402264 Spelling fixes supplied by Rob W. W. Hooft. All these are fixes in either
comments, docstrings or error messages. I fixed two minor things in
test_winreg.py ("didn't" -> "Didn't" and "Didnt" -> "Didn't").

There is a minor style issue involved: Guido seems to have preferred English
grammar (behaviour, honour) in a couple places. This patch changes that to
American, which is the more prominent style in the source. I prefer English
myself, so if English is preferred, I'd be happy to supply a patch myself ;)
2000-07-16 12:04:32 +00:00
Guido van Rossum f67c2383da Patch by Toby Dickenson, mentored by Mark Hammond, to support
automatically finding (most of) the standard PYD extensions, and to
remove the hardcoded Python version.
2000-07-13 15:45:17 +00:00
Tim Peters dbd9ba6a6c Nuke all remaining occurrences of Py_PROTO and Py_FPROTO. 2000-07-09 03:09:57 +00:00
Guido van Rossum 4b1235cdac Toby Dickenson:
Fix for problem with freeze when both "-m" and "-s service" options
are used.

(Blessed by MarkH)
2000-05-06 03:18:08 +00:00
Guido van Rossum ce33eb3ee8 Sjoerd Mullender:
Bad % formatting.
2000-05-02 13:49:13 +00:00
Guido van Rossum 6664bb87dc Sjoerd Mullender: cmp.py is obsolete... 2000-04-28 13:31:52 +00:00
Fred Drake 70b5d47f71 From Sjoerd Mullender <sjoerd@oratrix.nl>:
cmp is not used in freeze, but is imported anyway.  What's worse, cmp
is no longer in the library, so freeze won't work like this.
2000-03-23 18:13:10 +00:00
Guido van Rossum 8b4b46e4f3 Fix a bug reported by Toby Dickenson (on 18 May 1999).
Sometimes there's no parent, so don't try to get its __name__.
1999-11-02 15:46:44 +00:00
Guido van Rossum cfd76a202b Sjoerd Mullender:
Added some declarations to shut up compiler.
1999-11-02 15:44:40 +00:00
Guido van Rossum 8bd738278e Patch by Jack Jansen to add with_ifdef option, which places #ifndef
around external decls.
1999-09-30 14:12:44 +00:00
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