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.
of globals from sysconfig.
Added 'prefix' and 'exec_prefix' to the list of variables that can be
expanded in installation directories (preserving the stupid old names
of 'sys_prefix' and 'sys_exec_prefix, though).
used to create the distribution and the creation date.
Takes care of the extra_path argument to the setup function,
installs the modules into <prefix>/extra_path and creates
a -pth file (like install_lib does).
distutils/command/bdist_wininst.py:
- the windows installer is again able to compile after installing
the files. Note: The default has changed, the packager has to
give --no-target-compile/--no-target-optimize to NOT compile
on the target system. (Another note: install_lib's --compile
--optimize options have the same semantics to switch off
the compilation. Shouldn't the names change?)
- All references to specific python versions are gone.
- A small bug:
raise DistutilsPlatformError ("...")
instead of
raise DistutilsPlatformError, ("...")
- When bdist_wininst creates an installer for one specific python
version, this is reflected in the name:
Distutils-0.9.2.win32-py15.exe instead of
Distutils-0.9.2.win32.exe
- bdist_wininst, when run as script, reads the wininst.exe file
and rewrites itself. Previously this was done by hand.
misc/install.c
- All the changes needed for compilation
- Deleted a lot of debug/dead code
* ensure the "dist" directory exists
* raise exception if using for modules containing compiled extensions
on a non-win32 platform.
* don't create an .ini file anymore (it was just for debugging)
Changed 'core.setup()' so it sets them to reasonable defaults.
Tweaked how the "usage" string is generated: 'core' now provides
'gen_usage()', which is used instead of 'USAGE'.
Modified "build_py" and "sdist" commands to refer to
'self.distribution.script_name' rather than 'sys.argv[0]'.
The known bug (bogus error message when an empty file is
extracted) is fixed.
Other changes:
- The target-compile and target-optimize flags of bdist_wininst
are gone. It is no longer possible to compile the python
files during installation.
- The zlib module is no longer required or used by bdist_wininst.
- I moved the decompression/extraction code into a separate
file (extract.c).
- The installer stub is now compressed by UPX (see
http://upx.tsx.org/). This reduces the size of the exe
(and thus the overhead of the final installer program)
from 40 kB to 16 kB.
- The installer displays a more uptodate user wizard-like
user interface, also containing a graphic: Just's Python Powered logo.
(I could not convince myself to use one of the BeOpen logos).
- The installation progress bar now moves correctly.
participates in the "--root" hack, ie. it also has a new root directory
hacked on at the very last minute (essential if the .pth file is to be
included in an RPM or other smart installer!).