In addition to testing positive numbers, verify negative numbers work in configure.
In order to avoid compiler warnings on OS X 10.4, also change the order of the check
for the format character to use (PY_FORMAT_SIZE_T) in the sprintf format
for Py_ssize_t. This patch changes PY_FORMAT_SIZE_T from "" to "l" if it wasn't
defined at configure time. Need to verify the buildbot results.
Backport candidate (if everyone thinks this patch can't be improved).
configure uses similar compiler flags as setup.py when doing the zlib test.
Without this patch configure would use the first shared library on the linker
path, with this patch it uses the first shared or static library on that path
just like setup.py.
with --enable-framework
* Also for --enable-framework: allow users to use --prefix to specify
the location of the compatibility symlinks (such as /usr/local/bin/python)
target. Until now users had to use 'make frameworkinstall'
to install python when it is configured with '--enable-framework'.
This tends to confuse users that don't hunt for readme files
hidden in platform specific directories :-)
* Don't use xcodebuild for building PythonLauncher, but use a normal unix
makefile. This makes it a lot easier to use the same build flags as for the
rest of python (e.g. make a universal version of python launcher)
* Convert the mac makefile-s to makefile.in-s and use configure to set makefile
variables instead of forwarding them as command-line arguments
* Add a C version of pythonw, that we you can use '#!/usr/local/bin/pythonw'
* Build IDLE.app using bundlebuilder instead of BuildApplet, that will allow
easier modification of the bundle contents later on.
bug. I don't understand this at all, but Darwin/[78].* gets converted
to Darwin/78.* which is not correct. Maybe I'm just clueless or overworked.
I can't see why in the original checkin this should have changed.
This hack gets the Mac build working again. If someone figures out the
real problem, please revert this and fix for real.
Anthony is telling me that AC_PROG_CXX_WORKS which we use is broken.
I have no idea if that's related.
This change breaks up the case and fixes a typo.
gcc. Without this flag, doing pretty much anything with NaNs causes
a Floating Point Exception signal. This causes the interpreter to quit.
The failing tests this fixes are: test_float, test_long, and test_struct.
This is somewhat equivalent to doing signal(SIGFPE, SIG_IGN).
Will verify if this is a problem in 2.4 and backport if necessary (probably).
This was a fair amount of rework of the patch. Refactored test_fork1 so it
could be reused by the new tests for wait3/4. Also made them into new style
unittests (derive from unittest.TestCase).
This inappropriately disabled some capabilities which exist.
Now test for readline in -lreadline, if not found there, try it
in -ltermcap only if not in -lreadline. If both libraries are
required, there will need to be more work, but I'm not sure
under what conditions both libraries would be required.
POSIX is enabled. This prevents the toolbox glue, all of Carbon,
and various other non-POSIX features from compiling. The POSIX
symbols are still used by default, so turning off the #define
doesn't hurt.
Additionally, linker flags have changed for Darwin 8, and are
different for Darwin 8/gcc4 (default) and Darwin 8/gcc3.3.
Approved by Anthony
MacOSX: if we cannot use -undefined dynamic_lookup (such as on 10.2 or earlier)
we link extension directly against the dynamic library in the framework in
stead of against the framework. This will fix building extensions for 2.3
after 2.4 has been installed too.
to make using "-undefined dynamic_lookup" for linking extensions more
automatic on 10.3 and later. So if we're on that platform and
MACOSX_DEPLOYMENT_TARGET is not set we now set it to the current OSX
version during configure. Additionally, distutils will pick up the
configure-time value by default.
Will backport.
(Contributed by Bob Ippolito.)
This patch trims down the Python core on Darwin by making it
independent of CoreFoundation and CoreServices. It does this by:
Changed linker flags in configure/configure.in
Removed the unused PyMac_GetAppletScriptFile
Moved the implementation of PyMac_StrError to the MacOS module
Moved the implementation of PyMac_GetFullPathname to the
Carbon.File module
because GNU/k*BSD uses gnu pth to provide pthreads, but will also happen on any
system that does the same.
python fails to build because it doesn't detect gnu pth in pthread
emulation. See C comments in patch for details.
patch taken from http://bugs.debian.org/264315
discussed recently in python-dev:
In _locale module:
- bind_textdomain_codeset() binding
In gettext module:
- bind_textdomain_codeset() function
- lgettext(), lngettext(), ldgettext(), ldngettext(),
which return translated strings encoded in
preferred system encoding, if
bind_textdomain_codeset() was not used.
- Added equivalent functionality in translate()
function and catalog classes.
Every change was also documented.
[ 960406 ] unblock signals in threads
although the changes do not correspond exactly to any patch attached to
that report.
Non-main threads no longer have all signals masked.
A different interface to readline is used.
The handling of signals inside calls to PyOS_Readline is now rather
different.
These changes are all a bit scary! Review and cross-platform testing
much appreciated.
of hard linking against the framework).
If $MACOSX_DEPLOYMENT_TARGET is set, and >= 10.3, during configure we
setup extensions to link with dynamic lookup. We also record the
value in the Makefile.
Distutils checks whether a value for MACOSX_DEPLOYMENT_TARGET was
recorded in the Makefile, and if it was insists that the current
value matches.
This is only a partial fix because it only applies to 2.4, and the
"two python problem" exists with Python 2.3 shipped with MacOSX 10.3,
which we have no influence over.
two framework builds (in /Library and /System/Library) to coexist
with distutils linking against the right one.
Should be backported to 2.3, but getting Apple-supplied Python to pick
up these fixes is going to be non-trivial.
Cygwin's pthread_sigmask() implementation appears to be buggy. This
patch works around this problem by using sigprocmask() instead.
This patch is implemented in a general way so it could be used by other
platforms too. If this approach is deemed too risky, then I can work up
a patch that just hacks Python/thread_pthread.h for Cygwin.
Note that I tested this patch against 2.3c1 under Red Hat Linux 8.0 too.
[snip]
And finally, I need someone to regenerate pyconfig.h.in and configure
with the same versions of the autotools that are normally used by
Python.
Neal kindly regenerated pyconfig.h.in and configure for me.
- In the top level Makefile, the argument to -install_name should be
prepended with /System/Library/Frameworks/, so it is an absolute path.
- In the top level Makefile, because of 2), RUNSHARED needs to be set to
DYLD_FRAMEWORK_PATH=<path to local framework> and $(RUNSHARED) prepended
to the $(MAKE) lines in the frameworkinstallmaclib and
frameworkinstallapps targets.
scope of the _XOPEN_SOURCE and _POSIX_C_SOURCE symbols, including:
- getloadavg()
- typedefs for u_int, u_long, u_char, u_short, ushort & uint
These are now all defined under the control of a __BSD_VISIBLE symbol.
The lack of the typedefs causes several extension modules to build
incorrectly or not at all, and is the cause of failures reported for
test_socket and test_tempfile on this platform
(see python-dev: 29/6/03, pieterb@gewis.nl, "Running tests on freebsd5")
This change does not appear to be needed in the 2.2 branch.
For reasons unknown this suddenly started to matter (since Martin's 1.396
checkin? But why?), at least on MacOSX. Added a real test similar to the
getpgrp argument test.
for specific platforms. Use this to add plat-mac and
plat-mac/lib-scriptpackages on MacOSX. Also tested for not having adverse
effects on Linux, and I think this code isn't used on Windows anyway.
Fixes#661521.
Need to make sure that preprocessor directives start in first column.
This means we can't indent code which has preprocessor directives,
nor have a space between [ #include for example.
compiler flags which are necessary to get a clean compile. The former is
for user-specified optimizer, debug, trace fiddling. See patch 640843.
Add /sw/lib and /sw/include to setup.py search paths on Darwin to take
advantage of fink goodies.
Add scriptsinstall target to Makefile to install certain scripts from
Tools/scripts directory.
knows about plat-mac subdirectories, and configure adds a variable
EXTRAPLATDIR. These together take care of copying Lib/plat-mac to
the destination on darwin.
Adding plat-mac is still done with a .pth file which is only created when
you do a framework build. I'm not 100% happy with this, but fixing it
really needs a functional pythonw in non-framework builds, and I don't
think I can do that before 2.3a1 (but I'll try:-).
Check for readline 2.2 features. This should make it possible to
compile readline.c again with GNU readline versions 2.0 or 2.1; this
ability was removed in readline.c rev. 2.49. Apparently the older
versions are still in widespread deployment on older Solaris
installations. With an older readline, completion behavior is subtly
different (a space is always added).