Commit Graph

344 Commits

Author SHA1 Message Date
Thomas Wouters 2fab8f1abb Fix test_distutils to not fail when running 'make test' from a Python build
directory that is not the source directory (ie, one created using
'/path/to/source/configure'.) Leaves this test very slightly degraded in
that particular case, compared to the build-in-sourcedir case, but that case
isn't a particularly strong test either: neither test the actual path that
will be used after installing. There isn't a particularly good way to test
this, and a poor test beats a failing test.
2008-04-05 23:39:15 +00:00
Martin v. Löwis cdbc977c03 Install 2to3 script. 2008-03-24 12:57:53 +00:00
Gregory P. Smith 440ca772f3 Have the binascii module use zlib's optimized crc32() function when available
to reduce our code size (1k data table and tiny bit of code).  It falls back
to its own without zlib.
2008-03-24 00:08:01 +00:00
Neal Norwitz 0d2192be8b Move itertools before future_builtins since the latter depends on the former.
From a clean build importing future_builtins would fail since itertools
wasn't built yet.
2008-03-23 06:13:25 +00:00
Thomas Heller 8bdf81d2df Merged changes from libffi3-branch.
The bundled libffi copy is now in sync with the recently released
libffi3.0.4 version, apart from some small changes to
Modules/_ctypes/libffi/configure.ac.

I gave up on using libffi3 files on os x.
Instead, static configuration with files from pyobjc is used.
2008-03-04 20:09:11 +00:00
Eric Smith a73fbe791d Added future_builtins, which contains PEP 3127 compatible versions of hex() and oct(). 2008-02-23 03:09:44 +00:00
Gregory P. Smith 773f347e7c remove a repeated occurance of a hardcoded berkeleydb library version number 2008-02-03 08:01:46 +00:00
Brett Cannon 861e39678f Directories from CPPFLAGS and LDFLAGS were being added in the reverse order for
searches as to how they were listed in the environment variable.
2008-02-03 02:08:45 +00:00
Gregory P. Smith f866bac73c Disable use of BerkeleyDB 4.6.x to see what the odd platform buildbots
think.  In particular, neal norwitz has traced an Ubuntu sparc64 crash
to the Lib/test/bsddb/test_basics.py test when opening a db with DB_THREAD.
2008-01-28 23:21:00 +00:00
Christian Heimes 8608d91e07 Added the Python core headers Include/*.h and pyconfig.h as dependencies for the extensions in Modules/
It forces a rebuild of all extensions when a header files has been modified
2008-01-25 15:52:11 +00:00
Christian Heimes 7f39c9fcbb Backport of several functions from Python 3.0 to 2.6 including PyUnicode_FromString, PyUnicode_Format and PyLong_From/AsSsize_t. The functions are partly required for the backport of the bytearray type and _fileio module. They should also make it easier to port C to 3.0.
First chapter of the Python 3.0 io framework back port: _fileio
The next step depends on a working bytearray type which itself depends on a backport of the nwe buffer API.
2008-01-25 12:18:43 +00:00
Christian Heimes b222bbc321 Build _ctypes after the other extensions. Its build process depends
on the _weakref extension (and maybe other modules, too)
2008-01-18 09:51:43 +00:00
Hye-Shik Chang ea684743da Enable platform-specific tweaks for FreeBSD 8 (exactly same to FreeBSD 7's yet) 2007-10-28 12:38:09 +00:00
Gregory P. Smith e7f4d84830 remove another sleepycat reference 2007-10-09 18:26:02 +00:00
Gregory P. Smith 392505391e Splits Modules/_bsddb.c up into bsddb.h and _bsddb.c and adds a C API
object available as bsddb.db.api.  This is based on the patch submitted
by Duncan Grisby here:
  http://sourceforge.net/tracker/index.php?func=detail&aid=1551895&group_id=13900&atid=313900
See this thread for additional info:
  http://sourceforge.net/mailarchive/forum.php?thread_name=E1GAVDK-0002rk-Iw%40apasphere.com&forum_name=pybsddb-users

It also cleans up the code a little by removing some ifdef/endifs for
python prior to 2.1 and for unsupported Berkeley DB <= 3.2.
2007-10-09 06:02:21 +00:00
Gregory P. Smith 1475cd8761 Allows BerkeleyDB 4.6.x >= 4.6.21 for the bsddb module. 2007-10-06 07:51:59 +00:00
Gregory P. Smith f3d280e62a Don't allow BerkeleyDB 4.6.x as the current 4.6.19 release is prone
to lockups.  We'll reenable it once a good 4.6.x release exists.
2007-09-10 16:36:32 +00:00
Skip Montanaro 52bc1f1d62 If this is correct for py3k branch and it's already in the release25-maint
branch, seems like it ought to be on the trunk as well.
2007-09-06 22:29:06 +00:00
Matthias Klose 691632f14d - Added support for linking the bsddb module against BerkeleyDB 4.6.x. 2007-09-03 23:33:04 +00:00
Gregory P. Smith 4eb60e5330 keep setup.py from listing unneeded hash modules (_md5, _sha*) as
missing when they were not built because _hashlib with openssl provided
their functionality instead.

don't build bsddb185 if bsddb was built.
2007-08-26 00:26:00 +00:00
Georg Brandl 915c87d3e5 Bug #1765375: fix stripping of unwanted LDFLAGS. 2007-08-24 11:47:37 +00:00
Jeffrey Yasskin 879975677a When setup.py fails to find the necessary bits to build some modules, have it
print a slightly more informative message.
2007-08-22 23:14:27 +00:00
Brett Cannon dc48b74497 Remove the rgbimg module. It has been deprecated since Python 2.5. 2007-05-20 07:09:50 +00:00
Georg Brandl e95cf1c8a2 Fix cmp vs. key argument for list.sort. 2007-03-06 17:49:14 +00:00
Skip Montanaro d1287323ca patch 1673619 - identify extension modules which cannot be built 2007-03-06 15:41:38 +00:00
Skip Montanaro 00c5a0138b Teach setup.py how to find Berkeley DB on Macs using MacPorts. 2007-03-04 20:52:28 +00:00
Raymond Hettinger eb9798892d Prepare collections module for pure python code entries. 2007-02-28 18:37:52 +00:00
Martin v. Löwis f1a4aa340e Ignore directory time stamps when considering
whether to rerun libffi configure.
2007-02-14 11:30:56 +00:00
Gregory P. Smith 8b96a35d14 Support linking of the bsddb module against BerkeleyDB 4.5.x
(will backport to 2.5)
2007-01-05 01:59:42 +00:00
Andrew M. Kuchling 738446f44d Check db_setup_debug for a few print statements; change sqlite_setup_debug to False 2006-10-27 18:13:46 +00:00
Martin v. Löwis 73f12a33f7 Add some commentary on -mimpure-text. 2006-08-09 23:42:18 +00:00
Andrew M. Kuchling 8607042889 [Patch #1464056] Ensure that we use the panelw library when linking with ncursesw.
Once I see how the buildbots react, I'll backport this to 2.4.
2006-08-06 22:07:04 +00:00
Thomas Heller 1798489547 Fix #1530448 - fix ctypes build failure on solaris 10.
The '-mimpure-text' linker flag is required when linking _ctypes.so.
2006-08-04 18:57:34 +00:00
Tim Peters 38ff36c4cc Whitespace normalization. 2006-06-30 06:18:39 +00:00
Ronald Oussoren 9b8b619491 Use staticly build copies of zlib and bzip2 to build the OSX installer, that
way the resulting binaries have a better change of running on 10.3.

This patch also updates the search logic for sleepycat db3/4, without this
patch you cannot use a sleepycat build with a non-standard prefix; with this
you can (at least on OSX) if you add the prefix to CPPFLAGS/LDFLAGS at
configure-time. This change is needed to build the binary installer for OSX.
2006-06-27 12:53:52 +00:00
Gregory P. Smith d792392db4 add depends = ['md5.h'] to the _md5 module extension for correctness sake. 2006-06-05 23:38:06 +00:00
Ronald Oussoren fb2a169ce3 Drop Mac wrappers for the WASTE library. 2006-06-04 14:24:59 +00:00
Nick Coghlan c649ec5b69 Apply modified version of Collin Winter's patch #1478788
Renames functional extension module to _functools and adds a Python
functools module so that utility functions like update_wrapper can be
added easily.
2006-05-29 12:43:05 +00:00
Ronald Oussoren 39be38c965 - Search the sqlite specific search directories
after the normal include directories when looking
  for the version of sqlite to use.
- On OSX:
  * Extract additional include and link directories
    from the CFLAGS and LDFLAGS, if the user has
    bothered to specify them we might as wel use them.
  * Add '-Wl,-search_paths_first' to the extra_link_args
    for readline and sqlite. This makes it possible to
    use a static library to override the system provided
    dynamic library.
2006-05-26 11:38:39 +00:00
Bob Ippolito 7ccc95a315 patch #1493701: performance enhancements for struct module 2006-05-23 19:11:34 +00:00
Bob Ippolito 27abce5ba8 revert #1493701 2006-05-23 19:09:51 +00:00
Bob Ippolito fb8b84af54 Patch #1493701: performance enhancements for struct module. 2006-05-23 18:46:41 +00:00
Ronald Oussoren 988117fd63 Patch 1471883: --enable-universalsdk on Mac OS X 2006-04-29 11:31:35 +00:00
Thomas Heller 5e218b4454 Rerun the libffi configuration if any of the files used for that
are newer then fficonfig.py.
2006-04-27 15:50:42 +00:00
Gerhard Häring 3e99c0ad64 Updated the sqlite3 module to the external pysqlite 2.2.2 version. 2006-04-23 15:24:26 +00:00
Gregory P. Smith 3adc4aa2fb raise the minimum supported BerkeleyDB version to 3.3 and add notes to
news about this and a couple other recent fixes.
2006-04-13 19:19:01 +00:00
Martin v. Löwis 9176fc1466 Patch #1464444: Add --with-system-ffi. 2006-04-11 11:12:43 +00:00
Anthony Baxter 8220174489 Python on OS X 10.3 and above now uses dlopen() (via dynload_shlib.c)
to load extension modules and now provides the dl module. As a result,
sys.setdlopenflags() now works correctly on these systems. (SF patch
#1454844)
2006-04-09 15:07:40 +00:00
Thomas Heller 795246cf99 Don't try to build ctypes when configuration of libffi fails. 2006-04-07 19:27:56 +00:00
Thomas Heller eba43c157b Configure Modules/_ctypes/libffi just before building the _ctypes extension.
This avoids configuring it when it is not build by setup.py.
2006-04-07 19:04:09 +00:00
Anthony Baxter 8e7b490890 upgrade to final version of pysqlite 2.2.0 2006-04-05 18:25:33 +00:00
Anthony Baxter a2a26b9e1f whitespace normalisation 2006-04-05 17:30:38 +00:00
Anthony Baxter 72289a616c Update to pysqlite 2.2.0 2006-04-04 06:29:05 +00:00
Matthias Klose 8e39ec78bc - Patch #360466: Replace the MD5 implementation from RSA Data Security Inc
with the implementation from http://sourceforge.net/projects/libmd5-rfc/.
2006-04-03 16:27:50 +00:00
Neal Norwitz 3e1ec3aa22 Remove some duplicated code for handling Mac modules. No functional change (intended). Also stoped setting srcdir twice. 2006-04-03 04:52:05 +00:00
Anthony Baxter 3dc6bb3c25 cleaned up setup.py code for sqlite3, based on patch from Gerhard Haering. 2006-04-03 02:20:49 +00:00
Anthony Baxter 07f5b35e19 backport r243 from the pysqlite2 svn repository - lowers the required version
of SQLite3 from 3.2.2 to 3.0.8, by providing an alternative to
sqlite3_transfer_bindings. setup.py also handles the common (in debian
and ubuntu, at least) case of a buggy sqlite3.h SQLITE_VERSION_NUMBER.
2006-04-01 08:36:27 +00:00
Anthony Baxter c51ee69b27 merged the sqlite-integration branch.
This is based on pysqlite2.1.3, and provides a DB-API interface in
the standard library. You'll need sqlite 3.2.2 or later to build
this - if you have an earlier version, the C extension module will
not be built.
2006-04-01 00:57:31 +00:00
Ronald Oussoren 090f81588f Add '-Wno-deprecated-warnings' to the compile flags for the Carbon extensions
on OSX 10.4 or later. This stops the compiler for complaining about calls to
deprecated functions in these extensions, they are supposed to wrap as much
of Carbon as possible.
2006-03-30 20:18:33 +00:00
Hye-Shik Chang 6c40359795 Find a source file in srcdir to allow to build outside of srcdir. 2006-03-27 08:43:11 +00:00
Neal Norwitz 10be10cbe7 Remove regsub, reconvert, regex, regex_syntax and everything under lib-old. 2006-03-16 06:50:13 +00:00
Thomas Heller cf567c1b9c Changes to build the _ctypes extension module.
Based on a patch from Hye-Shik Chang.
2006-03-08 19:51:58 +00:00
Neal Norwitz 6143c547dd Stop building timing module, it's old and deprecated 2006-03-03 00:48:46 +00:00
Martin v. Löwis 2086eaf79c Check for a not-found rlconf.h by testing for None. 2006-02-27 15:16:21 +00:00
Jack Jansen 81ae235146 If the readline library is found try and determine whether it's the broken
MacOSX 10.4 readline, and don't build the readline module in that case.
2006-02-23 15:02:23 +00:00
Martin v. Löwis a55e55e9f3 Patch #428494: Prefer linking against ncursesw over ncurses library 2006-02-11 15:55:14 +00:00
Armin Rigo a871ef2b3e Added the cProfile module.
Based on lsprof (patch #1212837) by Brett Rosen and Ted Czotter.
With further editing by Michael Hudson and myself.
History in svn repo: http://codespeak.net/svn/user/arigo/hack/misc/lsprof

* Module/_lsprof.c is the internal C module, Lib/cProfile.py a wrapper.
* pstats.py updated to display cProfile's caller/callee timings if available.
* setup.py and NEWS updated.
* documentation updates in the profiler section:
   - explain the differences between the three profilers that we have now
   - profile and cProfile can use a unified documentation, like (c)Pickle
   - mention that hotshot is "for specialized usage" now
   - removed references to the "old profiler" that no longer exists
* test updates:
   - extended test_profile to cover delicate cases like recursion
   - added tests for the caller/callee displays
   - added test_cProfile, performing the same tests for cProfile
* TO-DO:
   - cProfile gives a nicer name to built-in, particularly built-in methods,
     which could be backported to profile.
   - not tested on Windows recently!
2006-02-08 12:53:56 +00:00
Gregory P. Smith 29602d2153 Support for BerkeleyDB 4.4 (tested against 4.4.20 as well as all the
way back thru 3.2).  This should be backported to the release24-maint
branch.
2006-01-24 09:46:48 +00:00
Tim Peters 1b27f86411 Whitespace normalization. 2005-12-30 18:42:42 +00:00
Skip Montanaro 0174dddc65 typo, use parens for continued expr 2005-12-30 05:01:26 +00:00
Georg Brandl e08fa29d0e Bug #999767: make setup.py obey Setup.local wrt shared modules 2005-12-27 18:24:27 +00:00
Fredrik Lundh 4c86ec651e added cElementTree/_elementtree build stuff and wrapper module 2005-12-14 18:46:16 +00:00
Neal Norwitz 8f40171b67 Find bsd db v4 on gentoo (2005 i think) 2005-10-20 05:28:29 +00:00
Gregory P. Smith ade9733801 Add a check for the OpenSSL version number to conditionally compile
the _hashlibopenssl module (>= 0.9.7 required) and to not compile the
sha256 and sha512 modules if OpenSSL >= 0.9.8 is found.
2005-08-23 21:19:40 +00:00
Gregory P. Smith f21a5f7739 [ sf.net patch # 1121611 ]
A new hashlib module to replace the md5 and sha modules.  It adds
support for additional secure hashes such as SHA-256 and SHA-512.  The
hashlib module uses OpenSSL for fast platform optimized
implementations of algorithms when available.  The old md5 and sha
modules still exist as wrappers around hashlib to preserve backwards
compatibility.
2005-08-21 18:45:59 +00:00
Hye-Shik Chang 4e422817eb Add support for FreeBSD 7. 2005-07-17 02:36:59 +00:00
Martin v. Löwis d7c795e729 Make parse_makefile fallback to environment variables if nothing is
defined in the makefile. Get CFLAGS from the Makefile, instead of
getting OPT, BASE_CFLAGS and EXTRA_CFLAGS individually.
2005-04-25 07:14:03 +00:00
Brett Cannon 4454a1ff84 Fix building of spwd; was incorrectly checking for the needed HAVE_* values to
properly build the module.

Also moved up the creation of config_h_vars (from
distutils.sysconfig.parse_config_h()) higher on up in detect_modules() so that
it can be used sooner).
2005-04-15 20:32:39 +00:00
Andrew MacIntyre 953f98d4bd add support for another DB library naming convention (FreeBSD ports) 2005-03-09 22:21:08 +00:00
Martin v. Löwis e2713becd8 Build with --disable-unicode again. Fixes #1158607.
Will backport to 2.4.
2005-03-08 15:03:08 +00:00
Raymond Hettinger 9c323f8de4 SF patch #941881: PEP 309 Implementation (Partial Function Application).
Combined efforts of many including Peter Harris, Hye-Shik Chang,
Martin v. Löwis, Nick Coghlan, Paul Moore, and Raymond Hettinger.
2005-02-28 19:39:44 +00:00
Brett Cannon 46d9623875 spwdmodule.c should only be built when either HAVE_GETSPNAM or HAVE_GETSPENT is
defined.
2005-02-16 00:07:19 +00:00
Martin v. Löwis c300175547 Patch #579435: Shadow Password Support Module 2005-01-23 09:27:24 +00:00
Brett Cannon 44837719ef Since it is a possibility that LDFLAGS or CPPFLAGS were set with options that
in no way affect library or include directories the code must take that into
account and not assume some options were found.
2005-01-02 21:54:07 +00:00
Brett Cannon 4810eb9a08 Strip out double dashes and dashes for options not used during parsing of
LDFLAGS and CPPFLAGS for library and include directories, respectively.  Solves
issue of either env var containing other options that do not pertain to the
directories being searched for.
2004-12-31 08:11:21 +00:00
Brett Cannon 5399c6d3d4 Switch from getting LDFLAGS and CPPFLAGS from the environment to the Makefile.
This is to avoid a problem that inconsistently comes up where the environment
variable is unset while the Makefile clearly has the values set and are used
during ``make``.

Closes bug #1081045.
2004-12-18 20:48:09 +00:00
Gregory P. Smith e76c8c0383 rewrote the bsddb module BerkeleyDB library and include file locating
code.  This version is much cleaner and makes a proper attempt at
pairing up the correct header file and library.
2004-12-13 12:01:24 +00:00
Gregory P. Smith 7af53a6de4 the bsddb module now also works with BerkeleyDB 4.3. 2004-12-13 09:57:32 +00:00
Brett Cannon 84667c063a Change code in setup.py for parsing LDFLAGS and CPPFLAGS to use optparse
instead of getopt.  Required making use of gettext._ as optional (optparse
changed OK'ed by Greg Ward in private email).
2004-12-07 03:25:18 +00:00
Brett Cannon 516592f4ff setup.py now uses the library directories specified in LDFLAGS (``-L``
directories) and the include directories specified in CPPFLAGS (``-I``
directories) for compiling the extension modules.

This has led to the core being compiled with the values in the shell's
CPPFLAGS.  It has also removed the need for special casing to use Fink and
DarwinPorts under darwin since the needed directories can now be specified in
LDFLAGS and CPPFLAGS (e.g., DarwinPorts users can now do
``LDFLAGS=-L/opt/local/lib; CPPFLAGS=-I/opt/local/include; ./configure`` for
everything to work properly).

Parsing the values in the environment variables is done with getopt.  While optparse
would have been a nicer solution it cannot be used because of dependency issues
at execution time; optparse uses gettext which uses struct which will not have
been compiled when the code is imported.  If optparse ever makes its
importation of gettext optional by catching ImportError and setting _() to an
identity function then it can be used.
2004-12-07 00:42:59 +00:00
Martin v. Löwis fba7369824 Patch #1050475: Fix various x86_64 build issues
regrtest.py: skip rgbimg and imageop as they are not built on 64-bit systems.
_tkinter.c: replace %.8x with %p for printing pointers.
setup.py: add lib64 into the library directories.
2004-11-13 11:13:35 +00:00
Anthony Baxter 22dcf66f84 Patch 983206: distutils obeys LDSHARED env var. Removed the code in
Python's own setup.py that did the same thing (and tested on Solaris,
where LDSHARED is needed...)
2004-10-13 15:54:17 +00:00
Brett Cannon 35b93d9720 Add the directories where DarwinPorts installs library and include files to
the proper path directories for compiling extension modules.
2004-09-28 03:49:52 +00:00
Andrew M. Kuchling 57269d0c7c Remove mpz, rotor, xreadlines modules 2004-08-31 13:37:25 +00:00
Tim Peters 66cb018c96 Whitespace normalization. 2004-08-26 05:23:19 +00:00
Brett Cannon cc8a4f6563 When building with --disable-toolbox-glue under Darwin, skip building any
Mac-specific modules.  Before all modules were compiled but would fail thanks
to a dependence on the code included when Python was built without the compiler
flag.

Closes bug #991962.
2004-08-26 01:44:07 +00:00
Hye-Shik Chang f64700a512 Add support for FreeBSD 6. 2004-08-18 15:13:41 +00:00
Tim Peters f9cbf21157 Whitespace normalization. 2004-07-23 02:50:10 +00:00
Hye-Shik Chang ad00913cf0 ossaudiodev is available on FreeBSD 5 too. 2004-07-20 01:42:06 +00:00
Neal Norwitz 5e4a3b86b3 Move comment that goes along with audioop 2004-07-19 16:55:07 +00:00