mirror of
https://github.com/python/cpython.git
synced 2024-11-24 02:15:30 +08:00
73e5a5b65d
Merged revisions 46490-46494,46496,46498,46500,46506,46521,46538,46558,46563-46567,46570-46571,46583,46593,46595-46598,46604,46606,46609-46753 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r46610 | martin.v.loewis | 2006-06-03 09:42:26 +0200 (Sat, 03 Jun 2006) | 2 lines Updated version (win32-icons2.zip) from #1490384. ........ r46612 | andrew.kuchling | 2006-06-03 20:09:41 +0200 (Sat, 03 Jun 2006) | 1 line [Bug #1472084] Fix description of do_tag ........ r46614 | andrew.kuchling | 2006-06-03 20:33:35 +0200 (Sat, 03 Jun 2006) | 1 line [Bug #1475554] Strengthen text to say 'must' instead of 'should' ........ r46616 | andrew.kuchling | 2006-06-03 20:41:28 +0200 (Sat, 03 Jun 2006) | 1 line [Bug #1441864] Clarify description of 'data' argument ........ r46617 | andrew.kuchling | 2006-06-03 20:43:24 +0200 (Sat, 03 Jun 2006) | 1 line Minor rewording ........ r46619 | andrew.kuchling | 2006-06-03 21:02:35 +0200 (Sat, 03 Jun 2006) | 9 lines [Bug #1497414] _self is a reserved word in the WATCOM 10.6 C compiler. Fix by renaming the variable. In a different module, Neal fixed it by renaming _self to self. There's already a variable named 'self' here, so I used selfptr. (I'm committing this on a Mac without Tk, but it's a simple search-and-replace. <crosses fingers>, so I'll watch the buildbots and see what happens.) ........ r46621 | fredrik.lundh | 2006-06-03 23:56:05 +0200 (Sat, 03 Jun 2006) | 5 lines "_self" is a said to be a reserved word in Watcom C 10.6. I'm not sure that's really standard compliant behaviour, but I guess we have to fix that anyway... ........ r46622 | andrew.kuchling | 2006-06-04 00:44:42 +0200 (Sun, 04 Jun 2006) | 1 line Update readme ........ r46623 | andrew.kuchling | 2006-06-04 00:59:23 +0200 (Sun, 04 Jun 2006) | 1 line Drop 0 parameter ........ r46624 | andrew.kuchling | 2006-06-04 00:59:59 +0200 (Sun, 04 Jun 2006) | 1 line Some code tidying; use curses.wrapper ........ r46625 | andrew.kuchling | 2006-06-04 01:02:15 +0200 (Sun, 04 Jun 2006) | 1 line Use True; value returned from main is unused ........ r46626 | andrew.kuchling | 2006-06-04 01:07:21 +0200 (Sun, 04 Jun 2006) | 1 line Use true division, and the True value ........ r46627 | andrew.kuchling | 2006-06-04 01:09:58 +0200 (Sun, 04 Jun 2006) | 1 line Docstring fix; use True ........ r46628 | andrew.kuchling | 2006-06-04 01:15:56 +0200 (Sun, 04 Jun 2006) | 1 line Put code in a main() function; loosen up the spacing to match current code style ........ r46629 | andrew.kuchling | 2006-06-04 01:39:07 +0200 (Sun, 04 Jun 2006) | 1 line Use functions; modernize code ........ r46630 | andrew.kuchling | 2006-06-04 01:43:22 +0200 (Sun, 04 Jun 2006) | 1 line This demo requires Medusa (not just asyncore); remove it ........ r46631 | andrew.kuchling | 2006-06-04 01:46:36 +0200 (Sun, 04 Jun 2006) | 2 lines Remove xmlrpc demo -- it duplicates the SimpleXMLRPCServer module. ........ r46632 | andrew.kuchling | 2006-06-04 01:47:22 +0200 (Sun, 04 Jun 2006) | 1 line Remove xmlrpc/ directory ........ r46633 | andrew.kuchling | 2006-06-04 01:51:21 +0200 (Sun, 04 Jun 2006) | 1 line Remove dangling reference ........ r46634 | andrew.kuchling | 2006-06-04 01:59:36 +0200 (Sun, 04 Jun 2006) | 1 line Add more whitespace; use a better socket name ........ r46635 | tim.peters | 2006-06-04 03:22:53 +0200 (Sun, 04 Jun 2006) | 2 lines Whitespace normalization. ........ r46637 | tim.peters | 2006-06-04 05:26:02 +0200 (Sun, 04 Jun 2006) | 16 lines In a PYMALLOC_DEBUG build obmalloc adds extra debugging info to each allocated block. This was using 4 bytes for each such piece of info regardless of platform. This didn't really matter before (proof: no bug reports, and the debug-build obmalloc would have assert-failed if it was ever asked for a chunk of memory >= 2**32 bytes), since container indices were plain ints. But after the Py_ssize_t changes, it's at least theoretically possible to allocate a list or string whose guts exceed 2**32 bytes, and the PYMALLOC_DEBUG routines would fail then (having only 4 bytes to record the originally requested size). Now we use sizeof(size_t) bytes for each of a PYMALLOC_DEBUG build's extra debugging fields. This won't make any difference on 32-bit boxes, but will add 16 bytes to each allocation in a debug build on a 64-bit box. ........ r46638 | tim.peters | 2006-06-04 05:38:04 +0200 (Sun, 04 Jun 2006) | 4 lines _PyObject_DebugMalloc(): The return value should add 2*sizeof(size_t) now, not 8. This probably accounts for current disasters on the 64-bit buildbot slaves. ........ r46639 | neal.norwitz | 2006-06-04 08:19:31 +0200 (Sun, 04 Jun 2006) | 1 line SF #1499797, Fix for memory leak in WindowsError_str ........ r46640 | andrew.macintyre | 2006-06-04 14:31:09 +0200 (Sun, 04 Jun 2006) | 2 lines Patch #1454481: Make thread stack size runtime tunable. ........ r46641 | andrew.macintyre | 2006-06-04 14:59:59 +0200 (Sun, 04 Jun 2006) | 2 lines clean up function declarations to conform to PEP-7 style. ........ r46642 | martin.blais | 2006-06-04 15:49:49 +0200 (Sun, 04 Jun 2006) | 15 lines Fixes in struct and socket from merge reviews. - Following Guido's comments, renamed * pack_to -> pack_into * recv_buf -> recv_into * recvfrom_buf -> recvfrom_into - Made fixes to _struct.c according to Neal Norwitz comments on the checkins list. - Converted some ints into the appropriate -- I hope -- ssize_t and size_t. ........ r46643 | ronald.oussoren | 2006-06-04 16:05:28 +0200 (Sun, 04 Jun 2006) | 3 lines "Import" LDFLAGS in Mac/OSX/Makefile.in to ensure pythonw gets build with the right compiler flags. ........ r46644 | ronald.oussoren | 2006-06-04 16:24:59 +0200 (Sun, 04 Jun 2006) | 2 lines Drop Mac wrappers for the WASTE library. ........ r46645 | tim.peters | 2006-06-04 17:49:07 +0200 (Sun, 04 Jun 2006) | 3 lines s_methods[]: Stop compiler warnings by casting s_unpack_from to PyCFunction. ........ r46646 | george.yoshida | 2006-06-04 19:04:12 +0200 (Sun, 04 Jun 2006) | 2 lines Remove a redundant word ........ r46647 | george.yoshida | 2006-06-04 19:17:25 +0200 (Sun, 04 Jun 2006) | 2 lines Markup fix ........ r46648 | martin.v.loewis | 2006-06-04 21:36:28 +0200 (Sun, 04 Jun 2006) | 2 lines Patch #1359618: Speed-up charmap encoder. ........ r46649 | georg.brandl | 2006-06-04 23:46:16 +0200 (Sun, 04 Jun 2006) | 3 lines Repair refleaks in unicodeobject. ........ r46650 | georg.brandl | 2006-06-04 23:56:52 +0200 (Sun, 04 Jun 2006) | 4 lines Patch #1346214: correctly optimize away "if 0"-style stmts (thanks to Neal for review) ........ r46651 | georg.brandl | 2006-06-05 00:15:37 +0200 (Mon, 05 Jun 2006) | 2 lines Bug #1500293: fix memory leaks in _subprocess module. ........ r46654 | tim.peters | 2006-06-05 01:43:53 +0200 (Mon, 05 Jun 2006) | 2 lines Whitespace normalization. ........ r46655 | tim.peters | 2006-06-05 01:52:47 +0200 (Mon, 05 Jun 2006) | 16 lines Revert revisions: 46640 Patch #1454481: Make thread stack size runtime tunable. 46647 Markup fix The first is causing many buildbots to fail test runs, and there are multiple causes with seemingly no immediate prospects for repairing them. See python-dev discussion. Note that a branch can (and should) be created for resolving these problems, like svn copy svn+ssh://svn.python.org/python/trunk -r46640 svn+ssh://svn.python.org/python/branches/NEW_BRANCH followed by merging rev 46647 to the new branch. ........ r46656 | andrew.kuchling | 2006-06-05 02:08:09 +0200 (Mon, 05 Jun 2006) | 1 line Mention second encoding speedup ........ r46657 | gregory.p.smith | 2006-06-05 02:31:01 +0200 (Mon, 05 Jun 2006) | 7 lines bugfix: when log_archive was called with the DB_ARCH_REMOVE flag present in BerkeleyDB >= 4.2 it tried to construct a list out of an uninitialized char **log_list. feature: export the DB_ARCH_REMOVE flag by name in the module on BerkeleyDB >= 4.2. ........ r46658 | gregory.p.smith | 2006-06-05 02:33:35 +0200 (Mon, 05 Jun 2006) | 5 lines fix a bug in the previous commit. don't leak empty list on error return and fix the additional rare (out of memory only) bug that it was supposed to fix of not freeing log_list when the python allocator failed. ........ r46660 | tim.peters | 2006-06-05 02:55:26 +0200 (Mon, 05 Jun 2006) | 9 lines "Flat is better than nested." Move the long-winded, multiply-nested -R support out of runtest() and into some module-level helper functions. This makes runtest() and the -R code easier to follow. That in turn allowed seeing some opportunities for code simplification, and made it obvious that reglog.txt never got closed. ........ r46661 | hyeshik.chang | 2006-06-05 02:59:54 +0200 (Mon, 05 Jun 2006) | 3 lines Fix a potentially invalid memory access of CJKCodecs' shift-jis decoder. (found by Neal Norwitz) ........ r46663 | gregory.p.smith | 2006-06-05 03:39:52 +0200 (Mon, 05 Jun 2006) | 3 lines * support DBEnv.log_stat() method on BerkeleyDB >= 4.0 [patch #1494885] ........ r46664 | tim.peters | 2006-06-05 03:43:03 +0200 (Mon, 05 Jun 2006) | 3 lines Remove doctest.testmod's deprecated (in 2.4) `isprivate` argument. A lot of hair went into supporting that! ........ r46665 | tim.peters | 2006-06-05 03:47:24 +0200 (Mon, 05 Jun 2006) | 2 lines Whitespace normalization. ........ r46666 | tim.peters | 2006-06-05 03:48:21 +0200 (Mon, 05 Jun 2006) | 2 lines Make doctest news more accurate. ........ r46667 | gregory.p.smith | 2006-06-05 03:56:15 +0200 (Mon, 05 Jun 2006) | 3 lines * support DBEnv.lsn_reset() method on BerkeleyDB >= 4.4 [patch #1494902] ........ r46668 | gregory.p.smith | 2006-06-05 04:02:25 +0200 (Mon, 05 Jun 2006) | 3 lines mention the just committed bsddb changes ........ r46671 | gregory.p.smith | 2006-06-05 19:38:04 +0200 (Mon, 05 Jun 2006) | 3 lines * add support for DBSequence objects [patch #1466734] ........ r46672 | gregory.p.smith | 2006-06-05 20:20:07 +0200 (Mon, 05 Jun 2006) | 3 lines forgot to add this file in previous commit ........ r46673 | tim.peters | 2006-06-05 20:36:12 +0200 (Mon, 05 Jun 2006) | 2 lines Whitespace normalization. ........ r46674 | tim.peters | 2006-06-05 20:36:54 +0200 (Mon, 05 Jun 2006) | 2 lines Add missing svn:eol-style property to text files. ........ r46675 | gregory.p.smith | 2006-06-05 20:48:21 +0200 (Mon, 05 Jun 2006) | 4 lines * fix DBCursor.pget() bug with keyword argument names when no data= is supplied [SF pybsddb bug #1477863] ........ r46676 | andrew.kuchling | 2006-06-05 21:05:32 +0200 (Mon, 05 Jun 2006) | 1 line Remove use of Trove name, which isn't very helpful to users ........ r46677 | andrew.kuchling | 2006-06-05 21:08:25 +0200 (Mon, 05 Jun 2006) | 1 line [Bug #1470026] Include link to list of classifiers ........ r46679 | tim.peters | 2006-06-05 22:48:49 +0200 (Mon, 05 Jun 2006) | 10 lines Access _struct attributes directly instead of mucking with getattr. string_reverse(): Simplify. assertRaises(): Raise TestFailed on failure. test_unpack_from(), test_pack_into(), test_pack_into_fn(): never use `assert` to test for an expected result (it doesn't test anything when Python is run with -O). ........ r46680 | tim.peters | 2006-06-05 22:49:27 +0200 (Mon, 05 Jun 2006) | 2 lines Add missing svn:eol-style property to text files. ........ r46681 | gregory.p.smith | 2006-06-06 01:38:06 +0200 (Tue, 06 Jun 2006) | 3 lines add depends = ['md5.h'] to the _md5 module extension for correctness sake. ........ r46682 | brett.cannon | 2006-06-06 01:51:55 +0200 (Tue, 06 Jun 2006) | 4 lines Add 3 more bytes to a buffer to cover constants in string and null byte on top of 10 possible digits for an int. Closes bug #1501223. ........ r46684 | gregory.p.smith | 2006-06-06 01:59:37 +0200 (Tue, 06 Jun 2006) | 5 lines - bsddb: the __len__ method of a DB object has been fixed to return correct results. It could previously incorrectly return 0 in some cases. Fixes SF bug 1493322 (pybsddb bug 1184012). ........ r46686 | tim.peters | 2006-06-06 02:25:07 +0200 (Tue, 06 Jun 2006) | 7 lines _PySys_Init(): It's rarely a good idea to size a buffer to the exact maximum size someone guesses is needed. In this case, if we're really worried about extreme integers, then "cp%d" can actually need 14 bytes (2 for "cp" + 1 for \0 at the end + 11 for -(2**31-1)). So reserve 128 bytes instead -- nothing is actually saved by making a stack-local buffer tiny. ........ r46687 | neal.norwitz | 2006-06-06 09:22:08 +0200 (Tue, 06 Jun 2006) | 1 line Remove unused variable (and stop compiler warning) ........ r46688 | neal.norwitz | 2006-06-06 09:23:01 +0200 (Tue, 06 Jun 2006) | 1 line Fix a bunch of parameter strings ........ r46689 | thomas.heller | 2006-06-06 13:34:33 +0200 (Tue, 06 Jun 2006) | 6 lines Convert CFieldObject tp_members to tp_getset, since there is no structmember typecode for Py_ssize_t fields. This should fix some of the errors on the PPC64 debian machine (64-bit, big endian). Assigning to readonly fields now raises AttributeError instead of TypeError, so the testcase has to be changed as well. ........ r46690 | thomas.heller | 2006-06-06 13:54:32 +0200 (Tue, 06 Jun 2006) | 1 line Damn - the sentinel was missing. And fix another silly mistake. ........ r46691 | martin.blais | 2006-06-06 14:46:55 +0200 (Tue, 06 Jun 2006) | 13 lines Normalized a few cases of whitespace in function declarations. Found them using:: find . -name '*.py' | while read i ; do grep 'def[^(]*( ' $i /dev/null ; done find . -name '*.py' | while read i ; do grep ' ):' $i /dev/null ; done (I was doing this all over my own code anyway, because I'd been using spaces in all defs, so I thought I'd make a run on the Python code as well. If you need to do such fixes in your own code, you can use xx-rename or parenregu.el within emacs.) ........ r46693 | thomas.heller | 2006-06-06 17:34:18 +0200 (Tue, 06 Jun 2006) | 1 line Specify argtypes for all test functions. Maybe that helps on strange ;-) architectures ........ r46694 | tim.peters | 2006-06-06 17:50:17 +0200 (Tue, 06 Jun 2006) | 5 lines BSequence_set_range(): Rev 46688 ("Fix a bunch of parameter strings") changed this function's signature seemingly by mistake, which is causing buildbots to fail test_bsddb3. Restored the pre-46688 signature. ........ r46695 | tim.peters | 2006-06-06 17:52:35 +0200 (Tue, 06 Jun 2006) | 4 lines On python-dev Thomas Heller said these were committed by mistake in rev 46693, so reverting this part of rev 46693. ........ r46696 | andrew.kuchling | 2006-06-06 19:10:41 +0200 (Tue, 06 Jun 2006) | 1 line Fix comment typo ........ r46697 | brett.cannon | 2006-06-06 20:08:16 +0200 (Tue, 06 Jun 2006) | 2 lines Fix coding style guide bug. ........ r46698 | thomas.heller | 2006-06-06 20:50:46 +0200 (Tue, 06 Jun 2006) | 2 lines Add a hack so that foreign functions returning float now do work on 64-bit big endian platforms. ........ r46699 | thomas.heller | 2006-06-06 21:25:13 +0200 (Tue, 06 Jun 2006) | 3 lines Use the same big-endian hack as in _ctypes/callproc.c for callback functions. This fixes the callback function tests that return float. ........ r46700 | ronald.oussoren | 2006-06-06 21:50:24 +0200 (Tue, 06 Jun 2006) | 5 lines * Ensure that "make altinstall" works when the tree was configured 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) ........ r46701 | ronald.oussoren | 2006-06-06 21:56:00 +0200 (Tue, 06 Jun 2006) | 3 lines A quick hack to ensure the right key-bindings for IDLE on osx: install patched configuration files during a framework install. ........ r46702 | tim.peters | 2006-06-07 03:04:59 +0200 (Wed, 07 Jun 2006) | 4 lines dash_R_cleanup(): Clear filecmp._cache. This accounts for different results across -R runs (at least on Windows) of test_filecmp. ........ r46705 | tim.peters | 2006-06-07 08:57:51 +0200 (Wed, 07 Jun 2006) | 17 lines SF patch 1501987: Remove randomness from test_exceptions, from ?iga Seilnacht (sorry about the name, but Firefox on my box can't display the first character of the name -- the SF "Unix name" is zseil). This appears to cure the oddball intermittent leaks across runs when running test_exceptions under -R. I'm not sure why, but I'm too sleepy to care ;-) The thrust of the SF patch was to remove randomness in the pickle protocol used. I changed the patch to use range(pickle.HIGHEST_PROTOCOL + 1), to try both pickle and cPickle, and randomly mucked with other test lines to put statements on their own lines. Not a bugfix candidate (this is fiddling new-in-2.5 code). ........ r46706 | andrew.kuchling | 2006-06-07 15:55:33 +0200 (Wed, 07 Jun 2006) | 1 line Add an SQLite introduction, taken from the 'What's New' text ........ r46708 | andrew.kuchling | 2006-06-07 19:02:52 +0200 (Wed, 07 Jun 2006) | 1 line Mention other placeholders ........ r46709 | andrew.kuchling | 2006-06-07 19:03:46 +0200 (Wed, 07 Jun 2006) | 1 line Add an item; also, escape % ........ r46710 | andrew.kuchling | 2006-06-07 19:04:01 +0200 (Wed, 07 Jun 2006) | 1 line Mention other placeholders ........ r46716 | ronald.oussoren | 2006-06-07 20:57:44 +0200 (Wed, 07 Jun 2006) | 2 lines Move Mac/OSX/Tools one level up ........ r46717 | ronald.oussoren | 2006-06-07 20:58:01 +0200 (Wed, 07 Jun 2006) | 2 lines Move Mac/OSX/PythonLauncher one level up ........ r46718 | ronald.oussoren | 2006-06-07 20:58:42 +0200 (Wed, 07 Jun 2006) | 2 lines mv Mac/OSX/BuildScript one level up ........ r46719 | ronald.oussoren | 2006-06-07 21:02:03 +0200 (Wed, 07 Jun 2006) | 2 lines Move Mac/OSX/* one level up ........ r46720 | ronald.oussoren | 2006-06-07 21:06:01 +0200 (Wed, 07 Jun 2006) | 2 lines And the last bit: move IDLE one level up and adjust makefiles ........ r46723 | ronald.oussoren | 2006-06-07 21:38:53 +0200 (Wed, 07 Jun 2006) | 4 lines - Patch the correct version of python in the Info.plists at build time, instead of relying on a maintainer to update them before releases. - Remove the now empty Mac/OSX directory ........ r46727 | ronald.oussoren | 2006-06-07 22:18:44 +0200 (Wed, 07 Jun 2006) | 7 lines * If BuildApplet.py is used as an applet it starts with a version of sys.exutable that isn't usuable on an #!-line. That results in generated applets that don't actually work. Work around this problem by resetting sys.executable. * argvemulator.py didn't work on intel macs. This patch fixes this (bug #1491468) ........ r46728 | tim.peters | 2006-06-07 22:40:06 +0200 (Wed, 07 Jun 2006) | 2 lines Whitespace normalization. ........ r46729 | tim.peters | 2006-06-07 22:40:54 +0200 (Wed, 07 Jun 2006) | 2 lines Add missing svn:eol-style property to text files. ........ r46730 | thomas.heller | 2006-06-07 22:43:06 +0200 (Wed, 07 Jun 2006) | 7 lines Fix for foreign functions returning small structures on 64-bit big endian machines. Should fix the remaininf failure in the PPC64 Debian buildbot. Thanks to Matthias Klose for providing access to a machine to debug and test this. ........ r46731 | brett.cannon | 2006-06-07 23:48:17 +0200 (Wed, 07 Jun 2006) | 2 lines Clarify documentation for bf_getcharbuffer. ........ r46735 | neal.norwitz | 2006-06-08 07:12:45 +0200 (Thu, 08 Jun 2006) | 1 line Fix a refleak in recvfrom_into ........ r46736 | gregory.p.smith | 2006-06-08 07:17:08 +0200 (Thu, 08 Jun 2006) | 9 lines - bsddb: the bsddb.dbtables Modify method now raises the proper error and aborts the db transaction safely when a modifier callback fails. Fixes SF python patch/bug #1408584. Also cleans up the bsddb.dbtables docstrings since thats the only documentation that exists for that unadvertised module. (people really should really just use sqlite3) ........ r46737 | gregory.p.smith | 2006-06-08 07:38:11 +0200 (Thu, 08 Jun 2006) | 4 lines * Turn the deadlock situation described in SF bug #775414 into a DBDeadLockError exception. * add the test case for my previous dbtables commit. ........ r46738 | gregory.p.smith | 2006-06-08 07:39:54 +0200 (Thu, 08 Jun 2006) | 2 lines pasted set_lk_detect line in wrong spot in previous commit. fixed. passes tests this time. ........ r46739 | armin.rigo | 2006-06-08 12:56:24 +0200 (Thu, 08 Jun 2006) | 6 lines (arre, arigo) SF bug #1350060 Give a consistent behavior for comparison and hashing of method objects (both user- and built-in methods). Now compares the 'self' recursively. The hash was already asking for the hash of 'self'. ........ r46740 | andrew.kuchling | 2006-06-08 13:56:44 +0200 (Thu, 08 Jun 2006) | 1 line Typo fix ........ r46741 | georg.brandl | 2006-06-08 14:45:01 +0200 (Thu, 08 Jun 2006) | 2 lines Bug #1502750: Fix getargs "i" format to use LONG_MIN and LONG_MAX for bounds checking. ........ r46743 | georg.brandl | 2006-06-08 14:54:13 +0200 (Thu, 08 Jun 2006) | 2 lines Bug #1502728: Correctly link against librt library on HP-UX. ........ r46745 | georg.brandl | 2006-06-08 14:55:47 +0200 (Thu, 08 Jun 2006) | 3 lines Add news for recent bugfix. ........ r46746 | georg.brandl | 2006-06-08 15:31:07 +0200 (Thu, 08 Jun 2006) | 4 lines Argh. "integer" is a very confusing word ;) Actually, checking for INT_MAX and INT_MIN is correct since the format code explicitly handles a C "int". ........ r46748 | nick.coghlan | 2006-06-08 15:54:49 +0200 (Thu, 08 Jun 2006) | 1 line Add functools.update_wrapper() and functools.wraps() as described in PEP 356 ........ r46751 | georg.brandl | 2006-06-08 16:50:21 +0200 (Thu, 08 Jun 2006) | 4 lines Bug #1502805: don't alias file.__exit__ to file.close since the latter can return something that's true. ........ r46752 | georg.brandl | 2006-06-08 16:50:53 +0200 (Thu, 08 Jun 2006) | 3 lines Convert test_file to unittest. ........
1091 lines
34 KiB
Makefile
1091 lines
34 KiB
Makefile
# Top-level Makefile for Python
|
|
#
|
|
# As distributed, this file is called Makefile.pre.in; it is processed
|
|
# into the real Makefile by running the script ./configure, which
|
|
# replaces things like @spam@ with values appropriate for your system.
|
|
# This means that if you edit Makefile, your changes get lost the next
|
|
# time you run the configure script. Ideally, you can do:
|
|
#
|
|
# ./configure
|
|
# make
|
|
# make test
|
|
# make install
|
|
#
|
|
# If you have a previous version of Python installed that you don't
|
|
# want to overwrite, you can use "make altinstall" instead of "make
|
|
# install". Refer to the "Installing" section in the README file for
|
|
# additional details.
|
|
#
|
|
# See also the section "Build instructions" in the README file.
|
|
|
|
# === Variables set by makesetup ===
|
|
|
|
MODOBJS= _MODOBJS_
|
|
MODLIBS= _MODLIBS_
|
|
|
|
# === Variables set by configure
|
|
VERSION= @VERSION@
|
|
srcdir= @srcdir@
|
|
VPATH= @srcdir@
|
|
|
|
CC= @CC@
|
|
CXX= @CXX@
|
|
MAINCC= @MAINCC@
|
|
LINKCC= @LINKCC@
|
|
AR= @AR@
|
|
RANLIB= @RANLIB@
|
|
SVNVERSION= @SVNVERSION@
|
|
|
|
# Shell used by make (some versions default to the login shell, which is bad)
|
|
SHELL= /bin/sh
|
|
|
|
# Use this to make a link between python$(VERSION) and python in $(BINDIR)
|
|
LN= @LN@
|
|
|
|
# Portable install script (configure doesn't always guess right)
|
|
INSTALL= @INSTALL@
|
|
INSTALL_PROGRAM=@INSTALL_PROGRAM@
|
|
INSTALL_SCRIPT= @INSTALL_SCRIPT@
|
|
INSTALL_DATA= @INSTALL_DATA@
|
|
# Shared libraries must be installed with executable mode on some systems;
|
|
# rather than figuring out exactly which, we always give them executable mode.
|
|
# Also, making them read-only seems to be a good idea...
|
|
INSTALL_SHARED= ${INSTALL} -m 555
|
|
|
|
MAKESETUP= $(srcdir)/Modules/makesetup
|
|
|
|
# Compiler options
|
|
OPT= @OPT@
|
|
BASECFLAGS= @BASECFLAGS@
|
|
CFLAGS= $(BASECFLAGS) $(OPT) $(EXTRA_CFLAGS)
|
|
# Both CPPFLAGS and LDFLAGS need to contain the shell's value for setup.py to
|
|
# be able to build extension modules using the directories specified in the
|
|
# environment variables
|
|
CPPFLAGS= -I. -I$(srcdir)/Include @CPPFLAGS@
|
|
LDFLAGS= @LDFLAGS@
|
|
LDLAST= @LDLAST@
|
|
SGI_ABI= @SGI_ABI@
|
|
CCSHARED= @CCSHARED@
|
|
LINKFORSHARED= @LINKFORSHARED@
|
|
# Extra C flags added for building the interpreter object files.
|
|
CFLAGSFORSHARED=@CFLAGSFORSHARED@
|
|
# C flags used for building the interpreter object files
|
|
PY_CFLAGS= $(CFLAGS) $(CPPFLAGS) $(CFLAGSFORSHARED) -DPy_BUILD_CORE
|
|
|
|
|
|
# Machine-dependent subdirectories
|
|
MACHDEP= @MACHDEP@
|
|
|
|
# Install prefix for architecture-independent files
|
|
prefix= @prefix@
|
|
|
|
# Install prefix for architecture-dependent files
|
|
exec_prefix= @exec_prefix@
|
|
|
|
# Expanded directories
|
|
BINDIR= $(exec_prefix)/bin
|
|
LIBDIR= $(exec_prefix)/lib
|
|
MANDIR= @mandir@
|
|
INCLUDEDIR= @includedir@
|
|
CONFINCLUDEDIR= $(exec_prefix)/include
|
|
SCRIPTDIR= $(prefix)/lib
|
|
|
|
# Detailed destination directories
|
|
BINLIBDEST= $(LIBDIR)/python$(VERSION)
|
|
LIBDEST= $(SCRIPTDIR)/python$(VERSION)
|
|
INCLUDEPY= $(INCLUDEDIR)/python$(VERSION)
|
|
CONFINCLUDEPY= $(CONFINCLUDEDIR)/python$(VERSION)
|
|
LIBP= $(LIBDIR)/python$(VERSION)
|
|
|
|
# Symbols used for using shared libraries
|
|
SO= @SO@
|
|
LDSHARED= @LDSHARED@
|
|
BLDSHARED= @BLDSHARED@
|
|
DESTSHARED= $(BINLIBDEST)/lib-dynload
|
|
|
|
# Executable suffix (.exe on Windows and Mac OS X)
|
|
EXE= @EXEEXT@
|
|
BUILDEXE= @BUILDEXEEXT@
|
|
|
|
# Short name and location for Mac OS X Python framework
|
|
UNIVERSALSDK=@UNIVERSALSDK@
|
|
PYTHONFRAMEWORK= @PYTHONFRAMEWORK@
|
|
PYTHONFRAMEWORKDIR= @PYTHONFRAMEWORKDIR@
|
|
PYTHONFRAMEWORKPREFIX= @PYTHONFRAMEWORKPREFIX@
|
|
PYTHONFRAMEWORKINSTALLDIR= @PYTHONFRAMEWORKINSTALLDIR@
|
|
# Deployment target selected during configure, to be checked
|
|
# by distutils. The export statement is needed to ensure that the
|
|
# deployment target is active during build.
|
|
MACOSX_DEPLOYMENT_TARGET=@CONFIGURE_MACOSX_DEPLOYMENT_TARGET@
|
|
@EXPORT_MACOSX_DEPLOYMENT_TARGET@export MACOSX_DEPLOYMENT_TARGET
|
|
|
|
# Options to enable prebinding (for fast startup prior to Mac OS X 10.3)
|
|
OTHER_LIBTOOL_OPT=@OTHER_LIBTOOL_OPT@
|
|
|
|
# Environment to run shared python without installed libraries
|
|
RUNSHARED= @RUNSHARED@
|
|
|
|
# Modes for directories, executables and data files created by the
|
|
# install process. Default to user-only-writable for all file types.
|
|
DIRMODE= 755
|
|
EXEMODE= 755
|
|
FILEMODE= 644
|
|
|
|
# configure script arguments
|
|
CONFIG_ARGS= @CONFIG_ARGS@
|
|
|
|
|
|
# Subdirectories with code
|
|
SRCDIRS= @SRCDIRS@
|
|
|
|
# Other subdirectories
|
|
SUBDIRSTOO= Include Lib Misc Demo
|
|
|
|
# Files and directories to be distributed
|
|
CONFIGFILES= configure configure.in acconfig.h pyconfig.h.in Makefile.pre.in
|
|
DISTFILES= README ChangeLog $(CONFIGFILES)
|
|
DISTDIRS= $(SUBDIRS) $(SUBDIRSTOO) Ext-dummy
|
|
DIST= $(DISTFILES) $(DISTDIRS)
|
|
|
|
|
|
LIBRARY= @LIBRARY@
|
|
LDLIBRARY= @LDLIBRARY@
|
|
BLDLIBRARY= @BLDLIBRARY@
|
|
DLLLIBRARY= @DLLLIBRARY@
|
|
LDLIBRARYDIR= @LDLIBRARYDIR@
|
|
INSTSONAME= @INSTSONAME@
|
|
|
|
|
|
LIBS= @LIBS@
|
|
LIBM= @LIBM@
|
|
LIBC= @LIBC@
|
|
SYSLIBS= $(LIBM) $(LIBC)
|
|
SHLIBS= @SHLIBS@
|
|
|
|
THREADOBJ= @THREADOBJ@
|
|
DLINCLDIR= @DLINCLDIR@
|
|
DYNLOADFILE= @DYNLOADFILE@
|
|
MACHDEP_OBJS= @MACHDEP_OBJS@
|
|
UNICODE_OBJS= @UNICODE_OBJS@
|
|
|
|
PYTHON= python$(EXE)
|
|
BUILDPYTHON= python$(BUILDEXE)
|
|
|
|
# === Definitions added by makesetup ===
|
|
|
|
|
|
##########################################################################
|
|
# Modules
|
|
MODULE_OBJS= \
|
|
Modules/config.o \
|
|
Modules/getpath.o \
|
|
Modules/main.o \
|
|
Modules/gcmodule.o
|
|
|
|
# Used of signalmodule.o is not available
|
|
SIGNAL_OBJS= @SIGNAL_OBJS@
|
|
|
|
|
|
##########################################################################
|
|
# Grammar
|
|
GRAMMAR_H= $(srcdir)/Include/graminit.h
|
|
GRAMMAR_C= $(srcdir)/Python/graminit.c
|
|
GRAMMAR_INPUT= $(srcdir)/Grammar/Grammar
|
|
|
|
|
|
##########################################################################
|
|
# Parser
|
|
PGEN= Parser/pgen$(EXE)
|
|
|
|
POBJS= \
|
|
Parser/acceler.o \
|
|
Parser/grammar1.o \
|
|
Parser/listnode.o \
|
|
Parser/node.o \
|
|
Parser/parser.o \
|
|
Parser/parsetok.o \
|
|
Parser/bitset.o \
|
|
Parser/metagrammar.o \
|
|
Parser/firstsets.o \
|
|
Parser/grammar.o \
|
|
Parser/pgen.o
|
|
|
|
PARSER_OBJS= $(POBJS) Parser/myreadline.o Parser/tokenizer.o
|
|
|
|
PGOBJS= \
|
|
Objects/obmalloc.o \
|
|
Python/mysnprintf.o \
|
|
Parser/tokenizer_pgen.o \
|
|
Parser/printgrammar.o \
|
|
Parser/pgenmain.o
|
|
|
|
PGENOBJS= $(PGENMAIN) $(POBJS) $(PGOBJS)
|
|
|
|
##########################################################################
|
|
# AST
|
|
AST_H_DIR= $(srcdir)/Include
|
|
AST_H= $(AST_H_DIR)/Python-ast.h
|
|
AST_C_DIR= $(srcdir)/Python
|
|
AST_C= $(AST_C_DIR)/Python-ast.c
|
|
AST_ASDL= $(srcdir)/Parser/Python.asdl
|
|
|
|
ASDLGEN_FILES= $(srcdir)/Parser/asdl.py $(srcdir)/Parser/asdl_c.py
|
|
# XXX Note that a build now requires Python exist before the build starts
|
|
ASDLGEN= $(srcdir)/Parser/asdl_c.py
|
|
|
|
##########################################################################
|
|
# Python
|
|
PYTHON_OBJS= \
|
|
Python/Python-ast.o \
|
|
Python/asdl.o \
|
|
Python/ast.o \
|
|
Python/bltinmodule.o \
|
|
Python/ceval.o \
|
|
Python/compile.o \
|
|
Python/codecs.o \
|
|
Python/errors.o \
|
|
Python/frozen.o \
|
|
Python/frozenmain.o \
|
|
Python/future.o \
|
|
Python/getargs.o \
|
|
Python/getcompiler.o \
|
|
Python/getcopyright.o \
|
|
Python/getmtime.o \
|
|
Python/getplatform.o \
|
|
Python/getversion.o \
|
|
Python/graminit.o \
|
|
Python/import.o \
|
|
Python/importdl.o \
|
|
Python/marshal.o \
|
|
Python/modsupport.o \
|
|
Python/mystrtoul.o \
|
|
Python/mysnprintf.o \
|
|
Python/pyarena.o \
|
|
Python/pyfpe.o \
|
|
Python/pystate.o \
|
|
Python/pythonrun.o \
|
|
Python/structmember.o \
|
|
Python/symtable.o \
|
|
Python/sysmodule.o \
|
|
Python/traceback.o \
|
|
Python/getopt.o \
|
|
Python/pystrtod.o \
|
|
Python/$(DYNLOADFILE) \
|
|
$(MACHDEP_OBJS) \
|
|
$(THREADOBJ)
|
|
|
|
|
|
##########################################################################
|
|
# Objects
|
|
OBJECT_OBJS= \
|
|
Objects/abstract.o \
|
|
Objects/boolobject.o \
|
|
Objects/bufferobject.o \
|
|
Objects/bytesobject.o \
|
|
Objects/cellobject.o \
|
|
Objects/classobject.o \
|
|
Objects/cobject.o \
|
|
Objects/codeobject.o \
|
|
Objects/complexobject.o \
|
|
Objects/descrobject.o \
|
|
Objects/enumobject.o \
|
|
Objects/exceptions.o \
|
|
Objects/genobject.o \
|
|
Objects/fileobject.o \
|
|
Objects/floatobject.o \
|
|
Objects/frameobject.o \
|
|
Objects/funcobject.o \
|
|
Objects/intobject.o \
|
|
Objects/iterobject.o \
|
|
Objects/listobject.o \
|
|
Objects/longobject.o \
|
|
Objects/dictobject.o \
|
|
Objects/methodobject.o \
|
|
Objects/moduleobject.o \
|
|
Objects/object.o \
|
|
Objects/obmalloc.o \
|
|
Objects/rangeobject.o \
|
|
Objects/setobject.o \
|
|
Objects/sliceobject.o \
|
|
Objects/stringobject.o \
|
|
Objects/structseq.o \
|
|
Objects/tupleobject.o \
|
|
Objects/typeobject.o \
|
|
Objects/weakrefobject.o \
|
|
$(UNICODE_OBJS)
|
|
|
|
|
|
##########################################################################
|
|
# objects that get linked into the Python library
|
|
LIBRARY_OBJS= \
|
|
Modules/getbuildinfo.o \
|
|
$(PARSER_OBJS) \
|
|
$(OBJECT_OBJS) \
|
|
$(PYTHON_OBJS) \
|
|
$(MODULE_OBJS) \
|
|
$(SIGNAL_OBJS) \
|
|
$(MODOBJS)
|
|
|
|
#########################################################################
|
|
# Rules
|
|
|
|
# Default target
|
|
all: $(BUILDPYTHON) oldsharedmods sharedmods
|
|
|
|
# Build the interpreter
|
|
$(BUILDPYTHON): Modules/python.o $(LIBRARY) $(LDLIBRARY)
|
|
$(LINKCC) $(LDFLAGS) $(LINKFORSHARED) -o $@ \
|
|
Modules/python.o \
|
|
$(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST)
|
|
|
|
platform: $(BUILDPYTHON)
|
|
$(RUNSHARED) ./$(BUILDPYTHON) -E -c 'import sys ; from distutils.util import get_platform ; print get_platform()+"-"+sys.version[0:3]' >platform
|
|
|
|
|
|
# Build the shared modules
|
|
sharedmods: $(BUILDPYTHON)
|
|
case $$MAKEFLAGS in \
|
|
*-s*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' ./$(BUILDPYTHON) -E $(srcdir)/setup.py -q build;; \
|
|
*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' ./$(BUILDPYTHON) -E $(srcdir)/setup.py build;; \
|
|
esac
|
|
|
|
# Build static library
|
|
# avoid long command lines, same as LIBRARY_OBJS
|
|
$(LIBRARY): $(LIBRARY_OBJS)
|
|
-rm -f $@
|
|
$(AR) cr $@ Modules/getbuildinfo.o
|
|
$(AR) cr $@ $(PARSER_OBJS)
|
|
$(AR) cr $@ $(OBJECT_OBJS)
|
|
$(AR) cr $@ $(PYTHON_OBJS)
|
|
$(AR) cr $@ $(MODULE_OBJS) $(SIGNAL_OBJS)
|
|
$(AR) cr $@ $(MODOBJS)
|
|
$(RANLIB) $@
|
|
|
|
libpython$(VERSION).so: $(LIBRARY_OBJS)
|
|
if test $(INSTSONAME) != $(LDLIBRARY); then \
|
|
$(LDSHARED) -Wl,-h$(INSTSONAME) -o $(INSTSONAME) $(LIBRARY_OBJS) $(SHLIBS) $(LIBC) $(LIBM); \
|
|
$(LN) -f $(INSTSONAME) $@; \
|
|
else\
|
|
$(LDSHARED) -o $@ $(LIBRARY_OBJS) $(SHLIBS) $(LIBC) $(LIBM); \
|
|
fi
|
|
|
|
libpython$(VERSION).sl: $(LIBRARY_OBJS)
|
|
$(LDSHARED) -o $@ $(LIBRARY_OBJS) $(SHLIBS) $(LIBC) $(LIBM)
|
|
|
|
# This rule is here for OPENSTEP/Rhapsody/MacOSX. It builds a temporary
|
|
# minimal framework (not including the Lib directory and such) in the current
|
|
# directory.
|
|
RESSRCDIR=$(srcdir)/Mac/Resources/framework
|
|
$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK): \
|
|
$(LIBRARY) \
|
|
$(RESSRCDIR)/Info.plist \
|
|
$(RESSRCDIR)/version.plist \
|
|
$(RESSRCDIR)/English.lproj/InfoPlist.strings
|
|
$(INSTALL) -d -m $(DIRMODE) $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)
|
|
if test "${UNIVERSALSDK}"; then \
|
|
$(CC) -o $(LDLIBRARY) -arch i386 -arch ppc -dynamiclib \
|
|
-isysroot "${UNIVERSALSDK}" \
|
|
-all_load $(LIBRARY) -Wl,-single_module \
|
|
-install_name $(DESTDIR)$(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/Python \
|
|
-compatibility_version $(VERSION) \
|
|
-current_version $(VERSION); \
|
|
else \
|
|
libtool -o $(LDLIBRARY) -dynamic $(OTHER_LIBTOOL_OPT) $(LIBRARY) \
|
|
@LIBTOOL_CRUFT@ ;\
|
|
fi
|
|
$(INSTALL) -d -m $(DIRMODE) \
|
|
$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Resources/English.lproj
|
|
$(INSTALL_DATA) $(RESSRCDIR)/Info.plist \
|
|
$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Resources/Info.plist
|
|
$(INSTALL_DATA) $(RESSRCDIR)/version.plist \
|
|
$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Resources/version.plist
|
|
$(INSTALL_DATA) $(RESSRCDIR)/English.lproj/InfoPlist.strings \
|
|
$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Resources/English.lproj/InfoPlist.strings
|
|
$(LN) -fsn $(VERSION) $(PYTHONFRAMEWORKDIR)/Versions/Current
|
|
$(LN) -fsn Versions/Current/$(PYTHONFRAMEWORK) $(PYTHONFRAMEWORKDIR)/$(PYTHONFRAMEWORK)
|
|
$(LN) -fsn Versions/Current/Headers $(PYTHONFRAMEWORKDIR)/Headers
|
|
$(LN) -fsn Versions/Current/Resources $(PYTHONFRAMEWORKDIR)/Resources
|
|
|
|
# This rule builds the Cygwin Python DLL and import library if configured
|
|
# for a shared core library; otherwise, this rule is a noop.
|
|
$(DLLLIBRARY) libpython$(VERSION).dll.a: $(LIBRARY_OBJS)
|
|
if test -n "$(DLLLIBRARY)"; then \
|
|
$(LDSHARED) -Wl,--out-implib=$@ -o $(DLLLIBRARY) $^ \
|
|
$(LIBS) $(MODLIBS) $(SYSLIBS); \
|
|
else true; \
|
|
fi
|
|
|
|
|
|
oldsharedmods: $(SHAREDMODS)
|
|
|
|
|
|
Makefile Modules/config.c: Makefile.pre \
|
|
$(srcdir)/Modules/config.c.in \
|
|
$(MAKESETUP) \
|
|
Modules/Setup.config \
|
|
Modules/Setup \
|
|
Modules/Setup.local
|
|
$(SHELL) $(MAKESETUP) -c $(srcdir)/Modules/config.c.in \
|
|
-s Modules \
|
|
Modules/Setup.config \
|
|
Modules/Setup.local \
|
|
Modules/Setup
|
|
@mv config.c Modules
|
|
@echo "The Makefile was updated, you may need to re-run make."
|
|
|
|
|
|
Modules/Setup: $(srcdir)/Modules/Setup.dist
|
|
@if test -f Modules/Setup; then \
|
|
echo "-----------------------------------------------"; \
|
|
echo "Modules/Setup.dist is newer than Modules/Setup;"; \
|
|
echo "check to make sure you have all the updates you"; \
|
|
echo "need in your Modules/Setup file."; \
|
|
echo "Usually, copying Setup.dist to Setup will work."; \
|
|
echo "-----------------------------------------------"; \
|
|
fi
|
|
|
|
############################################################################
|
|
# Special rules for object files
|
|
|
|
Modules/getbuildinfo.o: $(PARSER_OBJS) \
|
|
$(OBJECT_OBJS) \
|
|
$(PYTHON_OBJS) \
|
|
$(MODULE_OBJS) \
|
|
$(SIGNAL_OBJS) \
|
|
$(MODOBJS) \
|
|
$(srcdir)/Modules/getbuildinfo.c
|
|
$(CC) -c $(PY_CFLAGS) -DSVNVERSION=\"`LANG=C $(SVNVERSION)`\" -o $@ $(srcdir)/Modules/getbuildinfo.c
|
|
|
|
Modules/getpath.o: $(srcdir)/Modules/getpath.c Makefile
|
|
$(CC) -c $(PY_CFLAGS) -DPYTHONPATH='"$(PYTHONPATH)"' \
|
|
-DPREFIX='"$(prefix)"' \
|
|
-DEXEC_PREFIX='"$(exec_prefix)"' \
|
|
-DVERSION='"$(VERSION)"' \
|
|
-DVPATH='"$(VPATH)"' \
|
|
-o $@ $(srcdir)/Modules/getpath.c
|
|
|
|
Modules/python.o: $(srcdir)/Modules/python.c
|
|
$(MAINCC) -c $(PY_CFLAGS) -o $@ $(srcdir)/Modules/python.c
|
|
|
|
|
|
$(GRAMMAR_H) $(GRAMMAR_C): $(PGEN) $(GRAMMAR_INPUT)
|
|
-$(PGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C)
|
|
|
|
$(PGEN): $(PGENOBJS)
|
|
$(CC) $(OPT) $(LDFLAGS) $(PGENOBJS) $(LIBS) -o $(PGEN)
|
|
|
|
Parser/grammar.o: $(srcdir)/Parser/grammar.c \
|
|
$(srcdir)/Include/token.h \
|
|
$(srcdir)/Include/grammar.h
|
|
Parser/metagrammar.o: $(srcdir)/Parser/metagrammar.c
|
|
|
|
Parser/tokenizer_pgen.o: $(srcdir)/Parser/tokenizer.c
|
|
|
|
$(AST_H): $(AST_ASDL) $(ASDLGEN_FILES)
|
|
$(ASDLGEN) -h $(AST_H_DIR) $(AST_ASDL)
|
|
|
|
$(AST_C): $(AST_ASDL) $(ASDLGEN_FILES)
|
|
$(ASDLGEN) -c $(AST_C_DIR) $(AST_ASDL)
|
|
|
|
Python/compile.o Python/symtable.o: $(GRAMMAR_H) $(AST_H)
|
|
|
|
Python/getplatform.o: $(srcdir)/Python/getplatform.c
|
|
$(CC) -c $(PY_CFLAGS) -DPLATFORM='"$(MACHDEP)"' -o $@ $(srcdir)/Python/getplatform.c
|
|
|
|
Python/importdl.o: $(srcdir)/Python/importdl.c
|
|
$(CC) -c $(PY_CFLAGS) -I$(DLINCLDIR) -o $@ $(srcdir)/Python/importdl.c
|
|
|
|
Objects/unicodectype.o: $(srcdir)/Objects/unicodectype.c \
|
|
$(srcdir)/Objects/unicodetype_db.h
|
|
|
|
############################################################################
|
|
# Header files
|
|
|
|
PYTHON_HEADERS= \
|
|
Include/Python.h \
|
|
Include/Python-ast.h \
|
|
Include/asdl.h \
|
|
Include/abstract.h \
|
|
Include/boolobject.h \
|
|
Include/bufferobject.h \
|
|
Include/bytesobject.h \
|
|
Include/ceval.h \
|
|
Include/classobject.h \
|
|
Include/cobject.h \
|
|
Include/code.h \
|
|
Include/codecs.h \
|
|
Include/compile.h \
|
|
Include/complexobject.h \
|
|
Include/descrobject.h \
|
|
Include/dictobject.h \
|
|
Include/enumobject.h \
|
|
Include/genobject.h \
|
|
Include/fileobject.h \
|
|
Include/floatobject.h \
|
|
Include/funcobject.h \
|
|
Include/import.h \
|
|
Include/intobject.h \
|
|
Include/intrcheck.h \
|
|
Include/iterobject.h \
|
|
Include/listobject.h \
|
|
Include/longobject.h \
|
|
Include/methodobject.h \
|
|
Include/modsupport.h \
|
|
Include/moduleobject.h \
|
|
Include/object.h \
|
|
Include/objimpl.h \
|
|
Include/patchlevel.h \
|
|
Include/pyarena.h \
|
|
Include/pydebug.h \
|
|
Include/pyerrors.h \
|
|
Include/pyfpe.h \
|
|
Include/pymem.h \
|
|
Include/pyport.h \
|
|
Include/pystate.h \
|
|
Include/pythonrun.h \
|
|
Include/rangeobject.h \
|
|
Include/setobject.h \
|
|
Include/sliceobject.h \
|
|
Include/stringobject.h \
|
|
Include/structseq.h \
|
|
Include/structmember.h \
|
|
Include/symtable.h \
|
|
Include/sysmodule.h \
|
|
Include/traceback.h \
|
|
Include/tupleobject.h \
|
|
Include/unicodeobject.h \
|
|
Include/weakrefobject.h \
|
|
pyconfig.h
|
|
|
|
$(LIBRARY_OBJS) $(MODOBJS) Modules/python.o: $(PYTHON_HEADERS)
|
|
|
|
|
|
######################################################################
|
|
|
|
# Test the interpreter (twice, once without .pyc files, once with)
|
|
# In the past, we've had problems where bugs in the marshalling or
|
|
# elsewhere caused bytecode read from .pyc files to behave differently
|
|
# than bytecode generated directly from a .py source file. Sometimes
|
|
# the bytecode read from a .pyc file had the bug, somtimes the directly
|
|
# generated bytecode. This is sometimes a very shy bug needing a lot of
|
|
# sample data.
|
|
|
|
TESTOPTS= -l $(EXTRATESTOPTS)
|
|
TESTPROG= $(srcdir)/Lib/test/regrtest.py
|
|
TESTPYTHON= $(RUNSHARED) ./$(BUILDPYTHON) -E -tt
|
|
test: all platform
|
|
-find $(srcdir)/Lib -name '*.py[co]' -print | xargs rm -f
|
|
-$(TESTPYTHON) $(TESTPROG) $(TESTOPTS)
|
|
$(TESTPYTHON) $(TESTPROG) $(TESTOPTS)
|
|
|
|
testall: all platform
|
|
-find $(srcdir)/Lib -name '*.py[co]' -print | xargs rm -f
|
|
-$(TESTPYTHON) $(TESTPROG) $(TESTOPTS) -uall
|
|
$(TESTPYTHON) $(TESTPROG) $(TESTOPTS) -uall
|
|
|
|
# Run the unitests for both architectures in a Universal build on OSX
|
|
# Must be run on an Intel box.
|
|
testuniversal: all platform
|
|
if [ `arch` != 'i386' ];then \
|
|
echo "This can only be used on OSX/i386" ;\
|
|
exit 1 ;\
|
|
fi
|
|
-find $(srcdir)/Lib -name '*.py[co]' -print | xargs rm -f
|
|
-$(TESTPYTHON) $(TESTPROG) $(TESTOPTS) -uall
|
|
$(TESTPYTHON) $(TESTPROG) $(TESTOPTS) -uall
|
|
$(RUNSHARED) /usr/libexec/oah/translate ./$(BUILDPYTHON) -E -tt $(TESTPROG) $(TESTOPTS) -uall
|
|
|
|
|
|
# Like testall, but with a single pass only
|
|
buildbottest: all platform
|
|
$(TESTPYTHON) $(TESTPROG) $(TESTOPTS) -uall -rw
|
|
|
|
QUICKTESTOPTS= $(TESTOPTS) -x test_thread test_signal test_strftime \
|
|
test_unicodedata test_re test_sre test_select test_poll \
|
|
test_linuxaudiodev test_struct test_sunaudiodev test_zlib
|
|
quicktest: all platform
|
|
-find $(srcdir)/Lib -name '*.py[co]' -print | xargs rm -f
|
|
-$(TESTPYTHON) $(TESTPROG) $(QUICKTESTOPTS)
|
|
$(TESTPYTHON) $(TESTPROG) $(QUICKTESTOPTS)
|
|
|
|
MEMTESTOPTS= $(QUICKTESTOPTS) -x test_dl test___all__ test_fork1 \
|
|
test_longexp
|
|
memtest: all platform
|
|
-rm -f $(srcdir)/Lib/test/*.py[co]
|
|
-$(TESTPYTHON) $(TESTPROG) $(MEMTESTOPTS)
|
|
$(TESTPYTHON) $(TESTPROG) $(MEMTESTOPTS)
|
|
|
|
# Install everything
|
|
install: @FRAMEWORKINSTALLFIRST@ altinstall bininstall maninstall @FRAMEWORKINSTALLLAST@
|
|
|
|
# Install almost everything without disturbing previous versions
|
|
altinstall: @FRAMEWORKALTINSTALLFIRST@ altbininstall libinstall inclinstall libainstall \
|
|
sharedinstall oldsharedinstall @FRAMEWORKALTINSTALLLAST@
|
|
|
|
# Install shared libraries enabled by Setup
|
|
DESTDIRS= $(exec_prefix) $(LIBDIR) $(BINLIBDEST) $(DESTSHARED)
|
|
|
|
oldsharedinstall: $(DESTSHARED) $(SHAREDMODS)
|
|
@for i in X $(SHAREDMODS); do \
|
|
if test $$i != X; then \
|
|
echo $(INSTALL_SHARED) $$i $(DESTSHARED)/`basename $$i`; \
|
|
$(INSTALL_SHARED) $$i $(DESTDIR)$(DESTSHARED)/`basename $$i`; \
|
|
fi; \
|
|
done
|
|
|
|
$(DESTSHARED):
|
|
@for i in $(DESTDIRS); \
|
|
do \
|
|
if test ! -d $(DESTDIR)$$i; then \
|
|
echo "Creating directory $$i"; \
|
|
$(INSTALL) -d -m $(DIRMODE) $(DESTDIR)$$i; \
|
|
else true; \
|
|
fi; \
|
|
done
|
|
|
|
|
|
# Install the interpreter (by creating a hard link to python$(VERSION))
|
|
bininstall: altbininstall
|
|
-if test -f $(DESTDIR)$(BINDIR)/$(PYTHON) -o -h $(DESTDIR)$(BINDIR)/$(PYTHON); \
|
|
then rm -f $(DESTDIR)$(BINDIR)/$(PYTHON); \
|
|
else true; \
|
|
fi
|
|
(cd $(DESTDIR)$(BINDIR); $(LN) python$(VERSION)$(EXE) $(PYTHON))
|
|
|
|
# Install the interpreter with $(VERSION) affixed
|
|
# This goes into $(exec_prefix)
|
|
altbininstall: $(BUILDPYTHON)
|
|
@if test "$(PYTHONFRAMEWORKDIR)" != no-framework; then \
|
|
if test ! -f $(DESTDIR)$(PYTHONFRAMEWORKINSTALLDIR)/Versions/Current/Resources/Info.plist; then \
|
|
echo 'Framework build: use "make frameworkinstall" in stead of "make install"'; \
|
|
exit 1; \
|
|
fi; \
|
|
fi
|
|
@for i in $(BINDIR) $(LIBDIR); \
|
|
do \
|
|
if test ! -d $(DESTDIR)$$i; then \
|
|
echo "Creating directory $$i"; \
|
|
$(INSTALL) -d -m $(DIRMODE) $(DESTDIR)$$i; \
|
|
else true; \
|
|
fi; \
|
|
done
|
|
$(INSTALL_PROGRAM) $(BUILDPYTHON) $(DESTDIR)$(BINDIR)/python$(VERSION)$(EXE)
|
|
if test -f libpython$(VERSION)$(SO); then \
|
|
if test "$(SO)" = .dll; then \
|
|
$(INSTALL_SHARED) libpython$(VERSION)$(SO) $(DESTDIR)$(BINDIR); \
|
|
else \
|
|
$(INSTALL_SHARED) libpython$(VERSION)$(SO) $(DESTDIR)$(LIBDIR)/$(INSTSONAME); \
|
|
if test libpython$(VERSION)$(SO) != $(INSTSONAME); then \
|
|
(cd $(DESTDIR)$(LIBDIR); $(LN) -sf $(INSTSONAME) libpython$(VERSION)$(SO)); \
|
|
fi \
|
|
fi; \
|
|
else true; \
|
|
fi
|
|
|
|
# Install the manual page
|
|
maninstall:
|
|
@for i in $(MANDIR) $(MANDIR)/man1; \
|
|
do \
|
|
if test ! -d $(DESTDIR)$$i; then \
|
|
echo "Creating directory $$i"; \
|
|
$(INSTALL) -d -m $(DIRMODE) $(DESTDIR)$$i; \
|
|
else true; \
|
|
fi; \
|
|
done
|
|
$(INSTALL_DATA) $(srcdir)/Misc/python.man \
|
|
$(DESTDIR)$(MANDIR)/man1/python.1
|
|
|
|
# Install the library
|
|
PLATDIR= plat-$(MACHDEP)
|
|
EXTRAPLATDIR= @EXTRAPLATDIR@
|
|
EXTRAMACHDEPPATH=@EXTRAMACHDEPPATH@
|
|
MACHDEPS= $(PLATDIR) $(EXTRAPLATDIR)
|
|
XMLLIBSUBDIRS= xmlcore xmlcore/dom xmlcore/etree xmlcore/parsers xmlcore/sax
|
|
PLATMACDIRS= plat-mac plat-mac/Carbon plat-mac/lib-scriptpackages \
|
|
plat-mac/lib-scriptpackages/_builtinSuites \
|
|
plat-mac/lib-scriptpackages/CodeWarrior \
|
|
plat-mac/lib-scriptpackages/Explorer \
|
|
plat-mac/lib-scriptpackages/Finder \
|
|
plat-mac/lib-scriptpackages/Netscape \
|
|
plat-mac/lib-scriptpackages/StdSuites \
|
|
plat-mac/lib-scriptpackages/SystemEvents \
|
|
plat-mac/lib-scriptpackages/Terminal
|
|
PLATMACPATH=:plat-mac:plat-mac/lib-scriptpackages
|
|
LIBSUBDIRS= lib-old lib-tk site-packages test test/output test/data \
|
|
test/decimaltestdata \
|
|
encodings compiler hotshot \
|
|
email email/mime email/test email/test/data \
|
|
sqlite3 sqlite3/test \
|
|
logging bsddb bsddb/test csv \
|
|
ctypes ctypes/test ctypes/macholib idlelib idlelib/Icons \
|
|
distutils distutils/command distutils/tests $(XMLLIBSUBDIRS) \
|
|
setuptools setuptools/command setuptools/tests setuptools.egg-info \
|
|
curses $(MACHDEPS)
|
|
libinstall: $(BUILDPYTHON) $(srcdir)/Lib/$(PLATDIR)
|
|
@for i in $(SCRIPTDIR) $(LIBDEST); \
|
|
do \
|
|
if test ! -d $(DESTDIR)$$i; then \
|
|
echo "Creating directory $$i"; \
|
|
$(INSTALL) -d -m $(DIRMODE) $(DESTDIR)$$i; \
|
|
else true; \
|
|
fi; \
|
|
done
|
|
@for d in $(LIBSUBDIRS); \
|
|
do \
|
|
a=$(srcdir)/Lib/$$d; \
|
|
if test ! -d $$a; then continue; else true; fi; \
|
|
b=$(LIBDEST)/$$d; \
|
|
if test ! -d $(DESTDIR)$$b; then \
|
|
echo "Creating directory $$b"; \
|
|
$(INSTALL) -d -m $(DIRMODE) $(DESTDIR)$$b; \
|
|
else true; \
|
|
fi; \
|
|
done
|
|
@for i in $(srcdir)/Lib/*.py $(srcdir)/Lib/*.doc; \
|
|
do \
|
|
if test -x $$i; then \
|
|
$(INSTALL_SCRIPT) $$i $(DESTDIR)$(LIBDEST); \
|
|
echo $(INSTALL_SCRIPT) $$i $(LIBDEST); \
|
|
else \
|
|
$(INSTALL_DATA) $$i $(DESTDIR)$(LIBDEST); \
|
|
echo $(INSTALL_DATA) $$i $(LIBDEST); \
|
|
fi; \
|
|
done
|
|
@for d in $(LIBSUBDIRS); \
|
|
do \
|
|
a=$(srcdir)/Lib/$$d; \
|
|
if test ! -d $$a; then continue; else true; fi; \
|
|
if test `ls $$a | wc -l` -lt 1; then continue; fi; \
|
|
b=$(LIBDEST)/$$d; \
|
|
for i in $$a/*; \
|
|
do \
|
|
case $$i in \
|
|
*CVS) ;; \
|
|
*.py[co]) ;; \
|
|
*.orig) ;; \
|
|
*~) ;; \
|
|
*) \
|
|
if test -d $$i; then continue; fi; \
|
|
if test -x $$i; then \
|
|
echo $(INSTALL_SCRIPT) $$i $$b; \
|
|
$(INSTALL_SCRIPT) $$i $(DESTDIR)$$b; \
|
|
else \
|
|
echo $(INSTALL_DATA) $$i $$b; \
|
|
$(INSTALL_DATA) $$i $(DESTDIR)$$b; \
|
|
fi;; \
|
|
esac; \
|
|
done; \
|
|
done
|
|
$(INSTALL_DATA) $(srcdir)/LICENSE $(DESTDIR)$(LIBDEST)/LICENSE.txt
|
|
PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
|
|
./$(BUILDPYTHON) -Wi -tt $(DESTDIR)$(LIBDEST)/compileall.py \
|
|
-d $(LIBDEST) -f \
|
|
-x 'bad_coding|badsyntax|site-packages' $(DESTDIR)$(LIBDEST)
|
|
PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
|
|
./$(BUILDPYTHON) -Wi -tt -O $(DESTDIR)$(LIBDEST)/compileall.py \
|
|
-d $(LIBDEST) -f \
|
|
-x 'bad_coding|badsyntax|site-packages' $(DESTDIR)$(LIBDEST)
|
|
-PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
|
|
./$(BUILDPYTHON) -Wi -t $(DESTDIR)$(LIBDEST)/compileall.py \
|
|
-d $(LIBDEST)/site-packages -f \
|
|
-x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
|
|
-PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
|
|
./$(BUILDPYTHON) -Wi -t -O $(DESTDIR)$(LIBDEST)/compileall.py \
|
|
-d $(LIBDEST)/site-packages -f \
|
|
-x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
|
|
|
|
# Create the PLATDIR source directory, if one wasn't distributed..
|
|
$(srcdir)/Lib/$(PLATDIR):
|
|
mkdir $(srcdir)/Lib/$(PLATDIR)
|
|
cp $(srcdir)/Lib/plat-generic/regen $(srcdir)/Lib/$(PLATDIR)/regen
|
|
export PATH; PATH="`pwd`:$$PATH"; \
|
|
export PYTHONPATH; PYTHONPATH="`pwd`/Lib"; \
|
|
export DYLD_FRAMEWORK_PATH; DYLD_FRAMEWORK_PATH="`pwd`"; \
|
|
export EXE; EXE="$(BUILDEXE)"; \
|
|
cd $(srcdir)/Lib/$(PLATDIR); ./regen
|
|
|
|
# Install the include files
|
|
INCLDIRSTOMAKE=$(INCLUDEDIR) $(CONFINCLUDEDIR) $(INCLUDEPY) $(CONFINCLUDEPY)
|
|
inclinstall:
|
|
@for i in $(INCLDIRSTOMAKE); \
|
|
do \
|
|
if test ! -d $(DESTDIR)$$i; then \
|
|
echo "Creating directory $$i"; \
|
|
$(INSTALL) -d -m $(DIRMODE) $(DESTDIR)$$i; \
|
|
else true; \
|
|
fi; \
|
|
done
|
|
@for i in $(srcdir)/Include/*.h; \
|
|
do \
|
|
echo $(INSTALL_DATA) $$i $(INCLUDEPY); \
|
|
$(INSTALL_DATA) $$i $(DESTDIR)$(INCLUDEPY); \
|
|
done
|
|
$(INSTALL_DATA) pyconfig.h $(DESTDIR)$(CONFINCLUDEPY)/pyconfig.h
|
|
|
|
# Install the library and miscellaneous stuff needed for extending/embedding
|
|
# This goes into $(exec_prefix)
|
|
LIBPL= $(LIBP)/config
|
|
libainstall: all
|
|
@for i in $(LIBDIR) $(LIBP) $(LIBPL); \
|
|
do \
|
|
if test ! -d $(DESTDIR)$$i; then \
|
|
echo "Creating directory $$i"; \
|
|
$(INSTALL) -d -m $(DIRMODE) $(DESTDIR)$$i; \
|
|
else true; \
|
|
fi; \
|
|
done
|
|
@if test -d $(LIBRARY); then :; else \
|
|
if test "$(PYTHONFRAMEWORKDIR)" = no-framework; then \
|
|
if test "$(SO)" = .dll; then \
|
|
$(INSTALL_DATA) $(LDLIBRARY) $(DESTDIR)$(LIBPL) ; \
|
|
else \
|
|
$(INSTALL_DATA) $(LIBRARY) $(DESTDIR)$(LIBPL)/$(LIBRARY) ; \
|
|
$(RANLIB) $(DESTDIR)$(LIBPL)/$(LIBRARY) ; \
|
|
fi; \
|
|
else \
|
|
echo Skip install of $(LIBRARY) - use make frameworkinstall; \
|
|
fi; \
|
|
fi
|
|
$(INSTALL_DATA) Modules/config.c $(DESTDIR)$(LIBPL)/config.c
|
|
$(INSTALL_DATA) Modules/python.o $(DESTDIR)$(LIBPL)/python.o
|
|
$(INSTALL_DATA) $(srcdir)/Modules/config.c.in $(DESTDIR)$(LIBPL)/config.c.in
|
|
$(INSTALL_DATA) Makefile $(DESTDIR)$(LIBPL)/Makefile
|
|
$(INSTALL_DATA) Modules/Setup $(DESTDIR)$(LIBPL)/Setup
|
|
$(INSTALL_DATA) Modules/Setup.local $(DESTDIR)$(LIBPL)/Setup.local
|
|
$(INSTALL_DATA) Modules/Setup.config $(DESTDIR)$(LIBPL)/Setup.config
|
|
$(INSTALL_SCRIPT) $(srcdir)/Modules/makesetup $(DESTDIR)$(LIBPL)/makesetup
|
|
$(INSTALL_SCRIPT) $(srcdir)/install-sh $(DESTDIR)$(LIBPL)/install-sh
|
|
# Substitution happens here, as the completely-expanded BINDIR
|
|
# is not available in configure
|
|
sed -e "s,@BINDIR@,$(BINDIR)," < $(srcdir)/Misc/python-config.in >python-config
|
|
$(INSTALL_SCRIPT) python-config $(DESTDIR)$(BINDIR)/python-config
|
|
rm python-config
|
|
@if [ -s Modules/python.exp -a \
|
|
"`echo $(MACHDEP) | sed 's/^\(...\).*/\1/'`" = "aix" ]; then \
|
|
echo; echo "Installing support files for building shared extension modules on AIX:"; \
|
|
$(INSTALL_DATA) Modules/python.exp \
|
|
$(DESTDIR)$(LIBPL)/python.exp; \
|
|
echo; echo "$(LIBPL)/python.exp"; \
|
|
$(INSTALL_SCRIPT) $(srcdir)/Modules/makexp_aix \
|
|
$(DESTDIR)$(LIBPL)/makexp_aix; \
|
|
echo "$(LIBPL)/makexp_aix"; \
|
|
$(INSTALL_SCRIPT) $(srcdir)/Modules/ld_so_aix \
|
|
$(DESTDIR)$(LIBPL)/ld_so_aix; \
|
|
echo "$(LIBPL)/ld_so_aix"; \
|
|
echo; echo "See Misc/AIX-NOTES for details."; \
|
|
else true; \
|
|
fi
|
|
@case "$(MACHDEP)" in beos*) \
|
|
echo; echo "Installing support files for building shared extension modules on BeOS:"; \
|
|
$(INSTALL_DATA) Misc/BeOS-NOTES $(DESTDIR)$(LIBPL)/README; \
|
|
echo; echo "$(LIBPL)/README"; \
|
|
$(INSTALL_SCRIPT) Modules/ar_beos $(DESTDIR)$(LIBPL)/ar_beos; \
|
|
echo "$(LIBPL)/ar_beos"; \
|
|
$(INSTALL_SCRIPT) Modules/ld_so_beos $(DESTDIR)$(LIBPL)/ld_so_beos; \
|
|
echo "$(LIBPL)/ld_so_beos"; \
|
|
echo; echo "See Misc/BeOS-NOTES for details."; \
|
|
;; \
|
|
esac
|
|
|
|
# Install the dynamically loadable modules
|
|
# This goes into $(exec_prefix)
|
|
sharedinstall:
|
|
$(RUNSHARED) ./$(BUILDPYTHON) -E $(srcdir)/setup.py install \
|
|
--prefix=$(prefix) \
|
|
--install-scripts=$(BINDIR) \
|
|
--install-platlib=$(DESTSHARED) \
|
|
--root=/$(DESTDIR)
|
|
|
|
# Here are a couple of targets for MacOSX again, to install a full
|
|
# framework-based Python. frameworkinstall installs everything, the
|
|
# subtargets install specific parts. Much of the actual work is offloaded to
|
|
# the Makefile in Mac
|
|
#
|
|
#
|
|
# This target is here for backward compatiblity, previous versions of Python
|
|
# hadn't integrated framework installation in the normal install process.
|
|
frameworkinstall: install
|
|
|
|
# On install, we re-make the framework
|
|
# structure in the install location, /Library/Frameworks/ or the argument to
|
|
# --enable-framework. If --enable-framework has been specified then we have
|
|
# automatically set prefix to the location deep down in the framework, so we
|
|
# only have to cater for the structural bits of the framework.
|
|
|
|
frameworkinstallframework: frameworkinstallstructure install frameworkinstallmaclib
|
|
|
|
frameworkinstallstructure: $(LDLIBRARY)
|
|
@if test "$(PYTHONFRAMEWORKDIR)" = no-framework; then \
|
|
echo Not configured with --enable-framework; \
|
|
exit 1; \
|
|
else true; \
|
|
fi
|
|
@for i in $(prefix)/Resources/English.lproj $(prefix)/lib; do\
|
|
if test ! -d $(DESTDIR)$$i; then \
|
|
echo "Creating directory $(DESTDIR)$$i"; \
|
|
$(INSTALL) -d -m $(DIRMODE) $(DESTDIR)$$i; \
|
|
else true; \
|
|
fi; \
|
|
done
|
|
$(LN) -fsn include/python$(VERSION) $(DESTDIR)$(prefix)/Headers
|
|
$(INSTALL_DATA) $(RESSRCDIR)/Info.plist $(DESTDIR)$(prefix)/Resources/Info.plist
|
|
$(INSTALL_DATA) $(RESSRCDIR)/version.plist $(DESTDIR)$(prefix)/Resources/version.plist
|
|
$(INSTALL_DATA) $(RESSRCDIR)/English.lproj/InfoPlist.strings \
|
|
$(DESTDIR)$(prefix)/Resources/English.lproj/InfoPlist.strings
|
|
$(LN) -fsn $(VERSION) $(DESTDIR)$(PYTHONFRAMEWORKINSTALLDIR)/Versions/Current
|
|
$(LN) -fsn Versions/Current/Python $(DESTDIR)$(PYTHONFRAMEWORKINSTALLDIR)/Python
|
|
$(LN) -fsn Versions/Current/Headers $(DESTDIR)$(PYTHONFRAMEWORKINSTALLDIR)/Headers
|
|
$(LN) -fsn Versions/Current/Resources $(DESTDIR)$(PYTHONFRAMEWORKINSTALLDIR)/Resources
|
|
$(INSTALL_SHARED) $(LDLIBRARY) $(DESTDIR)$(PYTHONFRAMEWORKPREFIX)/$(LDLIBRARY)
|
|
|
|
# This installs Mac/Lib into the framework
|
|
frameworkinstallmaclib:
|
|
cd Mac && $(MAKE) installmacsubtree DESTDIR="$(DESTDIR)"
|
|
|
|
# This installs the IDE, the Launcher and other apps into /Applications
|
|
frameworkinstallapps:
|
|
cd Mac && $(MAKE) installapps DESTDIR="$(DESTDIR)"
|
|
|
|
# This install the unix python and pythonw tools in /usr/local/bin
|
|
frameworkinstallunixtools:
|
|
cd Mac && $(MAKE) installunixtools DESTDIR="$(DESTDIR)"
|
|
|
|
frameworkaltinstallunixtools:
|
|
cd Mac && $(MAKE) altinstallunixtools DESTDIR="$(DESTDIR)"
|
|
|
|
# This installs the Demos and Tools into the applications directory.
|
|
# It is not part of a normal frameworkinstall
|
|
frameworkinstallextras:
|
|
cd Mac && Make installextras DESTDIR="$(DESTDIR)"
|
|
|
|
# This installs a few of the useful scripts in Tools/scripts
|
|
scriptsinstall:
|
|
SRCDIR=$(srcdir) $(RUNSHARED) \
|
|
./$(BUILDPYTHON) $(srcdir)/Tools/scripts/setup.py install \
|
|
--prefix=$(prefix) \
|
|
--install-scripts=$(BINDIR) \
|
|
--root=/$(DESTDIR)
|
|
|
|
# Build the toplevel Makefile
|
|
Makefile.pre: Makefile.pre.in config.status
|
|
CONFIG_FILES=Makefile.pre CONFIG_HEADERS= $(SHELL) config.status
|
|
$(MAKE) -f Makefile.pre Makefile
|
|
|
|
# Run the configure script.
|
|
config.status: $(srcdir)/configure
|
|
$(SHELL) $(srcdir)/configure $(CONFIG_ARGS)
|
|
|
|
.PRECIOUS: config.status $(BUILDPYTHON) Makefile Makefile.pre
|
|
|
|
# Some make's put the object file in the current directory
|
|
.c.o:
|
|
$(CC) -c $(PY_CFLAGS) -o $@ $<
|
|
|
|
# Run reindent on the library
|
|
reindent:
|
|
./python$(EXEEXT) $(srcdir)/Tools/scripts/reindent.py -r $(srcdir)/Lib
|
|
|
|
# Rerun configure with the same options as it was run last time,
|
|
# provided the config.status script exists
|
|
recheck:
|
|
$(SHELL) config.status --recheck
|
|
$(SHELL) config.status
|
|
|
|
# Rebuild the configure script from configure.in; also rebuild pyconfig.h.in
|
|
autoconf:
|
|
(cd $(srcdir); autoconf)
|
|
(cd $(srcdir); autoheader)
|
|
|
|
# Create a tags file for vi
|
|
tags::
|
|
cd $(srcdir); \
|
|
ctags -w -t Include/*.h; \
|
|
for i in $(SRCDIRS); do ctags -w -t -a $$i/*.[ch]; \
|
|
done; \
|
|
sort -o tags tags
|
|
|
|
# Create a tags file for GNU Emacs
|
|
TAGS::
|
|
cd $(srcdir); \
|
|
etags Include/*.h; \
|
|
for i in $(SRCDIRS); do etags -a $$i/*.[ch]; done
|
|
|
|
# Sanitation targets -- clean leaves libraries, executables and tags
|
|
# files, which clobber removes those as well
|
|
pycremoval:
|
|
find $(srcdir) -name '*.py[co]' -exec rm -f {} ';'
|
|
|
|
clean: pycremoval
|
|
find . -name '*.o' -exec rm -f {} ';'
|
|
find . -name '*.s[ol]' -exec rm -f {} ';'
|
|
find $(srcdir)/build -name 'fficonfig.h' -exec rm -f {} ';' || true
|
|
find $(srcdir)/build -name 'fficonfig.py' -exec rm -f {} ';' || true
|
|
|
|
clobber: clean
|
|
-rm -f $(BUILDPYTHON) $(PGEN) $(LIBRARY) $(LDLIBRARY) $(DLLLIBRARY) \
|
|
tags TAGS \
|
|
config.cache config.log pyconfig.h Modules/config.c
|
|
-rm -rf build platform
|
|
-rm -rf $(PYTHONFRAMEWORKDIR)
|
|
|
|
# Make things extra clean, before making a distribution:
|
|
# remove all generated files, even Makefile[.pre]
|
|
# Keep configure and Python-ast.[ch], it's possible they can't be generated
|
|
distclean: clobber
|
|
-rm -f core Makefile Makefile.pre config.status \
|
|
Modules/Setup Modules/Setup.local Modules/Setup.config
|
|
find $(srcdir) '(' -name '*.fdc' -o -name '*~' \
|
|
-o -name '[@,#]*' -o -name '*.old' \
|
|
-o -name '*.orig' -o -name '*.rej' \
|
|
-o -name '*.bak' ')' \
|
|
-exec rm -f {} ';'
|
|
|
|
# Check for smelly exported symbols (not starting with Py/_Py)
|
|
smelly: all
|
|
nm -p $(LIBRARY) | \
|
|
sed -n "/ [TDB] /s/.* //p" | grep -v "^_*Py" | sort -u; \
|
|
|
|
# Find files with funny names
|
|
funny:
|
|
find $(DISTDIRS) -type d \
|
|
-o -name '*.[chs]' \
|
|
-o -name '*.py' \
|
|
-o -name '*.doc' \
|
|
-o -name '*.sty' \
|
|
-o -name '*.bib' \
|
|
-o -name '*.dat' \
|
|
-o -name '*.el' \
|
|
-o -name '*.fd' \
|
|
-o -name '*.in' \
|
|
-o -name '*.tex' \
|
|
-o -name '*,[vpt]' \
|
|
-o -name 'Setup' \
|
|
-o -name 'Setup.*' \
|
|
-o -name README \
|
|
-o -name Makefile \
|
|
-o -name ChangeLog \
|
|
-o -name Repository \
|
|
-o -name Root \
|
|
-o -name Entries \
|
|
-o -name Tag \
|
|
-o -name tags \
|
|
-o -name TAGS \
|
|
-o -name .cvsignore \
|
|
-o -name MANIFEST \
|
|
-o -print
|
|
|
|
# Dependencies
|
|
|
|
Python/thread.o: @THREADHEADERS@
|
|
|
|
# Declare targets that aren't real files
|
|
.PHONY: all sharedmods oldsharedmods test quicktest memtest
|
|
.PHONY: install altinstall oldsharedinstall bininstall altbininstall
|
|
.PHONY: maninstall libinstall inclinstall libainstall sharedinstall
|
|
.PHONY: frameworkinstall frameworkinstallframework frameworkinstallstructure
|
|
.PHONY: frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools
|
|
.PHONY: frameworkaltinstallunixtools recheck autoconf clean clobber distclean
|
|
.PHONY: smelly funny
|
|
|
|
# IF YOU PUT ANYTHING HERE IT WILL GO AWAY
|