--install-script ... command line option to bdist_wininst) at the end
of the installation and at the start of deinstallation. Output
(stdout, stderr) of the script (if any) is displayed in the last
screen at installation, or in a simple message box at deinstallation.
sys.argv[1] for the script will contain '-install' at installation
time or '-remove' at deinstallation time.
The installation script runs in an environment (embedded by the
bdist_wininst runtime) where an additional function is available as
builtin:
create_shortcut(path, description, filename,
[arguments[, workdir[, iconpath, iconindex]]])
Recreated this file after source changes.
contain the type of the file (regular file, socket, link, &c.).
This means that install_scripts will now print
"changing mode of <file> to 775" instead of "... to 100775".
2.2 bugfix candidate, I suppose, though this isn't actually fixing a bug.
present - at least the swigged file should be named <name>_wrap.c as
this is also SWIG's default. (Even better would be to generate the
wrapped sources in a different location, but I'll leave this for
later).
Newer versions of SWIG don't accept the -dnone flag any more.
Since virtually nobody uses SWIG with distutils, this should do no
harm.
Suggested be Martin Bless on c.l.p.
crashes.
If no external zip-utility is found, the archive is created by the
zipfile module, which behaves different now than in 2.1: if the
zip-file is created in the root directory if the distribution, it will
contain an (empty) version of itself.
This triggered the above bug - so it's better to create the zip-file
far away in the TMP directory.
>
> When using 'distutils' (shipped with Python 2.1) I've found that my
> Python scripts installed with a first line of:
>
> #!/usr/bin/python2.1None
>
> This is caused by distutils trying to patch the first line of the python
> script to use the current interpreter.
distutils for the library modules built as shared objects. A better solution
appears possible, but with the threat that the distutils becomes more
magical ("complex").
This closes SF bug #458343.
bdist_wininst doesn't use the NT SCHEME any more, instead
a custom SCHEME is used, which is exchanged at installation
time, depending on the python version used.
Avoid a bogus warning frpom install_lib about installing
into a directory not on sys.path.
modules and extensions on Windows is now $PREFIX/Lib/site-packages.
Includes backwards compatibility code for pre-2.2 Pythons. Contributed
by Paul Moore.
libraries. This is done by adding a .get_source_files() method,
contributed by Rene Liebscher and slightly modified.
Remove an unused local variable spotted by PyChecker
to the current Python interpreter (ie. the one used for
building/installation), even (especially!) if "/usr/bin/env" appears in
the #! line.
Rationale: installing scripts with "#!/usr/bin/env python" is asking for
trouble, because
1) it might pick the wrong interpreter (not the one used to
build/install the script)
2) it doesn't work on all platforms (try it on IRIX 5, or on Linux
with command-line options for python)
3) "env" might not be in /usr/bin
has been changed to include an uninstaller.
I forgot to mention in the uninstaller checkin that the logfile
name (used for uninstalling) has been changed from
<module>.log to <module>-wininst.log. This should prevent
conflicts with a distutils logfile serving the same purpose.
The short form of the --bdist-dir (-d) option has been removed
because it caused conflicts with the short form of the --dist-dir
option.
--bitmap command line option allows to use a different bitmap file instead
of the build-in python powered logo.
--title lets you specify the text to display on the background.
The editbox in the first screen now longer is
selected (highlighted), it had the WS_TABSTOP flag.
This is the patch
http://sourceforge.net/patch/?func=detailpatch&patch_id=103687&group_id=5470
with two changes:
1. No messagebox displayed when the compilation to .pyc or .pyo files
failes, this will only confuse the user (and it will fail under certain
cases, where sys.path contains garbage).
2. A debugging print statement was removed from bdist_wininst.py.
Lib/distutils/command/build_ext.py(build_ext.finalize_options): Add
Cygwin specific code to append Python's library directory to the
extension's list of library directories.
(build_ext.get_libraries): Add Cygwin specific code to append Python's
(import) library to the extension's list of libraries.
produce a list of unique filenames:
"While attempting to build an RPM using distutils on Python 2.0,
rpm complained about duplicate files. The following patch fixed
that problem.
by default (since compiling at install time works just fine). Details:
- added 'compile' and 'optimize' options
- added 'byte_compile()' method
- changed 'get_outputs()' so it includes bytecode files
A lot of the code added is very similar to code in install_lib.py;
would be nice to factor it out further.
choice between (compile, no-compile) * (optimize=0, optimize=1,
optimize=2). Details:
- added --no-compile option to complement --compile, which has
been there for ages
- changed --optimize (which never worked) to a value option, which
expects 0, 1, or 2
- renamed 'bytecompile()' method to 'byte_compile()', and beefed
it up to handle both 'compile' and 'optimize' options
- fix '_bytecode_filenames()' to respect the new options
- added 'sub_commands' class attr
- added 'has_*()' predicates referenced by the sub-command list
- rewrote 'run()' so it's a trivial loop over relevant sub-commands
They are unneeded: All this stuff is already done by the
install command which is run by bdist_wininst.
One bug has been fixed:
The root of the fake install tree is install.install_purelib,
not install.install_lib!
They are different if the extra_path option is used in
the setup function.
Rebuild after the changes to wininst.exe.
Removed get_ext_libname() because it is unused.
Fixed get_libraries() to append an '_d' to the python debug
import library. If MSVC is used, do not add 'pythonxx.lib' to
the list of libraries, because this is handled better
by a pragma in config.h.
This should fix bug #115595, but it needs some more testing.
'convert_paths()' method to convert them all to the local syntax (backslash
or colon or whatever) at the appropriate time.
Added SCHEME_KEYS to get rid of one hard-coded list of attributes (in
'select_scheme()').
Default 'install_path_file' to true, and never set it false (it's just
there in case some outsider somewhere wants to disable installation of the
.pth file for whatever reason).
Toned down the warning emitted when 'install_path_file' is false, since we
no longer know why it might be false.
Added 'warn_dir' flag to suppress warning when installing to a directory
not in sys.path (again, we never set this false -- it's there for outsiders
to use, specifically the "bdist_*" commands).
Pulled the loop of 'change_root()' calls out to new method 'change_roots()'.
Comment updates/deletions/additions.
(eg. "bdist_dumb", to generate both ZIP and tar archives in the same
run), tell all but the last run to keep temp files -- this just gets
rid of the need to pseudo-install the same files multiple times.