This change is not backwards compatible. If a compiler subclass
exists outside the distutils package, it may get called with the
unexpected keyword arg. It's easy to extend that compiler by having
it ignore the argument, and not much harder to do the right thing. If
this ends up being burdensome, we can change it before 2.3 final to
work harder at compatibility.
Also add _setup_compile() and _get_cc_args() helper functions that
factor out much of the boilerplate for each concrete compiler class.
Remove __init__ that just called base class __init__ with same args.
Fold long argument lists into fewer, shorter lines.
Remove parens in tuple unpacks.
Don't put multiple statements on one line with a semicolon.
In find_library_file() compute the library_filename() upfront.
This is a conservative version of SF patch 504889. It uses the log
module instead of calling print in various places, and it ignores the
verbose argument passed to many functions and set as an attribute on
some objects. Instead, it uses the verbosity set on the logger via
the command line.
The log module is now preferred over announce() and warn() methods
that exist only for backwards compatibility.
XXX This checkin changes a lot of modules that have no test suite and
aren't exercised by the Python build process. It will need
substantial testing.
# XXX this isn't used anywhere, and worse, it has the same name as a method
# in Command with subtly different semantics. (This one just has one
# source -> one dest; that one has many sources -> one dest.) Nuke it?
Yes. Nuke it.
modules, distutils does not understand that the build version of the
source tree is needed.
This patch fixes distutils.sysconfig to understand that the running
Python is part of the build tree and needs to use the appropriate
"shape" of the tree. This does not assume anything about the current
directory, so can be used to build 3rd-party modules using Python's
build tree as well.
This is useful since it allows us to use a non-installed debug-mode
Python with 3rd-party modules for testing. It as the side-effect that
set_python_build() is no longer needed (the hack which was added to
allow distutils to be used to build the "standard" extension modules).
This closes SF patch #547734.
--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.
installations are present, by always unlinking the destination file
before copying to it. Without the unlink(), the copied file remains
owned by its previous UID, causing the subsequent chmod() to fail.
Bugfix candidate, though it may cause changes on platforms where
file ownership behaves differently.
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
though 'licence' is still supported for backward-compatibility
(Should I add a warning to get_licence(), or not bother?)
Also fixes an UnboundLocalError noticed 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
- compile() didn't return a (empty) list of objects. Fixed.
- the various _fix_xxx_args() methods weren't called (are they new or did I overlook them?). Fixed.
along with options to print them.
Add a finalize_options() method to Distribution to do final processing
on the platform and keyword attributes
Add DistributionMetadata.write_pkg_info() method to write a PKG-INFO file
into the release tree.
before this get forgotten again.
Should probably be set to 1.0.2 before final release of python 2.1
Does someone still release distutils separate from python?
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.
the Cygwin-specific compiler class.
(According to Jason Tishler, cygwinccompiler needs some work to
handle the differences in Cygwin- and MSVC-Python. Makefile and
config files are currently ignored by cygwinccompiler, as it was
written to support cygwin for extensions which are intended to be
used with the standard MSVC built Python.)
--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.
and also takes the sys.platform name into account. This helps on
platforms where there are multiple possible compiler backends (the
one with which Python itself was compiled is preferred over others
in this case).
The patch uses this new technique to enable using cygwin compiler
per default for cygwin compiled Pythons.
Written by Marc-Andre Lemburg. Copyright assigned to Guido van Rossum.
prevent binding for str from masking use of builtin str in nested
function.
(This is the only case I found in the standard library where a local
shadows a global or builtin. There may be others, but the regression
test doesn't catch them.)