├── .gitignore ├── Modules.Setup.2.7.static ├── Modules.Setup.3.2.static ├── Modules.Setup.mu.2.7.static ├── Modules.dlmodule.2.7.c ├── Modules.dlmodule.2.7.c.orig ├── Pyrex-0.9.9.tar.gz ├── Python-2.7.12.tar.xz ├── Python-3.2.tar.bz2 ├── README.txt ├── advzip.darwin.inst.tbz2 ├── advzip.inst.tbz2 ├── alo-aes-0.3.tar.gz ├── build.sh ├── busybox ├── bzip2-1.0.5.inst.tbz2 ├── bzip2-1.0.6.tar.gz ├── calculate_path.2.7.c ├── calculate_path.3.2.c ├── concurrence-0.3.1.tar.gz ├── d.sh ├── doc ├── compress.txt └── slides_2011-06-23 │ ├── pts_staticpython_2011-06-23.html │ ├── sh_dull.min.css │ ├── sh_javascript.min.js │ ├── sh_main.min.js │ ├── sh_nedit.min.css │ └── sh_python.min.js ├── download.txt ├── encodings_idna_missing_unicodedata.3.2.patch ├── gcc.inst.tbz2 ├── gcxbase.inst.tbz2 ├── gcxtool.inst.tbz2 ├── gevent-0.13.6.tar.gz ├── geventmysql-20110201.tbz2 ├── greenlet-0.3.1-pycapsule.patch ├── greenlet-0.3.1.tar.gz ├── libevent-2.0.16-stable.tar.gz ├── lmdb-0.92.tar.gz ├── lmdb_example.py ├── locale.darwin.2.7.patch ├── locale.darwin.3.2.patch ├── make ├── mini_pipes.py ├── mini_subprocess.py ├── mini_zipfile.py ├── missing.txt ├── msgpack-python-20111221.tar.bz2 ├── msgpack_pyx.patch ├── ncurses-5.6.inst.tbz2 ├── openssl-0.9.8zh.tar.gz ├── perl ├── pts-advzip-advancecomp-1.15.patch ├── pycrypto-2.3.tar.gz ├── python-tokyocabinet-20111221.tar.bz2 ├── readline-5.2.inst.tbz2 ├── readline-5.2.tar.gz ├── release.darwin ├── python2.7-static ├── python3.2-static ├── stackless2.7-static ├── stackless3.2-static ├── stacklessco2.7-static └── stacklessxl3.2-static ├── release ├── python2.7-static ├── python3.2-static ├── pythonmu2.7-static ├── pythonmul2.7-static ├── stackless2.7-static ├── stackless3.2-static ├── stacklessco2.7-static ├── stacklessxl3.2-static └── stacklessxx2.7-static ├── runpy.mu.2.7.py ├── site.2.7.py ├── site.3.2.py ├── sqlite-3.7.0.1.inst.tbz2 ├── sqlite-amalgamation-3070603.zip ├── stackless-2712-export.tar.xz ├── stackless-32-export.tar.bz2 ├── staticpython.html ├── syncless-0.25.tar.gz ├── tokyocabinet-1.4.47.tar.gz ├── tokyocabinet_hash_c.patch ├── zlib-1.2.3.3.inst.tbz2 └── zlib-1.2.5.tar.bz2 /.gitignore: -------------------------------------------------------------------------------- 1 | *~ 2 | busybox.bin/ 3 | release.old/ 4 | python*-static.build/ 5 | python*-static 6 | stackless*-static.build/ 7 | stackless*-static 8 | -------------------------------------------------------------------------------- /Modules.Setup.2.7.static: -------------------------------------------------------------------------------- 1 | # -*- makefile -*- 2 | # The file Setup is used by the makesetup script to construct the files 3 | # Makefile and config.c, from Makefile.pre and config.c.in, 4 | # respectively. The file Setup itself is initially copied from 5 | # Setup.dist; once it exists it will not be overwritten, so you can edit 6 | # Setup to your heart's content. Note that Makefile.pre is created 7 | # from Makefile.pre.in by the toplevel configure script. 8 | 9 | # (VPATH notes: Setup and Makefile.pre are in the build directory, as 10 | # are Makefile and config.c; the *.in and *.dist files are in the source 11 | # directory.) 12 | 13 | # Each line in this file describes one or more optional modules. 14 | # Modules enabled here will not be compiled by the setup.py script, 15 | # so the file can be used to override setup.py's behavior. 16 | 17 | # Lines have the following structure: 18 | # 19 | # ... [ ...] [ ...] [ ...] 20 | # 21 | # is anything ending in .c (.C, .cc, .c++ are C++ files) 22 | # is anything starting with -I, -D, -U or -C 23 | # is anything ending in .a or beginning with -l or -L 24 | # is anything else but should be a valid Python 25 | # identifier (letters, digits, underscores, beginning with non-digit) 26 | # 27 | # (As the makesetup script changes, it may recognize some other 28 | # arguments as well, e.g. *.so and *.sl as libraries. See the big 29 | # case statement in the makesetup script.) 30 | # 31 | # Lines can also have the form 32 | # 33 | # = 34 | # 35 | # which defines a Make variable definition inserted into Makefile.in 36 | # 37 | # Finally, if a line contains just the word "*shared*" (without the 38 | # quotes but with the stars), then the following modules will not be 39 | # built statically. The build process works like this: 40 | # 41 | # 1. Build all modules that are declared as static in Modules/Setup, 42 | # combine them into libpythonxy.a, combine that into python. 43 | # 2. Build all modules that are listed as shared in Modules/Setup. 44 | # 3. Invoke setup.py. That builds all modules that 45 | # a) are not builtin, and 46 | # b) are not listed in Modules/Setup, and 47 | # c) can be build on the target 48 | # 49 | # Therefore, modules declared to be shared will not be 50 | # included in the config.c file, nor in the list of objects to be 51 | # added to the library archive, and their linker options won't be 52 | # added to the linker options. Rules to create their .o files and 53 | # their shared libraries will still be added to the Makefile, and 54 | # their names will be collected in the Make variable SHAREDMODS. This 55 | # is used to build modules as shared libraries. (They can be 56 | # installed using "make sharedinstall", which is implied by the 57 | # toplevel "make install" target.) (For compatibility, 58 | # *noconfig* has the same effect as *shared*.) 59 | # 60 | # In addition, *static* explicitly declares the following modules to 61 | # be static. Lines containing "*static*" and "*shared*" may thus 62 | # alternate throughout this file. 63 | 64 | # NOTE: As a standard policy, as many modules as can be supported by a 65 | # platform should be present. The distribution comes with all modules 66 | # enabled that are supported by most platforms and don't require you 67 | # to ftp sources from elsewhere. 68 | 69 | 70 | # Some special rules to define PYTHONPATH. 71 | # Edit the definitions below to indicate which options you are using. 72 | # Don't add any whitespace or comments! 73 | 74 | # Directories where library files get installed. 75 | # DESTLIB is for Python modules; MACHDESTLIB for shared libraries. 76 | DESTLIB=$(LIBDEST) 77 | MACHDESTLIB=$(BINLIBDEST) 78 | 79 | # NOTE: all the paths are now relative to the prefix that is computed 80 | # at run time! 81 | 82 | # Standard path -- don't edit. 83 | # No leading colon since this is the first entry. 84 | # Empty since this is now just the runtime prefix. 85 | DESTPATH= 86 | 87 | # Site specific path components -- should begin with : if non-empty 88 | SITEPATH= 89 | 90 | # Standard path components for test modules 91 | TESTPATH= 92 | 93 | # Path components for machine- or system-dependent modules and shared libraries 94 | MACHDEPPATH=:plat-$(MACHDEP) 95 | EXTRAMACHDEPPATH= 96 | 97 | # Path component for the Tkinter-related modules 98 | # The TKPATH variable is always enabled, to save you the effort. 99 | TKPATH=:lib-tk 100 | 101 | # Path component for old modules. 102 | OLDPATH=:lib-old 103 | 104 | COREPYTHONPATH=$(DESTPATH)$(SITEPATH)$(TESTPATH)$(MACHDEPPATH)$(EXTRAMACHDEPPATH)$(TKPATH)$(OLDPATH) 105 | PYTHONPATH=$(COREPYTHONPATH) 106 | 107 | 108 | # The modules listed here can't be built as shared libraries for 109 | # various reasons; therefore they are listed here instead of in the 110 | # normal order. 111 | 112 | # This only contains the minimal set of modules required to run the 113 | # setup.py script in the root of the Python source tree. 114 | 115 | posix posixmodule.c # posix (UNIX) system calls 116 | errno errnomodule.c # posix (UNIX) errno values 117 | pwd pwdmodule.c # this is needed to find out the user's home dir 118 | # if $HOME is not set 119 | _sre _sre.c # Fredrik Lundh's new regular expressions 120 | _codecs _codecsmodule.c # access to the builtin codecs and codec registry 121 | 122 | # The zipimport module is always imported at startup. Having it as a 123 | # builtin module avoids some bootstrapping problems and reduces overhead. 124 | zipimport zipimport.c 125 | 126 | # The rest of the modules listed in this file are all commented out by 127 | # default. Usually they can be detected and built as dynamically 128 | # loaded modules by the new setup.py script added in Python 2.1. If 129 | # you're on a platform that doesn't support dynamic loading, want to 130 | # compile modules statically into the Python binary, or need to 131 | # specify some odd set of compiler switches, you can uncomment the 132 | # appropriate lines below. 133 | 134 | # ====================================================================== 135 | 136 | # The Python symtable module depends on .h files that setup.py doesn't track 137 | _symtable symtablemodule.c 138 | 139 | # The SGI specific GL module: 140 | 141 | GLHACK=-Dclear=__GLclear 142 | #gl glmodule.c cgensupport.c -I$(srcdir) $(GLHACK) -lgl -lX11 143 | 144 | # Pure module. Cannot be linked dynamically. 145 | # -DWITH_QUANTIFY, -DWITH_PURIFY, or -DWITH_ALL_PURE 146 | #WHICH_PURE_PRODUCTS=-DWITH_ALL_PURE 147 | #PURE_INCLS=-I/usr/local/include 148 | #PURE_STUBLIBS=-L/usr/local/lib -lpurify_stubs -lquantify_stubs 149 | #pure puremodule.c $(WHICH_PURE_PRODUCTS) $(PURE_INCLS) $(PURE_STUBLIBS) 150 | 151 | # Uncommenting the following line tells makesetup that all following 152 | # modules are to be built as shared libraries (see above for more 153 | # detail; also note that *static* reverses this effect): 154 | 155 | #*shared* 156 | 157 | # GNU readline. Unlike previous Python incarnations, GNU readline is 158 | # now incorporated in an optional module, configured in the Setup file 159 | # instead of by a configure script switch. You may have to insert a 160 | # -L option pointing to the directory where libreadline.* lives, 161 | # and you may have to change -ltermcap to -ltermlib or perhaps remove 162 | # it, depending on your system -- see the GNU readline instructions. 163 | # It's okay for this to be a shared library, too. 164 | 165 | readline readline.c -lreadline -lncurses 166 | 167 | 168 | # Modules that should always be present (non UNIX dependent): 169 | 170 | array arraymodule.c # array objects 171 | cmath cmathmodule.c _math.c # -lm # complex math library functions 172 | math mathmodule.c _math.c # -lm # math library functions, e.g. sin() 173 | _struct _struct.c # binary structure packing/unpacking 174 | time timemodule.c # -lm # time operations and variables 175 | operator operator.c # operator.add() and similar goodies 176 | _weakref _weakref.c # basic weak reference support 177 | #_testcapi _testcapimodule.c # Python C API test module 178 | _random _randommodule.c # Random number generator 179 | _collections _collectionsmodule.c # Container types 180 | itertools itertoolsmodule.c # Functions creating iterators for efficient looping 181 | strop stropmodule.c # String manipulations 182 | _functools _functoolsmodule.c # Tools for working with functions and callable objects 183 | _elementtree -I$(srcdir)/Modules/expat -DHAVE_EXPAT_CONFIG_H -DUSE_PYEXPAT_CAPI _elementtree.c # elementtree accelerator 184 | # Disabled because _pickle and similarly named modules are missing. 185 | # cPickle is already enabled. 186 | #_pickle _pickle.c # pickle accelerator 187 | datetime datetimemodule.c # date/time type 188 | _bisect _bisectmodule.c # Bisection algorithms 189 | 190 | #unicodedata unicodedata.c # static Unicode character database 191 | 192 | # access to ISO C locale support 193 | _locale _localemodule.c # -lintl 194 | 195 | 196 | # Modules with some UNIX dependencies -- on by default: 197 | # (If you have a really backward UNIX, select and socket may not be 198 | # supported...) 199 | 200 | fcntl fcntlmodule.c # fcntl(2) and ioctl(2) 201 | spwd spwdmodule.c # spwd(3) 202 | grp grpmodule.c # grp(3) 203 | select selectmodule.c # select(2); not on ancient System V 204 | 205 | # Memory-mapped files (also works on Win32). 206 | mmap mmapmodule.c 207 | 208 | # CSV file helper 209 | _csv _csv.c 210 | 211 | # Socket module helper for socket(2) 212 | _socket socketmodule.c 213 | 214 | # Socket module helper for SSL support; you must comment out the other 215 | # socket line above, and possibly edit the SSL variable: 216 | #not: SSL=/usr/local/ssl 217 | #not: _ssl _ssl.c \ 218 | #not: -DUSE_SSL -I$(SSL)/include -I$(SSL)/include/openssl \ 219 | #not: -L$(SSL)/lib -lssl -lcrypto 220 | 221 | # The crypt module is now disabled by default because it breaks builds 222 | # on many systems (where -lcrypt is needed), e.g. Linux (I believe). 223 | # 224 | # First, look at Setup.config; configure may have set this for you. 225 | 226 | crypt cryptmodule.c -lcrypt # crypt(3); needs -lcrypt on some systems 227 | 228 | 229 | # Some more UNIX dependent modules -- off by default, since these 230 | # are not supported by all UNIX systems: 231 | 232 | #nis nismodule.c -lnsl # Sun yellow pages -- not everywhere 233 | termios termios.c # Steen Lumholt's termios module 234 | resource resource.c # Jeremy Hylton's rlimit interface 235 | 236 | 237 | # Multimedia modules -- off by default. 238 | # These don't work for 64-bit platforms!!! 239 | # #993173 says audioop works on 64-bit platforms, though. 240 | # These represent audio samples or images as strings: 241 | 242 | audioop audioop.c # Operations on audio samples 243 | imageop imageop.c # Operations on images 244 | 245 | 246 | # Note that the _md5 and _sha modules are normally only built if the 247 | # system does not have the OpenSSL libs containing an optimized version. 248 | 249 | # The _md5 module implements the RSA Data Security, Inc. MD5 250 | # Message-Digest Algorithm, described in RFC 1321. The necessary files 251 | # md5.c and md5.h are included here. 252 | 253 | _md5 md5module.c md5.c 254 | 255 | 256 | # The _sha module implements the SHA checksum algorithms. 257 | # (NIST's Secure Hash Algorithms.) 258 | _sha shamodule.c 259 | _sha256 sha256module.c 260 | _sha512 sha512module.c 261 | 262 | 263 | # SGI IRIX specific modules -- off by default. 264 | 265 | # These module work on any SGI machine: 266 | 267 | # *** gl must be enabled higher up in this file *** 268 | #fm fmmodule.c $(GLHACK) -lfm -lgl # Font Manager 269 | #sgi sgimodule.c # sgi.nap() and a few more 270 | 271 | # This module requires the header file 272 | # /usr/people/4Dgifts/iristools/include/izoom.h: 273 | #imgfile imgfile.c -limage -lgutil -lgl -lm # Image Processing Utilities 274 | 275 | 276 | # These modules require the Multimedia Development Option (I think): 277 | 278 | #al almodule.c -laudio # Audio Library 279 | #cd cdmodule.c -lcdaudio -lds -lmediad # CD Audio Library 280 | #cl clmodule.c -lcl -lawareaudio # Compression Library 281 | #sv svmodule.c yuvconvert.c -lsvideo -lXext -lX11 # Starter Video 282 | 283 | 284 | # The FORMS library, by Mark Overmars, implements user interface 285 | # components such as dialogs and buttons using SGI's GL and FM 286 | # libraries. You must ftp the FORMS library separately from 287 | # ftp://ftp.cs.ruu.nl/pub/SGI/FORMS. It was tested with FORMS 2.2a. 288 | # NOTE: if you want to be able to use FORMS and curses simultaneously 289 | # (or both link them statically into the same binary), you must 290 | # compile all of FORMS with the cc option "-Dclear=__GLclear". 291 | 292 | # The FORMS variable must point to the FORMS subdirectory of the forms 293 | # toplevel directory: 294 | 295 | #FORMS=/ufs/guido/src/forms/FORMS 296 | #fl flmodule.c -I$(FORMS) $(GLHACK) $(FORMS)/libforms.a -lfm -lgl 297 | 298 | 299 | # SunOS specific modules -- off by default: 300 | 301 | #sunaudiodev sunaudiodev.c 302 | 303 | 304 | # A Linux specific module -- off by default; this may also work on 305 | # some *BSDs. 306 | 307 | #linuxaudiodev linuxaudiodev.c 308 | 309 | 310 | # George Neville-Neil's timing module: 311 | 312 | timing timingmodule.c 313 | 314 | 315 | # The _tkinter module. 316 | # 317 | # The command for _tkinter is long and site specific. Please 318 | # uncomment and/or edit those parts as indicated. If you don't have a 319 | # specific extension (e.g. Tix or BLT), leave the corresponding line 320 | # commented out. (Leave the trailing backslashes in! If you 321 | # experience strange errors, you may want to join all uncommented 322 | # lines and remove the backslashes -- the backslash interpretation is 323 | # done by the shell's "read" command and it may not be implemented on 324 | # every system. 325 | 326 | # *** Always uncomment this (leave the leading underscore in!): 327 | # _tkinter _tkinter.c tkappinit.c -DWITH_APPINIT \ 328 | # *** Uncomment and edit to reflect where your Tcl/Tk libraries are: 329 | # -L/usr/local/lib \ 330 | # *** Uncomment and edit to reflect where your Tcl/Tk headers are: 331 | # -I/usr/local/include \ 332 | # *** Uncomment and edit to reflect where your X11 header files are: 333 | # -I/usr/X11R6/include \ 334 | # *** Or uncomment this for Solaris: 335 | # -I/usr/openwin/include \ 336 | # *** Uncomment and edit for Tix extension only: 337 | # -DWITH_TIX -ltix8.1.8.2 \ 338 | # *** Uncomment and edit for BLT extension only: 339 | # -DWITH_BLT -I/usr/local/blt/blt8.0-unoff/include -lBLT8.0 \ 340 | # *** Uncomment and edit for PIL (TkImaging) extension only: 341 | # (See http://www.pythonware.com/products/pil/ for more info) 342 | # -DWITH_PIL -I../Extensions/Imaging/libImaging tkImaging.c \ 343 | # *** Uncomment and edit for TOGL extension only: 344 | # -DWITH_TOGL togl.c \ 345 | # *** Uncomment and edit to reflect your Tcl/Tk versions: 346 | # -ltk8.2 -ltcl8.2 \ 347 | # *** Uncomment and edit to reflect where your X11 libraries are: 348 | # -L/usr/X11R6/lib \ 349 | # *** Or uncomment this for Solaris: 350 | # -L/usr/openwin/lib \ 351 | # *** Uncomment these for TOGL extension only: 352 | # -lGL -lGLU -lXext -lXmu \ 353 | # *** Uncomment for AIX: 354 | # -lld \ 355 | # *** Always uncomment this; X11 libraries to link with: 356 | # -lX11 357 | 358 | # Lance Ellinghaus's syslog module 359 | syslog syslogmodule.c # syslog daemon interface 360 | 361 | 362 | # Curses support, requring the System V version of curses, often 363 | # provided by the ncurses library. e.g. on Linux, link with -lncurses 364 | # instead of -lcurses). 365 | # 366 | # First, look at Setup.config; configure may have set this for you. 367 | 368 | _curses _cursesmodule.c -lncurses 369 | # Wrapper for the panel library that's part of ncurses and SYSV curses. 370 | #_curses_panel _curses_panel.c -lpanel -lncurses 371 | 372 | 373 | # Generic (SunOS / SVR4) dynamic loading module. 374 | # This is not needed for dynamic loading of Python modules -- 375 | # it is a highly experimental and dangerous device for calling 376 | # *arbitrary* C functions in *arbitrary* shared libraries: 377 | 378 | dl dlmodule.c 379 | 380 | 381 | # Modules that provide persistent dictionary-like semantics. You will 382 | # probably want to arrange for at least one of them to be available on 383 | # your machine, though none are defined by default because of library 384 | # dependencies. The Python module anydbm.py provides an 385 | # implementation independent wrapper for these; dumbdbm.py provides 386 | # similar functionality (but slower of course) implemented in Python. 387 | 388 | # The standard Unix dbm module has been moved to Setup.config so that 389 | # it will be compiled as a shared library by default. Compiling it as 390 | # a built-in module causes conflicts with the pybsddb3 module since it 391 | # creates a static dependency on an out-of-date version of db.so. 392 | # 393 | # First, look at Setup.config; configure may have set this for you. 394 | 395 | #dbm dbmmodule.c # dbm(3) may require -lndbm or similar 396 | 397 | # Anthony Baxter's gdbm module. GNU dbm(3) will require -lgdbm: 398 | # 399 | # First, look at Setup.config; configure may have set this for you. 400 | 401 | #gdbm gdbmmodule.c -I/usr/local/include -L/usr/local/lib -lgdbm 402 | 403 | 404 | # Sleepycat Berkeley DB interface. 405 | # 406 | # This requires the Sleepycat DB code, see http://www.sleepycat.com/ 407 | # The earliest supported version of that library is 3.0, the latest 408 | # supported version is 4.0 (4.1 is specifically not supported, as that 409 | # changes the semantics of transactional databases). A list of available 410 | # releases can be found at 411 | # 412 | # http://www.sleepycat.com/update/index.html 413 | # 414 | # Edit the variables DB and DBLIBVERto point to the db top directory 415 | # and the subdirectory of PORT where you built it. 416 | #DB=/usr/local/BerkeleyDB.4.0 417 | #DBLIBVER=4.0 418 | #DBINC=$(DB)/include 419 | #DBLIB=$(DB)/lib 420 | #_bsddb _bsddb.c -I$(DBINC) -L$(DBLIB) -ldb-$(DBLIBVER) 421 | 422 | # Historical Berkeley DB 1.85 423 | # 424 | # This module is deprecated; the 1.85 version of the Berkeley DB library has 425 | # bugs that can cause data corruption. If you can, use later versions of the 426 | # library instead, available from . 427 | 428 | #DB=/depot/sundry/src/berkeley-db/db.1.85 429 | #DBPORT=$(DB)/PORT/irix.5.3 430 | #bsddb185 bsddbmodule.c -I$(DBPORT)/include -I$(DBPORT) $(DBPORT)/libdb.a 431 | 432 | 433 | 434 | # Helper module for various ascii-encoders 435 | binascii binascii.c 436 | 437 | # Fred Drake's interface to the Python parser 438 | parser parsermodule.c 439 | 440 | # cStringIO and cPickle 441 | cStringIO cStringIO.c 442 | cPickle cPickle.c 443 | 444 | 445 | # Lee Busby's SIGFPE modules. 446 | # The library to link fpectl with is platform specific. 447 | # Choose *one* of the options below for fpectl: 448 | 449 | # For SGI IRIX (tested on 5.3): 450 | #fpectl fpectlmodule.c -lfpe 451 | 452 | # For Solaris with SunPro compiler (tested on Solaris 2.5 with SunPro C 4.2): 453 | # (Without the compiler you don't have -lsunmath.) 454 | #fpectl fpectlmodule.c -R/opt/SUNWspro/lib -lsunmath -lm 455 | 456 | # For other systems: see instructions in fpectlmodule.c. 457 | fpectl fpectlmodule.c -lm 458 | 459 | # Test module for fpectl. No extra libraries needed. 460 | #fpetest fpetestmodule.c 461 | 462 | # Andrew Kuchling's zlib module. 463 | # This require zlib 1.1.3 (or later). 464 | # See http://www.gzip.org/zlib/ 465 | zlib zlibmodule.c -lz 466 | 467 | # Interface to the Expat XML parser 468 | # 469 | # Expat was written by James Clark and is now maintained by a group of 470 | # developers on SourceForge; see www.libexpat.org for more 471 | # information. The pyexpat module was written by Paul Prescod after a 472 | # prototype by Jack Jansen. Source of Expat 1.95.2 is included in 473 | # Modules/expat/. Usage of a system shared libexpat.so/expat.dll is 474 | # not advised. 475 | # 476 | # More information on Expat can be found at www.libexpat.org. 477 | # 478 | pyexpat expat/xmlparse.c expat/xmlrole.c expat/xmltok.c pyexpat.c -I$(srcdir)/Modules/expat -DHAVE_EXPAT_CONFIG_H -DUSE_PYEXPAT_CAPI 479 | 480 | 481 | # Hye-Shik Chang's CJKCodecs 482 | 483 | # multibytecodec is required for all the other CJK codec modules 484 | _multibytecodec cjkcodecs/multibytecodec.c 485 | 486 | _codecs_cn cjkcodecs/_codecs_cn.c 487 | _codecs_hk cjkcodecs/_codecs_hk.c 488 | _codecs_iso2022 cjkcodecs/_codecs_iso2022.c 489 | _codecs_jp cjkcodecs/_codecs_jp.c 490 | _codecs_kr cjkcodecs/_codecs_kr.c 491 | _codecs_tw cjkcodecs/_codecs_tw.c 492 | 493 | #_hashlib _hashopenssl.c 494 | 495 | # Example -- included for reference only: 496 | #xx xxmodule.c 497 | 498 | # Another example -- the 'xxsubtype' module shows C-level subtyping in action 499 | #xxsubtype xxsubtype.c 500 | 501 | # **** pts **** standard 502 | _multiprocessing _multiprocessing/multiprocessing.c _multiprocessing/socket_connection.c _multiprocessing/semaphore.c 503 | _sqlite3 _sqlite/cache.c _sqlite/connection.c _sqlite/cursor.c _sqlite/microprotocols.c _sqlite/module.c _sqlite/prepare_protocol.c _sqlite/row.c _sqlite/statement.c _sqlite/util.c -DSQLITE_OMIT_LOAD_EXTENSION -lsqlite3 504 | _heapq _heapqmodule.c 505 | _hotshot _hotshot.c 506 | _json _json.c 507 | _lsprof _lsprof.c rotatingtree.c 508 | bz2 bz2module.c -lbz2 509 | future_builtins future_builtins.c 510 | _io _io/_iomodule.c _io/bufferedio.c _io/bytesio.c _io/fileio.c _io/iobase.c _io/stringio.c _io/textio.c 511 | 512 | # **** pts **** nonstandard 513 | greenlet greenlet-0.3.1/greenlet.c 514 | 515 | # **** pts **** coroutine I/O: Syncless, gevent, Concurrence, gevent-MySQL 516 | # These will be enabled conditionally by build.sh in enable_module 517 | #not: _syncless_coio syncless/coio.c coio_src/coio_minihdns.c -lev -DCOIO_USE_CO_STACKLESS -DCOIO_USE_LIBEV -DCOIO_USE_MINIHDNS 518 | #_syncless_coio syncless/_syncless_coio.c syncless/coio_minihdns.c -levent_core -DCOIO_USE_CO_STACKLESS -DCOIO_USE_LIBEVENT2 -DCOIO_USE_MINIHDNS 519 | #_gevent_core gevent/_gevent_core.c -levent_core -levent_evhttp 520 | #_concurrence_event -levent_core concurrence/concurrence._event.c 521 | #_concurrence_io_io concurrence/concurrence.io._io.c concurrence/io_base.c 522 | #_concurrence_database_mysql_mysql concurrence/concurrence.database.mysql._mysql.c 523 | #_geventmysql_mysql geventmysql/geventmysql._mysql.c 524 | 525 | # **** pts **** extra modules for stacklessxx 526 | #_msgpack_msgpack msgpack/_msgpack_msgpack.c 527 | #_tokyocabinet_btree tokyocabinet/_tokyocabinet_btree.c -ltokyocabinet-staticpython -lpthread 528 | #_tokyocabinet_hash tokyocabinet/_tokyocabinet_hash.c -ltokyocabinet-staticpython -lpthread 529 | #_tokyocabinet_table tokyocabinet/_tokyocabinet_table.c -ltokyocabinet-staticpython -lpthread 530 | #_lmdb_cpython lmdb/_lmdb_cpython.c lmdb/lmdb_midl.c lmdb/lmdb_mdb.c -DHAVE_MEMALIGN -I$(srcdir)/lmdb.dir/lib -I$(srcdir)/lmdb.dir/lib/py-lmdb 531 | 532 | # **** pts **** crypto 533 | #_Crypto_Hash_MD2 pycrypto/_Crypto_Hash_MD2.c 534 | #_Crypto_Hash_MD4 pycrypto/_Crypto_Hash_MD4.c 535 | #_Crypto_Hash_SHA256 pycrypto/_Crypto_Hash_SHA256.c 536 | #_Crypto_Hash_RIPEMD160 pycrypto/_Crypto_Hash_RIPEMD160.c 537 | #_Crypto_Cipher_AES pycrypto/_Crypto_Cipher_AES.c 538 | #_Crypto_Cipher_ARC2 pycrypto/_Crypto_Cipher_ARC2.c 539 | #_Crypto_Cipher_Blowfish pycrypto/_Crypto_Cipher_Blowfish.c 540 | #_Crypto_Cipher_CAST pycrypto/_Crypto_Cipher_CAST.c 541 | #_Crypto_Cipher_DES pycrypto/_Crypto_Cipher_DES.c -I$(srcdir)/Modules/pycrypto/libtom 542 | #_Crypto_Cipher_DES3 pycrypto/_Crypto_Cipher_DES3.c -I$(srcdir)/Modules/pycrypto/libtom 543 | #_Crypto_Cipher_ARC4 pycrypto/_Crypto_Cipher_ARC4.c 544 | #_Crypto_Cipher_XOR pycrypto/_Crypto_Cipher_XOR.c 545 | #_Crypto_Util_strxor pycrypto/_Crypto_Util_strxor.c 546 | #_Crypto_Util_counter pycrypto/_Crypto_Util_counter.c 547 | #_aes_aes aloaes/rijndael-alg-fst.c aloaes/_aes_aes.c 548 | 549 | # **** pts **** with OpenSSL 550 | #_ssl _ssl.c -lssl-staticpython -lcrypto-staticpython 551 | -------------------------------------------------------------------------------- /Modules.Setup.3.2.static: -------------------------------------------------------------------------------- 1 | # -*- makefile -*- 2 | # The file Setup is used by the makesetup script to construct the files 3 | # Makefile and config.c, from Makefile.pre and config.c.in, 4 | # respectively. The file Setup itself is initially copied from 5 | # Setup.dist; once it exists it will not be overwritten, so you can edit 6 | # Setup to your heart's content. Note that Makefile.pre is created 7 | # from Makefile.pre.in by the toplevel configure script. 8 | 9 | # (VPATH notes: Setup and Makefile.pre are in the build directory, as 10 | # are Makefile and config.c; the *.in and *.dist files are in the source 11 | # directory.) 12 | 13 | # Each line in this file describes one or more optional modules. 14 | # Modules enabled here will not be compiled by the setup.py script, 15 | # so the file can be used to override setup.py's behavior. 16 | 17 | # Lines have the following structure: 18 | # 19 | # ... [ ...] [ ...] [ ...] 20 | # 21 | # is anything ending in .c (.C, .cc, .c++ are C++ files) 22 | # is anything starting with -I, -D, -U or -C 23 | # is anything ending in .a or beginning with -l or -L 24 | # is anything else but should be a valid Python 25 | # identifier (letters, digits, underscores, beginning with non-digit) 26 | # 27 | # (As the makesetup script changes, it may recognize some other 28 | # arguments as well, e.g. *.so and *.sl as libraries. See the big 29 | # case statement in the makesetup script.) 30 | # 31 | # Lines can also have the form 32 | # 33 | # = 34 | # 35 | # which defines a Make variable definition inserted into Makefile.in 36 | # 37 | # Finally, if a line contains just the word "*shared*" (without the 38 | # quotes but with the stars), then the following modules will not be 39 | # built statically. The build process works like this: 40 | # 41 | # 1. Build all modules that are declared as static in Modules/Setup, 42 | # combine them into libpythonxy.a, combine that into python. 43 | # 2. Build all modules that are listed as shared in Modules/Setup. 44 | # 3. Invoke setup.py. That builds all modules that 45 | # a) are not builtin, and 46 | # b) are not listed in Modules/Setup, and 47 | # c) can be build on the target 48 | # 49 | # Therefore, modules declared to be shared will not be 50 | # included in the config.c file, nor in the list of objects to be 51 | # added to the library archive, and their linker options won't be 52 | # added to the linker options. Rules to create their .o files and 53 | # their shared libraries will still be added to the Makefile, and 54 | # their names will be collected in the Make variable SHAREDMODS. This 55 | # is used to build modules as shared libraries. (They can be 56 | # installed using "make sharedinstall", which is implied by the 57 | # toplevel "make install" target.) (For compatibility, 58 | # *noconfig* has the same effect as *shared*.) 59 | # 60 | # In addition, *static* explicitly declares the following modules to 61 | # be static. Lines containing "*static*" and "*shared*" may thus 62 | # alternate throughout this file. 63 | 64 | # NOTE: As a standard policy, as many modules as can be supported by a 65 | # platform should be present. The distribution comes with all modules 66 | # enabled that are supported by most platforms and don't require you 67 | # to ftp sources from elsewhere. 68 | 69 | 70 | # Some special rules to define PYTHONPATH. 71 | # Edit the definitions below to indicate which options you are using. 72 | # Don't add any whitespace or comments! 73 | 74 | # Directories where library files get installed. 75 | # DESTLIB is for Python modules; MACHDESTLIB for shared libraries. 76 | DESTLIB=$(LIBDEST) 77 | MACHDESTLIB=$(BINLIBDEST) 78 | 79 | # NOTE: all the paths are now relative to the prefix that is computed 80 | # at run time! 81 | 82 | # Standard path -- don't edit. 83 | # No leading colon since this is the first entry. 84 | # Empty since this is now just the runtime prefix. 85 | DESTPATH= 86 | 87 | # Site specific path components -- should begin with : if non-empty 88 | SITEPATH= 89 | 90 | # Standard path components for test modules 91 | TESTPATH= 92 | 93 | # Path components for machine- or system-dependent modules and shared libraries 94 | MACHDEPPATH=:plat-$(MACHDEP) 95 | EXTRAMACHDEPPATH= 96 | 97 | COREPYTHONPATH=$(DESTPATH)$(SITEPATH)$(TESTPATH)$(MACHDEPPATH)$(EXTRAMACHDEPPATH) 98 | PYTHONPATH=$(COREPYTHONPATH) 99 | 100 | 101 | # The modules listed here can't be built as shared libraries for 102 | # various reasons; therefore they are listed here instead of in the 103 | # normal order. 104 | 105 | # This only contains the minimal set of modules required to run the 106 | # setup.py script in the root of the Python source tree. 107 | 108 | posix posixmodule.c # posix (UNIX) system calls 109 | errno errnomodule.c # posix (UNIX) errno values 110 | pwd pwdmodule.c # this is needed to find out the user's home dir 111 | # if $HOME is not set 112 | _sre _sre.c # Fredrik Lundh's new regular expressions 113 | _codecs _codecsmodule.c # access to the builtin codecs and codec registry 114 | _weakref _weakref.c # weak references 115 | _functools _functoolsmodule.c # Tools for working with functions and callable objects 116 | operator operator.c # operator.add() and similar goodies 117 | _collections _collectionsmodule.c # Container types 118 | itertools itertoolsmodule.c # Functions creating iterators for efficient looping 119 | 120 | # access to ISO C locale support 121 | _locale _localemodule.c # -lintl 122 | 123 | # Standard I/O baseline 124 | _io -I$(srcdir)/Modules/_io _io/_iomodule.c _io/iobase.c _io/fileio.c _io/bytesio.c _io/bufferedio.c _io/textio.c _io/stringio.c 125 | 126 | # The zipimport module is always imported at startup. Having it as a 127 | # builtin module avoids some bootstrapping problems and reduces overhead. 128 | zipimport zipimport.c 129 | 130 | # The rest of the modules listed in this file are all commented out by 131 | # default. Usually they can be detected and built as dynamically 132 | # loaded modules by the new setup.py script added in Python 2.1. If 133 | # you're on a platform that doesn't support dynamic loading, want to 134 | # compile modules statically into the Python binary, or need to 135 | # specify some odd set of compiler switches, you can uncomment the 136 | # appropriate lines below. 137 | 138 | # ====================================================================== 139 | 140 | # The Python symtable module depends on .h files that setup.py doesn't track 141 | _symtable symtablemodule.c 142 | 143 | # Uncommenting the following line tells makesetup that all following 144 | # modules are to be built as shared libraries (see above for more 145 | # detail; also note that *static* reverses this effect): 146 | 147 | #*shared* 148 | 149 | # GNU readline. Unlike previous Python incarnations, GNU readline is 150 | # now incorporated in an optional module, configured in the Setup file 151 | # instead of by a configure script switch. You may have to insert a 152 | # -L option pointing to the directory where libreadline.* lives, 153 | # and you may have to change -ltermcap to -ltermlib or perhaps remove 154 | # it, depending on your system -- see the GNU readline instructions. 155 | # It's okay for this to be a shared library, too. 156 | 157 | readline readline.c -lreadline -lncurses 158 | 159 | 160 | # Modules that should always be present (non UNIX dependent): 161 | 162 | array arraymodule.c # array objects 163 | cmath cmathmodule.c _math.c # -lm # complex math library functions 164 | math mathmodule.c _math.c # -lm # math library functions, e.g. sin() 165 | _struct _struct.c # binary structure packing/unpacking 166 | time timemodule.c _time.c # -lm # time operations and variables 167 | #_testcapi _testcapimodule.c # Python C API test module 168 | _random _randommodule.c # Random number generator 169 | atexit atexitmodule.c # Register functions to be run at interpreter-shutdown 170 | _elementtree -I$(srcdir)/Modules/expat -DHAVE_EXPAT_CONFIG_H -DUSE_PYEXPAT_CAPI _elementtree.c 171 | _pickle _pickle.c # pickle accelerator 172 | _datetime _datetimemodule.c # datetime accelerator 173 | _bisect _bisectmodule.c # Bisection algorithms 174 | _heapq _heapqmodule.c # Heap queue algorithm 175 | 176 | # !! other: _pickle 177 | 178 | # Not enabled in Python 2.7 either. 179 | #unicodedata unicodedata.c # static Unicode character database 180 | 181 | 182 | # Modules with some UNIX dependencies -- on by default: 183 | # (If you have a really backward UNIX, select and socket may not be 184 | # supported...) 185 | 186 | fcntl fcntlmodule.c # fcntl(2) and ioctl(2) 187 | spwd spwdmodule.c # spwd(3) 188 | grp grpmodule.c # grp(3) 189 | select selectmodule.c # select(2); not on ancient System V 190 | 191 | # Memory-mapped files (also works on Win32). 192 | mmap mmapmodule.c 193 | 194 | # CSV file helper 195 | _csv _csv.c 196 | 197 | # Socket module helper for socket(2) 198 | _socket socketmodule.c 199 | 200 | # Socket module helper for SSL support; you must comment out the other 201 | # socket line above, and possibly edit the SSL variable: 202 | #not: SSL=/usr/local/ssl 203 | #not: _ssl _ssl.c \ 204 | #not: -DUSE_SSL -I$(SSL)/include -I$(SSL)/include/openssl \ 205 | #not: -L$(SSL)/lib -lssl -lcrypto 206 | 207 | # The crypt module is now disabled by default because it breaks builds 208 | # on many systems (where -lcrypt is needed), e.g. Linux (I believe). 209 | # 210 | # First, look at Setup.config; configure may have set this for you. 211 | 212 | crypt cryptmodule.c -lcrypt # crypt(3); needs -lcrypt on some systems 213 | 214 | 215 | # Some more UNIX dependent modules -- off by default, since these 216 | # are not supported by all UNIX systems: 217 | 218 | #nis nismodule.c -lnsl # Sun yellow pages -- not everywhere 219 | termios termios.c # Steen Lumholt's termios module 220 | resource resource.c # Jeremy Hylton's rlimit interface 221 | 222 | _posixsubprocess _posixsubprocess.c # POSIX subprocess module helper 223 | 224 | # Multimedia modules -- off by default. 225 | # These don't work for 64-bit platforms!!! 226 | # #993173 says audioop works on 64-bit platforms, though. 227 | # These represent audio samples or images as strings: 228 | 229 | audioop audioop.c # Operations on audio samples 230 | 231 | 232 | # Note that the _md5 and _sha modules are normally only built if the 233 | # system does not have the OpenSSL libs containing an optimized version. 234 | 235 | # The _md5 module implements the RSA Data Security, Inc. MD5 236 | # Message-Digest Algorithm, described in RFC 1321. The necessary files 237 | # md5.c and md5.h are included here. 238 | 239 | _md5 md5module.c 240 | 241 | 242 | # The _sha module implements the SHA checksum algorithms. 243 | # (NIST's Secure Hash Algorithms.) 244 | _sha1 sha1module.c 245 | _sha256 sha256module.c 246 | _sha512 sha512module.c 247 | 248 | 249 | # The _tkinter module. 250 | # 251 | # The command for _tkinter is long and site specific. Please 252 | # uncomment and/or edit those parts as indicated. If you don't have a 253 | # specific extension (e.g. Tix or BLT), leave the corresponding line 254 | # commented out. (Leave the trailing backslashes in! If you 255 | # experience strange errors, you may want to join all uncommented 256 | # lines and remove the backslashes -- the backslash interpretation is 257 | # done by the shell's "read" command and it may not be implemented on 258 | # every system. 259 | 260 | # *** Always uncomment this (leave the leading underscore in!): 261 | # _tkinter _tkinter.c tkappinit.c -DWITH_APPINIT \ 262 | # *** Uncomment and edit to reflect where your Tcl/Tk libraries are: 263 | # -L/usr/local/lib \ 264 | # *** Uncomment and edit to reflect where your Tcl/Tk headers are: 265 | # -I/usr/local/include \ 266 | # *** Uncomment and edit to reflect where your X11 header files are: 267 | # -I/usr/X11R6/include \ 268 | # *** Or uncomment this for Solaris: 269 | # -I/usr/openwin/include \ 270 | # *** Uncomment and edit for Tix extension only: 271 | # -DWITH_TIX -ltix8.1.8.2 \ 272 | # *** Uncomment and edit for BLT extension only: 273 | # -DWITH_BLT -I/usr/local/blt/blt8.0-unoff/include -lBLT8.0 \ 274 | # *** Uncomment and edit for PIL (TkImaging) extension only: 275 | # (See http://www.pythonware.com/products/pil/ for more info) 276 | # -DWITH_PIL -I../Extensions/Imaging/libImaging tkImaging.c \ 277 | # *** Uncomment and edit for TOGL extension only: 278 | # -DWITH_TOGL togl.c \ 279 | # *** Uncomment and edit to reflect your Tcl/Tk versions: 280 | # -ltk8.2 -ltcl8.2 \ 281 | # *** Uncomment and edit to reflect where your X11 libraries are: 282 | # -L/usr/X11R6/lib \ 283 | # *** Or uncomment this for Solaris: 284 | # -L/usr/openwin/lib \ 285 | # *** Uncomment these for TOGL extension only: 286 | # -lGL -lGLU -lXext -lXmu \ 287 | # *** Uncomment for AIX: 288 | # -lld \ 289 | # *** Always uncomment this; X11 libraries to link with: 290 | # -lX11 291 | 292 | # Lance Ellinghaus's syslog module 293 | syslog syslogmodule.c # syslog daemon interface 294 | 295 | 296 | # Curses support, requring the System V version of curses, often 297 | # provided by the ncurses library. e.g. on Linux, link with -lncurses 298 | # instead of -lcurses). 299 | # 300 | # First, look at Setup.config; configure may have set this for you. 301 | 302 | _curses _cursesmodule.c -lncurses 303 | # Wrapper for the panel library that's part of ncurses and SYSV curses. 304 | #_curses_panel _curses_panel.c -lpanel -lncurses 305 | 306 | 307 | # Modules that provide persistent dictionary-like semantics. You will 308 | # probably want to arrange for at least one of them to be available on 309 | # your machine, though none are defined by default because of library 310 | # dependencies. The Python module dbm/__init__.py provides an 311 | # implementation independent wrapper for these; dbm/dumb.py provides 312 | # similar functionality (but slower of course) implemented in Python. 313 | 314 | # The standard Unix dbm module has been moved to Setup.config so that 315 | # it will be compiled as a shared library by default. Compiling it as 316 | # a built-in module causes conflicts with the pybsddb3 module since it 317 | # creates a static dependency on an out-of-date version of db.so. 318 | # 319 | # First, look at Setup.config; configure may have set this for you. 320 | 321 | #_dbm _dbmmodule.c # dbm(3) may require -lndbm or similar 322 | 323 | # Anthony Baxter's gdbm module. GNU dbm(3) will require -lgdbm: 324 | # 325 | # First, look at Setup.config; configure may have set this for you. 326 | 327 | #_gdbm _gdbmmodule.c -I/usr/local/include -L/usr/local/lib -lgdbm 328 | 329 | 330 | # Helper module for various ascii-encoders 331 | binascii binascii.c 332 | 333 | # Fred Drake's interface to the Python parser 334 | parser parsermodule.c 335 | 336 | 337 | # Lee Busby's SIGFPE modules. 338 | # The library to link fpectl with is platform specific. 339 | # Choose *one* of the options below for fpectl: 340 | 341 | # For SGI IRIX (tested on 5.3): 342 | #fpectl fpectlmodule.c -lfpe 343 | 344 | # For Solaris with SunPro compiler (tested on Solaris 2.5 with SunPro C 4.2): 345 | # (Without the compiler you don't have -lsunmath.) 346 | #fpectl fpectlmodule.c -R/opt/SUNWspro/lib -lsunmath -lm 347 | 348 | # For other systems: see instructions in fpectlmodule.c. 349 | fpectl fpectlmodule.c 350 | 351 | # Test module for fpectl. No extra libraries needed. 352 | #fpetest fpetestmodule.c 353 | 354 | # Andrew Kuchling's zlib module. 355 | # This require zlib 1.1.3 (or later). 356 | # See http://www.gzip.org/zlib/ 357 | zlib zlibmodule.c -lz 358 | 359 | # Interface to the Expat XML parser 360 | # 361 | # Expat was written by James Clark and is now maintained by a group of 362 | # developers on SourceForge; see www.libexpat.org for more 363 | # information. The pyexpat module was written by Paul Prescod after a 364 | # prototype by Jack Jansen. Source of Expat 1.95.2 is included in 365 | # Modules/expat/. Usage of a system shared libexpat.so/expat.dll is 366 | # not advised. 367 | # 368 | # More information on Expat can be found at www.libexpat.org. 369 | # 370 | pyexpat expat/xmlparse.c expat/xmlrole.c expat/xmltok.c pyexpat.c -I$(srcdir)/Modules/expat -DHAVE_EXPAT_CONFIG_H -DUSE_PYEXPAT_CAPI 371 | 372 | # Hye-Shik Chang's CJKCodecs 373 | 374 | # multibytecodec is required for all the other CJK codec modules 375 | _multibytecodec cjkcodecs/multibytecodec.c 376 | 377 | _codecs_cn cjkcodecs/_codecs_cn.c 378 | _codecs_hk cjkcodecs/_codecs_hk.c 379 | _codecs_iso2022 cjkcodecs/_codecs_iso2022.c 380 | _codecs_jp cjkcodecs/_codecs_jp.c 381 | _codecs_kr cjkcodecs/_codecs_kr.c 382 | _codecs_tw cjkcodecs/_codecs_tw.c 383 | 384 | # Example -- included for reference only: 385 | #xx xxmodule.c 386 | 387 | # Another example -- the 'xxsubtype' module shows C-level subtyping in action 388 | #xxsubtype xxsubtype.c 389 | 390 | # **** pts **** standard 391 | _multiprocessing _multiprocessing/multiprocessing.c _multiprocessing/socket_connection.c _multiprocessing/semaphore.c 392 | _sqlite3 _sqlite/cache.c _sqlite/connection.c _sqlite/cursor.c _sqlite/microprotocols.c _sqlite/module.c _sqlite/prepare_protocol.c _sqlite/row.c _sqlite/statement.c _sqlite/util.c -DSQLITE_OMIT_LOAD_EXTENSION -lsqlite3 393 | _json _json.c 394 | _lsprof _lsprof.c rotatingtree.c 395 | bz2 bz2module.c -lbz2 396 | 397 | # **** pts **** nonstandard 398 | greenlet greenlet-0.3.1/greenlet.c 399 | 400 | # These are also present in Modules/Setup.config, generated by configure. 401 | # We don't list them here. 402 | #not: _thread _threadmodule.c 403 | #not: signal signalmodule.c 404 | 405 | # TODO(pts): Maybe use this on the Mac OS X? Would it link? 406 | #not: _scproxy _scproxy.c 407 | 408 | # **** pts **** with OpenSSL 409 | #_ssl _ssl.c -lssl-staticpython -lcrypto-staticpython 410 | #_hashlib _hashopenssl.c -lssl-staticpython -lcrypto-staticpython 411 | -------------------------------------------------------------------------------- /Modules.Setup.mu.2.7.static: -------------------------------------------------------------------------------- 1 | # -*- makefile -*- 2 | # The file Setup is used by the makesetup script to construct the files 3 | # Makefile and config.c, from Makefile.pre and config.c.in, 4 | # respectively. The file Setup itself is initially copied from 5 | # Setup.dist; once it exists it will not be overwritten, so you can edit 6 | # Setup to your heart's content. Note that Makefile.pre is created 7 | # from Makefile.pre.in by the toplevel configure script. 8 | 9 | # (VPATH notes: Setup and Makefile.pre are in the build directory, as 10 | # are Makefile and config.c; the *.in and *.dist files are in the source 11 | # directory.) 12 | 13 | # Each line in this file describes one or more optional modules. 14 | # Modules enabled here will not be compiled by the setup.py script, 15 | # so the file can be used to override setup.py's behavior. 16 | 17 | # Lines have the following structure: 18 | # 19 | # ... [ ...] [ ...] [ ...] 20 | # 21 | # is anything ending in .c (.C, .cc, .c++ are C++ files) 22 | # is anything starting with -I, -D, -U or -C 23 | # is anything ending in .a or beginning with -l or -L 24 | # is anything else but should be a valid Python 25 | # identifier (letters, digits, underscores, beginning with non-digit) 26 | # 27 | # (As the makesetup script changes, it may recognize some other 28 | # arguments as well, e.g. *.so and *.sl as libraries. See the big 29 | # case statement in the makesetup script.) 30 | # 31 | # Lines can also have the form 32 | # 33 | # = 34 | # 35 | # which defines a Make variable definition inserted into Makefile.in 36 | # 37 | # Finally, if a line contains just the word "*shared*" (without the 38 | # quotes but with the stars), then the following modules will not be 39 | # built statically. The build process works like this: 40 | # 41 | # 1. Build all modules that are declared as static in Modules/Setup, 42 | # combine them into libpythonxy.a, combine that into python. 43 | # 2. Build all modules that are listed as shared in Modules/Setup. 44 | # 3. Invoke setup.py. That builds all modules that 45 | # a) are not builtin, and 46 | # b) are not listed in Modules/Setup, and 47 | # c) can be build on the target 48 | # 49 | # Therefore, modules declared to be shared will not be 50 | # included in the config.c file, nor in the list of objects to be 51 | # added to the library archive, and their linker options won't be 52 | # added to the linker options. Rules to create their .o files and 53 | # their shared libraries will still be added to the Makefile, and 54 | # their names will be collected in the Make variable SHAREDMODS. This 55 | # is used to build modules as shared libraries. (They can be 56 | # installed using "make sharedinstall", which is implied by the 57 | # toplevel "make install" target.) (For compatibility, 58 | # *noconfig* has the same effect as *shared*.) 59 | # 60 | # In addition, *static* explicitly declares the following modules to 61 | # be static. Lines containing "*static*" and "*shared*" may thus 62 | # alternate throughout this file. 63 | 64 | # NOTE: As a standard policy, as many modules as can be supported by a 65 | # platform should be present. The distribution comes with all modules 66 | # enabled that are supported by most platforms and don't require you 67 | # to ftp sources from elsewhere. 68 | 69 | 70 | # Some special rules to define PYTHONPATH. 71 | # Edit the definitions below to indicate which options you are using. 72 | # Don't add any whitespace or comments! 73 | 74 | # Directories where library files get installed. 75 | # DESTLIB is for Python modules; MACHDESTLIB for shared libraries. 76 | DESTLIB=$(LIBDEST) 77 | MACHDESTLIB=$(BINLIBDEST) 78 | 79 | # NOTE: all the paths are now relative to the prefix that is computed 80 | # at run time! 81 | 82 | # Standard path -- don't edit. 83 | # No leading colon since this is the first entry. 84 | # Empty since this is now just the runtime prefix. 85 | DESTPATH= 86 | 87 | # Site specific path components -- should begin with : if non-empty 88 | SITEPATH= 89 | 90 | # Standard path components for test modules 91 | TESTPATH= 92 | 93 | # Path components for machine- or system-dependent modules and shared libraries 94 | MACHDEPPATH=:plat-$(MACHDEP) 95 | EXTRAMACHDEPPATH= 96 | 97 | # Path component for the Tkinter-related modules 98 | # The TKPATH variable is always enabled, to save you the effort. 99 | TKPATH=:lib-tk 100 | 101 | # Path component for old modules. 102 | OLDPATH=:lib-old 103 | 104 | COREPYTHONPATH=$(DESTPATH)$(SITEPATH)$(TESTPATH)$(MACHDEPPATH)$(EXTRAMACHDEPPATH)$(TKPATH)$(OLDPATH) 105 | PYTHONPATH=$(COREPYTHONPATH) 106 | 107 | 108 | # The modules listed here can't be built as shared libraries for 109 | # various reasons; therefore they are listed here instead of in the 110 | # normal order. 111 | 112 | # This only contains the minimal set of modules required to run the 113 | # setup.py script in the root of the Python source tree. 114 | 115 | posix posixmodule.c # posix (UNIX) system calls 116 | errno errnomodule.c # posix (UNIX) errno values 117 | pwd pwdmodule.c # this is needed to find out the user's home dir 118 | # if $HOME is not set 119 | _sre _sre.c # Fredrik Lundh's new regular expressions 120 | _codecs _codecsmodule.c # access to the builtin codecs and codec registry 121 | 122 | # The zipimport module is always imported at startup. Having it as a 123 | # builtin module avoids some bootstrapping problems and reduces overhead. 124 | zipimport zipimport.c 125 | 126 | # The rest of the modules listed in this file are all commented out by 127 | # default. Usually they can be detected and built as dynamically 128 | # loaded modules by the new setup.py script added in Python 2.1. If 129 | # you're on a platform that doesn't support dynamic loading, want to 130 | # compile modules statically into the Python binary, or need to 131 | # specify some odd set of compiler switches, you can uncomment the 132 | # appropriate lines below. 133 | 134 | # ====================================================================== 135 | 136 | # The Python symtable module depends on .h files that setup.py doesn't track 137 | #_symtable symtablemodule.c 138 | 139 | # The SGI specific GL module: 140 | 141 | GLHACK=-Dclear=__GLclear 142 | #gl glmodule.c cgensupport.c -I$(srcdir) $(GLHACK) -lgl -lX11 143 | 144 | # Pure module. Cannot be linked dynamically. 145 | # -DWITH_QUANTIFY, -DWITH_PURIFY, or -DWITH_ALL_PURE 146 | #WHICH_PURE_PRODUCTS=-DWITH_ALL_PURE 147 | #PURE_INCLS=-I/usr/local/include 148 | #PURE_STUBLIBS=-L/usr/local/lib -lpurify_stubs -lquantify_stubs 149 | #pure puremodule.c $(WHICH_PURE_PRODUCTS) $(PURE_INCLS) $(PURE_STUBLIBS) 150 | 151 | # Uncommenting the following line tells makesetup that all following 152 | # modules are to be built as shared libraries (see above for more 153 | # detail; also note that *static* reverses this effect): 154 | 155 | #*shared* 156 | 157 | # GNU readline. Unlike previous Python incarnations, GNU readline is 158 | # now incorporated in an optional module, configured in the Setup file 159 | # instead of by a configure script switch. You may have to insert a 160 | # -L option pointing to the directory where libreadline.* lives, 161 | # and you may have to change -ltermcap to -ltermlib or perhaps remove 162 | # it, depending on your system -- see the GNU readline instructions. 163 | # It's okay for this to be a shared library, too. 164 | 165 | #readline readline.c -lreadline -lncurses 166 | 167 | 168 | # Modules that should always be present (non UNIX dependent): 169 | 170 | #array arraymodule.c # array objects 171 | #cmath cmathmodule.c _math.c # -lm # complex math library functions 172 | #math mathmodule.c _math.c # -lm # math library functions, e.g. sin() 173 | _struct _struct.c # binary structure packing/unpacking 174 | time timemodule.c # -lm # time operations and variables 175 | #operator operator.c # operator.add() and similar goodies 176 | # Needed because invocation imports site.py imports os.py imports UserDict.py imports _abcoll.py imports abc.py imports _weakrefset.py imports _weakref. 177 | _weakref _weakref.c # basic weak reference support 178 | #_testcapi _testcapimodule.c # Python C API test module 179 | #_random _randommodule.c # Random number generator 180 | #_collections _collectionsmodule.c # Container types 181 | #itertools itertoolsmodule.c # Functions creating iterators for efficient looping 182 | #strop stropmodule.c # String manipulations 183 | #_functools _functoolsmodule.c # Tools for working with functions and callable objects 184 | #_elementtree -I$(srcdir)/Modules/expat -DHAVE_EXPAT_CONFIG_H -DUSE_PYEXPAT_CAPI _elementtree.c # elementtree accelerator 185 | # Disabled because _pickle and similarly named modules are missing. 186 | # cPickle is already enabled. 187 | #_pickle _pickle.c # pickle accelerator 188 | #datetime datetimemodule.c # date/time type 189 | #_bisect _bisectmodule.c # Bisection algorithms 190 | 191 | #unicodedata unicodedata.c # static Unicode character database 192 | 193 | # access to ISO C locale support 194 | #_locale _localemodule.c # -lintl 195 | 196 | 197 | # Modules with some UNIX dependencies -- on by default: 198 | # (If you have a really backward UNIX, select and socket may not be 199 | # supported...) 200 | 201 | #fcntl fcntlmodule.c # fcntl(2) and ioctl(2) 202 | #spwd spwdmodule.c # spwd(3) 203 | #grp grpmodule.c # grp(3) 204 | #select selectmodule.c # select(2); not on ancient System V 205 | 206 | # Memory-mapped files (also works on Win32). 207 | #mmap mmapmodule.c 208 | 209 | # CSV file helper 210 | #_csv _csv.c 211 | 212 | # Socket module helper for socket(2) 213 | #_socket socketmodule.c 214 | 215 | # Socket module helper for SSL support; you must comment out the other 216 | # socket line above, and possibly edit the SSL variable: 217 | #not: SSL=/usr/local/ssl 218 | #not: _ssl _ssl.c \ 219 | #not: -DUSE_SSL -I$(SSL)/include -I$(SSL)/include/openssl \ 220 | #not: -L$(SSL)/lib -lssl -lcrypto 221 | 222 | # The crypt module is now disabled by default because it breaks builds 223 | # on many systems (where -lcrypt is needed), e.g. Linux (I believe). 224 | # 225 | # First, look at Setup.config; configure may have set this for you. 226 | 227 | #crypt cryptmodule.c -lcrypt # crypt(3); needs -lcrypt on some systems 228 | 229 | 230 | # Some more UNIX dependent modules -- off by default, since these 231 | # are not supported by all UNIX systems: 232 | 233 | #nis nismodule.c -lnsl # Sun yellow pages -- not everywhere 234 | #termios termios.c # Steen Lumholt's termios module 235 | #resource resource.c # Jeremy Hylton's rlimit interface 236 | 237 | 238 | # Multimedia modules -- off by default. 239 | # These don't work for 64-bit platforms!!! 240 | # #993173 says audioop works on 64-bit platforms, though. 241 | # These represent audio samples or images as strings: 242 | 243 | #audioop audioop.c # Operations on audio samples 244 | #imageop imageop.c # Operations on images 245 | 246 | 247 | # Note that the _md5 and _sha modules are normally only built if the 248 | # system does not have the OpenSSL libs containing an optimized version. 249 | 250 | # The _md5 module implements the RSA Data Security, Inc. MD5 251 | # Message-Digest Algorithm, described in RFC 1321. The necessary files 252 | # md5.c and md5.h are included here. 253 | 254 | #_md5 md5module.c md5.c 255 | 256 | 257 | # The _sha module implements the SHA checksum algorithms. 258 | # (NIST's Secure Hash Algorithms.) 259 | #_sha shamodule.c 260 | #_sha256 sha256module.c 261 | #_sha512 sha512module.c 262 | 263 | 264 | # SGI IRIX specific modules -- off by default. 265 | 266 | # These module work on any SGI machine: 267 | 268 | # *** gl must be enabled higher up in this file *** 269 | #fm fmmodule.c $(GLHACK) -lfm -lgl # Font Manager 270 | #sgi sgimodule.c # sgi.nap() and a few more 271 | 272 | # This module requires the header file 273 | # /usr/people/4Dgifts/iristools/include/izoom.h: 274 | #imgfile imgfile.c -limage -lgutil -lgl -lm # Image Processing Utilities 275 | 276 | 277 | # These modules require the Multimedia Development Option (I think): 278 | 279 | #al almodule.c -laudio # Audio Library 280 | #cd cdmodule.c -lcdaudio -lds -lmediad # CD Audio Library 281 | #cl clmodule.c -lcl -lawareaudio # Compression Library 282 | #sv svmodule.c yuvconvert.c -lsvideo -lXext -lX11 # Starter Video 283 | 284 | 285 | # The FORMS library, by Mark Overmars, implements user interface 286 | # components such as dialogs and buttons using SGI's GL and FM 287 | # libraries. You must ftp the FORMS library separately from 288 | # ftp://ftp.cs.ruu.nl/pub/SGI/FORMS. It was tested with FORMS 2.2a. 289 | # NOTE: if you want to be able to use FORMS and curses simultaneously 290 | # (or both link them statically into the same binary), you must 291 | # compile all of FORMS with the cc option "-Dclear=__GLclear". 292 | 293 | # The FORMS variable must point to the FORMS subdirectory of the forms 294 | # toplevel directory: 295 | 296 | #FORMS=/ufs/guido/src/forms/FORMS 297 | #fl flmodule.c -I$(FORMS) $(GLHACK) $(FORMS)/libforms.a -lfm -lgl 298 | 299 | 300 | # SunOS specific modules -- off by default: 301 | 302 | #sunaudiodev sunaudiodev.c 303 | 304 | 305 | # A Linux specific module -- off by default; this may also work on 306 | # some *BSDs. 307 | 308 | #linuxaudiodev linuxaudiodev.c 309 | 310 | 311 | # George Neville-Neil's timing module: 312 | 313 | #timing timingmodule.c 314 | 315 | 316 | # The _tkinter module. 317 | # 318 | # The command for _tkinter is long and site specific. Please 319 | # uncomment and/or edit those parts as indicated. If you don't have a 320 | # specific extension (e.g. Tix or BLT), leave the corresponding line 321 | # commented out. (Leave the trailing backslashes in! If you 322 | # experience strange errors, you may want to join all uncommented 323 | # lines and remove the backslashes -- the backslash interpretation is 324 | # done by the shell's "read" command and it may not be implemented on 325 | # every system. 326 | 327 | # *** Always uncomment this (leave the leading underscore in!): 328 | # _tkinter _tkinter.c tkappinit.c -DWITH_APPINIT \ 329 | # *** Uncomment and edit to reflect where your Tcl/Tk libraries are: 330 | # -L/usr/local/lib \ 331 | # *** Uncomment and edit to reflect where your Tcl/Tk headers are: 332 | # -I/usr/local/include \ 333 | # *** Uncomment and edit to reflect where your X11 header files are: 334 | # -I/usr/X11R6/include \ 335 | # *** Or uncomment this for Solaris: 336 | # -I/usr/openwin/include \ 337 | # *** Uncomment and edit for Tix extension only: 338 | # -DWITH_TIX -ltix8.1.8.2 \ 339 | # *** Uncomment and edit for BLT extension only: 340 | # -DWITH_BLT -I/usr/local/blt/blt8.0-unoff/include -lBLT8.0 \ 341 | # *** Uncomment and edit for PIL (TkImaging) extension only: 342 | # (See http://www.pythonware.com/products/pil/ for more info) 343 | # -DWITH_PIL -I../Extensions/Imaging/libImaging tkImaging.c \ 344 | # *** Uncomment and edit for TOGL extension only: 345 | # -DWITH_TOGL togl.c \ 346 | # *** Uncomment and edit to reflect your Tcl/Tk versions: 347 | # -ltk8.2 -ltcl8.2 \ 348 | # *** Uncomment and edit to reflect where your X11 libraries are: 349 | # -L/usr/X11R6/lib \ 350 | # *** Or uncomment this for Solaris: 351 | # -L/usr/openwin/lib \ 352 | # *** Uncomment these for TOGL extension only: 353 | # -lGL -lGLU -lXext -lXmu \ 354 | # *** Uncomment for AIX: 355 | # -lld \ 356 | # *** Always uncomment this; X11 libraries to link with: 357 | # -lX11 358 | 359 | # Lance Ellinghaus's syslog module 360 | #syslog syslogmodule.c # syslog daemon interface 361 | 362 | 363 | # Curses support, requring the System V version of curses, often 364 | # provided by the ncurses library. e.g. on Linux, link with -lncurses 365 | # instead of -lcurses). 366 | # 367 | # First, look at Setup.config; configure may have set this for you. 368 | 369 | #_curses _cursesmodule.c -lncurses 370 | # Wrapper for the panel library that's part of ncurses and SYSV curses. 371 | #_curses_panel _curses_panel.c -lpanel -lncurses 372 | 373 | 374 | # Generic (SunOS / SVR4) dynamic loading module. 375 | # This is not needed for dynamic loading of Python modules -- 376 | # it is a highly experimental and dangerous device for calling 377 | # *arbitrary* C functions in *arbitrary* shared libraries: 378 | 379 | #dl dlmodule.c 380 | 381 | 382 | # Modules that provide persistent dictionary-like semantics. You will 383 | # probably want to arrange for at least one of them to be available on 384 | # your machine, though none are defined by default because of library 385 | # dependencies. The Python module anydbm.py provides an 386 | # implementation independent wrapper for these; dumbdbm.py provides 387 | # similar functionality (but slower of course) implemented in Python. 388 | 389 | # The standard Unix dbm module has been moved to Setup.config so that 390 | # it will be compiled as a shared library by default. Compiling it as 391 | # a built-in module causes conflicts with the pybsddb3 module since it 392 | # creates a static dependency on an out-of-date version of db.so. 393 | # 394 | # First, look at Setup.config; configure may have set this for you. 395 | 396 | #dbm dbmmodule.c # dbm(3) may require -lndbm or similar 397 | 398 | # Anthony Baxter's gdbm module. GNU dbm(3) will require -lgdbm: 399 | # 400 | # First, look at Setup.config; configure may have set this for you. 401 | 402 | #gdbm gdbmmodule.c -I/usr/local/include -L/usr/local/lib -lgdbm 403 | 404 | 405 | # Sleepycat Berkeley DB interface. 406 | # 407 | # This requires the Sleepycat DB code, see http://www.sleepycat.com/ 408 | # The earliest supported version of that library is 3.0, the latest 409 | # supported version is 4.0 (4.1 is specifically not supported, as that 410 | # changes the semantics of transactional databases). A list of available 411 | # releases can be found at 412 | # 413 | # http://www.sleepycat.com/update/index.html 414 | # 415 | # Edit the variables DB and DBLIBVERto point to the db top directory 416 | # and the subdirectory of PORT where you built it. 417 | #DB=/usr/local/BerkeleyDB.4.0 418 | #DBLIBVER=4.0 419 | #DBINC=$(DB)/include 420 | #DBLIB=$(DB)/lib 421 | #_bsddb _bsddb.c -I$(DBINC) -L$(DBLIB) -ldb-$(DBLIBVER) 422 | 423 | # Historical Berkeley DB 1.85 424 | # 425 | # This module is deprecated; the 1.85 version of the Berkeley DB library has 426 | # bugs that can cause data corruption. If you can, use later versions of the 427 | # library instead, available from . 428 | 429 | #DB=/depot/sundry/src/berkeley-db/db.1.85 430 | #DBPORT=$(DB)/PORT/irix.5.3 431 | #bsddb185 bsddbmodule.c -I$(DBPORT)/include -I$(DBPORT) $(DBPORT)/libdb.a 432 | 433 | 434 | 435 | # Helper module for various ascii-encoders 436 | # Needed for 'foo'.encode('hex') 437 | binascii binascii.c 438 | 439 | # Fred Drake's interface to the Python parser 440 | #parser parsermodule.c 441 | 442 | # cStringIO and cPickle 443 | #cStringIO cStringIO.c 444 | #cPickle cPickle.c 445 | 446 | 447 | # Lee Busby's SIGFPE modules. 448 | # The library to link fpectl with is platform specific. 449 | # Choose *one* of the options below for fpectl: 450 | 451 | # For SGI IRIX (tested on 5.3): 452 | #fpectl fpectlmodule.c -lfpe 453 | 454 | # For Solaris with SunPro compiler (tested on Solaris 2.5 with SunPro C 4.2): 455 | # (Without the compiler you don't have -lsunmath.) 456 | #fpectl fpectlmodule.c -R/opt/SUNWspro/lib -lsunmath -lm 457 | 458 | # For other systems: see instructions in fpectlmodule.c. 459 | #fpectl fpectlmodule.c -lm 460 | 461 | # Test module for fpectl. No extra libraries needed. 462 | #fpetest fpetestmodule.c 463 | 464 | # Andrew Kuchling's zlib module. 465 | # This require zlib 1.1.3 (or later). 466 | # See http://www.gzip.org/zlib/ 467 | zlib zlibmodule.c -lz 468 | 469 | # Interface to the Expat XML parser 470 | # 471 | # Expat was written by James Clark and is now maintained by a group of 472 | # developers on SourceForge; see www.libexpat.org for more 473 | # information. The pyexpat module was written by Paul Prescod after a 474 | # prototype by Jack Jansen. Source of Expat 1.95.2 is included in 475 | # Modules/expat/. Usage of a system shared libexpat.so/expat.dll is 476 | # not advised. 477 | # 478 | # More information on Expat can be found at www.libexpat.org. 479 | # 480 | #pyexpat expat/xmlparse.c expat/xmlrole.c expat/xmltok.c pyexpat.c -I$(srcdir)/Modules/expat -DHAVE_EXPAT_CONFIG_H -DUSE_PYEXPAT_CAPI 481 | 482 | 483 | # Hye-Shik Chang's CJKCodecs 484 | 485 | # multibytecodec is required for all the other CJK codec modules 486 | #_multibytecodec cjkcodecs/multibytecodec.c 487 | 488 | #_codecs_cn cjkcodecs/_codecs_cn.c 489 | #_codecs_hk cjkcodecs/_codecs_hk.c 490 | #_codecs_iso2022 cjkcodecs/_codecs_iso2022.c 491 | #_codecs_jp cjkcodecs/_codecs_jp.c 492 | #_codecs_kr cjkcodecs/_codecs_kr.c 493 | #_codecs_tw cjkcodecs/_codecs_tw.c 494 | 495 | #_hashlib _hashopenssl.c 496 | 497 | # Example -- included for reference only: 498 | #xx xxmodule.c 499 | 500 | # Another example -- the 'xxsubtype' module shows C-level subtyping in action 501 | #xxsubtype xxsubtype.c 502 | 503 | # **** pts **** standard 504 | #_multiprocessing _multiprocessing/multiprocessing.c _multiprocessing/socket_connection.c _multiprocessing/semaphore.c 505 | #_sqlite3 _sqlite/cache.c _sqlite/connection.c _sqlite/cursor.c _sqlite/microprotocols.c _sqlite/module.c _sqlite/prepare_protocol.c _sqlite/row.c _sqlite/statement.c _sqlite/util.c -DSQLITE_OMIT_LOAD_EXTENSION -lsqlite3 506 | #_heapq _heapqmodule.c 507 | #_hotshot _hotshot.c 508 | #_json _json.c 509 | #_lsprof _lsprof.c rotatingtree.c 510 | #bz2 bz2module.c -lbz2 511 | #future_builtins future_builtins.c 512 | #_io _io/_iomodule.c _io/bufferedio.c _io/bytesio.c _io/fileio.c _io/iobase.c _io/stringio.c _io/textio.c 513 | 514 | # **** pts **** nonstandard 515 | #greenlet greenlet-0.3.1/greenlet.c 516 | 517 | # **** pts **** coroutine I/O: Syncless, gevent, Concurrence, gevent-MySQL 518 | # These will be enabled conditionally by build.sh in enable_module 519 | #not: _syncless_coio syncless/coio.c coio_src/coio_minihdns.c -lev -DCOIO_USE_CO_STACKLESS -DCOIO_USE_LIBEV -DCOIO_USE_MINIHDNS 520 | #_syncless_coio syncless/_syncless_coio.c syncless/coio_minihdns.c -levent_core -DCOIO_USE_CO_STACKLESS -DCOIO_USE_LIBEVENT2 -DCOIO_USE_MINIHDNS 521 | #_gevent_core gevent/_gevent_core.c -levent_core -levent_evhttp 522 | #_concurrence_event -levent_core concurrence/concurrence._event.c 523 | #_concurrence_io_io concurrence/concurrence.io._io.c concurrence/io_base.c 524 | #_concurrence_database_mysql_mysql concurrence/concurrence.database.mysql._mysql.c 525 | #_geventmysql_mysql geventmysql/geventmysql._mysql.c 526 | 527 | # **** pts **** extra modules for stacklessxx 528 | #_msgpack_msgpack msgpack/_msgpack_msgpack.c 529 | #_tokyocabinet_btree tokyocabinet/_tokyocabinet_btree.c -ltokyocabinet-staticpython -lpthread 530 | #_tokyocabinet_hash tokyocabinet/_tokyocabinet_hash.c -ltokyocabinet-staticpython -lpthread 531 | #_tokyocabinet_table tokyocabinet/_tokyocabinet_table.c -ltokyocabinet-staticpython -lpthread 532 | #_lmdb_cpython lmdb/_lmdb_cpython.c lmdb/lmdb_midl.c lmdb/lmdb_mdb.c -DHAVE_MEMALIGN -I$(srcdir)/lmdb.dir/lib -I$(srcdir)/lmdb.dir/lib/py-lmdb 533 | 534 | # **** pts **** crypto 535 | #_Crypto_Hash_MD2 pycrypto/_Crypto_Hash_MD2.c 536 | #_Crypto_Hash_MD4 pycrypto/_Crypto_Hash_MD4.c 537 | #_Crypto_Hash_SHA256 pycrypto/_Crypto_Hash_SHA256.c 538 | #_Crypto_Hash_RIPEMD160 pycrypto/_Crypto_Hash_RIPEMD160.c 539 | #_Crypto_Cipher_AES pycrypto/_Crypto_Cipher_AES.c 540 | #_Crypto_Cipher_ARC2 pycrypto/_Crypto_Cipher_ARC2.c 541 | #_Crypto_Cipher_Blowfish pycrypto/_Crypto_Cipher_Blowfish.c 542 | #_Crypto_Cipher_CAST pycrypto/_Crypto_Cipher_CAST.c 543 | #_Crypto_Cipher_DES pycrypto/_Crypto_Cipher_DES.c -I$(srcdir)/Modules/pycrypto/libtom 544 | #_Crypto_Cipher_DES3 pycrypto/_Crypto_Cipher_DES3.c -I$(srcdir)/Modules/pycrypto/libtom 545 | #_Crypto_Cipher_ARC4 pycrypto/_Crypto_Cipher_ARC4.c 546 | #_Crypto_Cipher_XOR pycrypto/_Crypto_Cipher_XOR.c 547 | #_Crypto_Util_strxor pycrypto/_Crypto_Util_strxor.c 548 | #_Crypto_Util_counter pycrypto/_Crypto_Util_counter.c 549 | #_aes_aes aloaes/rijndael-alg-fst.c aloaes/_aes_aes.c 550 | 551 | # **** pts **** with OpenSSL 552 | #_ssl _ssl.c -lssl-staticpython -lcrypto-staticpython 553 | -------------------------------------------------------------------------------- /Modules.dlmodule.2.7.c: -------------------------------------------------------------------------------- 1 | 2 | /* dl module */ 3 | 4 | #include "Python.h" 5 | 6 | /* StaticPython */ 7 | /* --- fake -ldl */ 8 | 9 | #include 10 | #include 11 | 12 | /*#include */ 13 | #define dlopen fake_dlopen 14 | #define dlclose fake_dlclose 15 | #define dlerror fake_dlerror 16 | #define dlsym fake_dlsym 17 | 18 | /* Implements the slower insertion sort instead, but is compact. It makes no 19 | * copies if the input is already sorted. 20 | */ 21 | void fake_qsort(void *base, size_t nmemb, size_t size, int (*compar)(const void *, const void *)) { 22 | register char *cur; 23 | char *savecur, *end; 24 | char tmp[size]; /* Variable-length array. */ 25 | if (nmemb > 1) { 26 | for (cur = (char*)base + size, end = (char*)base + (size * nmemb); cur != end; cur += size) { 27 | if (compar(cur, cur - size) < 0) { 28 | memcpy(tmp, cur, size); 29 | savecur = cur; 30 | do { 31 | memcpy(cur, cur - size, size); 32 | cur -= size; 33 | } while (cur != (char*)base && compar(tmp, cur - size) < 0); 34 | memcpy(cur, tmp, size); 35 | cur = savecur; 36 | } 37 | } 38 | } 39 | } 40 | 41 | void *dlopen(const char *filename, int flag) { 42 | return (void*)1; 43 | } 44 | char *dlerror(void) { 45 | return "symbol not emulated"; 46 | } 47 | void *dlsym(void *handle, const char *symbol) { 48 | (void)handle; 49 | if (!strcmp(symbol, "qsort")) return fake_qsort; 50 | if (!strcmp(symbol, "mmap")) return mmap; 51 | if (!strcmp(symbol, "mprotect")) return mprotect; 52 | if (!strcmp(symbol, "munmap")) return munmap; 53 | if (!strcmp(symbol, "memmove")) return memmove; 54 | return 0; 55 | } 56 | int dlclose(void *handle) { 57 | (void)handle; 58 | return 0; 59 | } 60 | 61 | /* StaticPython */ 62 | 63 | 64 | #ifdef __VMS 65 | #include 66 | #endif 67 | 68 | #ifndef RTLD_LAZY 69 | #define RTLD_LAZY 1 70 | #endif 71 | 72 | typedef void *PyUnivPtr; 73 | typedef struct { 74 | PyObject_HEAD 75 | PyUnivPtr *dl_handle; 76 | } dlobject; 77 | 78 | static PyTypeObject Dltype; 79 | 80 | static PyObject *Dlerror; 81 | 82 | static PyObject * 83 | newdlobject(PyUnivPtr *handle) 84 | { 85 | dlobject *xp; 86 | xp = PyObject_New(dlobject, &Dltype); 87 | if (xp == NULL) 88 | return NULL; 89 | xp->dl_handle = handle; 90 | return (PyObject *)xp; 91 | } 92 | 93 | static void 94 | dl_dealloc(dlobject *xp) 95 | { 96 | if (xp->dl_handle != NULL) 97 | dlclose(xp->dl_handle); 98 | PyObject_Del(xp); 99 | } 100 | 101 | static PyObject * 102 | dl_close(dlobject *xp) 103 | { 104 | if (xp->dl_handle != NULL) { 105 | dlclose(xp->dl_handle); 106 | xp->dl_handle = NULL; 107 | } 108 | Py_INCREF(Py_None); 109 | return Py_None; 110 | } 111 | 112 | static PyObject * 113 | dl_sym(dlobject *xp, PyObject *args) 114 | { 115 | char *name; 116 | PyUnivPtr *func; 117 | if (PyString_Check(args)) { 118 | name = PyString_AS_STRING(args); 119 | } else { 120 | PyErr_Format(PyExc_TypeError, "expected string, found %.200s", 121 | Py_TYPE(args)->tp_name); 122 | return NULL; 123 | } 124 | func = dlsym(xp->dl_handle, name); 125 | if (func == NULL) { 126 | Py_INCREF(Py_None); 127 | return Py_None; 128 | } 129 | return PyInt_FromLong((long)func); 130 | } 131 | 132 | static PyObject * 133 | dl_call(dlobject *xp, PyObject *args) 134 | { 135 | PyObject *name; 136 | long (*func)(long, long, long, long, long, 137 | long, long, long, long, long); 138 | long alist[10]; 139 | long res; 140 | Py_ssize_t i; 141 | Py_ssize_t n = PyTuple_Size(args); 142 | const char *buffer; 143 | Py_ssize_t size; 144 | if (n < 1) { 145 | PyErr_SetString(PyExc_TypeError, "at least a name is needed"); 146 | return NULL; 147 | } 148 | name = PyTuple_GetItem(args, 0); 149 | if (PyInt_Check(name)) { /* StaticPython */ 150 | func = (long (*)(long, long, long, long, long, 151 | long, long, long, long, long)) 152 | PyInt_AsLong(name); 153 | } else if (PyString_Check(name)) { 154 | func = (long (*)(long, long, long, long, long, 155 | long, long, long, long, long)) 156 | dlsym(xp->dl_handle, PyString_AsString(name)); 157 | } else { 158 | PyErr_SetString(PyExc_TypeError, 159 | "function name must be a string"); 160 | return NULL; 161 | } 162 | if (func == NULL) { 163 | PyErr_SetString(PyExc_ValueError, dlerror()); 164 | return NULL; 165 | } 166 | if (n-1 > 10) { 167 | PyErr_SetString(PyExc_TypeError, 168 | "too many arguments (max 10)"); 169 | return NULL; 170 | } 171 | for (i = 1; i < n; i++) { 172 | PyObject *v = PyTuple_GetItem(args, i); 173 | if (PyInt_Check(v)) 174 | alist[i-1] = PyInt_AS_LONG(v); 175 | else if (PyLong_Check(v)) { /* StaticPython */ 176 | alist[i-1] = res = PyInt_AsLong(v); 177 | if (res == -1 && PyErr_Occurred()) return 0; 178 | } 179 | else if (PyString_Check(v)) 180 | alist[i-1] = (long)PyString_AsString(v); 181 | else if (v == Py_None) 182 | alist[i-1] = (long) ((char *)NULL); 183 | else if (!PyObject_AsCharBuffer(v, &buffer, &size)) { 184 | alist[i-1] = (long)buffer; 185 | } 186 | else { 187 | PyErr_SetString(PyExc_TypeError, 188 | "arguments must be int, string or None"); 189 | return NULL; 190 | } 191 | } 192 | for (; i <= 10; i++) 193 | alist[i-1] = 0; 194 | res = (*func)(alist[0], alist[1], alist[2], alist[3], alist[4], 195 | alist[5], alist[6], alist[7], alist[8], alist[9]); 196 | return PyInt_FromLong(res); 197 | } 198 | 199 | static PyMethodDef dlobject_methods[] = { 200 | {"call", (PyCFunction)dl_call, METH_VARARGS}, 201 | {"sym", (PyCFunction)dl_sym, METH_O}, 202 | {"close", (PyCFunction)dl_close, METH_NOARGS}, 203 | {NULL, NULL} /* Sentinel */ 204 | }; 205 | 206 | static PyObject * 207 | dl_getattr(dlobject *xp, char *name) 208 | { 209 | return Py_FindMethod(dlobject_methods, (PyObject *)xp, name); 210 | } 211 | 212 | 213 | static PyTypeObject Dltype = { 214 | PyVarObject_HEAD_INIT(NULL, 0) 215 | "dl.dl", /*tp_name*/ 216 | sizeof(dlobject), /*tp_basicsize*/ 217 | 0, /*tp_itemsize*/ 218 | /* methods */ 219 | (destructor)dl_dealloc, /*tp_dealloc*/ 220 | 0, /*tp_print*/ 221 | (getattrfunc)dl_getattr,/*tp_getattr*/ 222 | 0, /*tp_setattr*/ 223 | 0, /*tp_compare*/ 224 | 0, /*tp_repr*/ 225 | 0, /*tp_as_number*/ 226 | 0, /*tp_as_sequence*/ 227 | 0, /*tp_as_mapping*/ 228 | 0, /*tp_hash*/ 229 | }; 230 | 231 | static PyObject * 232 | dl_open(PyObject *self, PyObject *args) 233 | { 234 | char *name; 235 | int mode; 236 | PyUnivPtr *handle; 237 | if (sizeof(int) != sizeof(long) || 238 | sizeof(long) != sizeof(char *)) { 239 | PyErr_SetString(PyExc_SystemError, 240 | "module dl requires sizeof(int) == sizeof(long) == sizeof(char*)"); 241 | return NULL; 242 | } 243 | 244 | if (PyArg_ParseTuple(args, "z:open", &name)) 245 | mode = RTLD_LAZY; 246 | else { 247 | PyErr_Clear(); 248 | if (!PyArg_ParseTuple(args, "zi:open", &name, &mode)) 249 | return NULL; 250 | #ifndef RTLD_NOW 251 | if (mode != RTLD_LAZY) { 252 | PyErr_SetString(PyExc_ValueError, "mode must be 1"); 253 | return NULL; 254 | } 255 | #endif 256 | } 257 | handle = dlopen(name, mode); 258 | if (handle == NULL) { 259 | char *errmsg = dlerror(); 260 | if (!errmsg) 261 | errmsg = "dlopen() error"; 262 | PyErr_SetString(Dlerror, errmsg); 263 | return NULL; 264 | } 265 | #ifdef __VMS 266 | /* Under OpenVMS dlopen doesn't do any check, just save the name 267 | * for later use, so we have to check if the file is readable, 268 | * the name can be a logical or a file from SYS$SHARE. 269 | */ 270 | if (access(name, R_OK)) { 271 | char fname[strlen(name) + 20]; 272 | strcpy(fname, "SYS$SHARE:"); 273 | strcat(fname, name); 274 | strcat(fname, ".EXE"); 275 | if (access(fname, R_OK)) { 276 | dlclose(handle); 277 | PyErr_SetString(Dlerror, 278 | "File not found or protection violation"); 279 | return NULL; 280 | } 281 | } 282 | #endif 283 | return newdlobject(handle); 284 | } 285 | 286 | static PyMethodDef dl_methods[] = { 287 | {"open", dl_open, METH_VARARGS}, 288 | {NULL, NULL} /* sentinel */ 289 | }; 290 | 291 | PyMODINIT_FUNC 292 | initdl(void) 293 | { 294 | PyObject *m, *d, *x; 295 | 296 | if (PyErr_WarnPy3k("the dl module has been removed in " 297 | "Python 3.0; use the ctypes module instead", 2) < 0) 298 | return; 299 | 300 | /* Initialize object type */ 301 | Py_TYPE(&Dltype) = &PyType_Type; 302 | 303 | /* Create the module and add the functions */ 304 | m = Py_InitModule("dl", dl_methods); 305 | if (m == NULL) 306 | return; 307 | 308 | /* Add some symbolic constants to the module */ 309 | d = PyModule_GetDict(m); 310 | Dlerror = x = PyErr_NewException("dl.error", NULL, NULL); 311 | PyDict_SetItemString(d, "error", x); 312 | x = PyInt_FromLong((long)RTLD_LAZY); 313 | PyDict_SetItemString(d, "RTLD_LAZY", x); 314 | #define INSINT(X) insint(d,#X,X) 315 | #ifdef RTLD_NOW 316 | INSINT(RTLD_NOW); 317 | #endif 318 | #ifdef RTLD_NOLOAD 319 | INSINT(RTLD_NOLOAD); 320 | #endif 321 | #ifdef RTLD_GLOBAL 322 | INSINT(RTLD_GLOBAL); 323 | #endif 324 | #ifdef RTLD_LOCAL 325 | INSINT(RTLD_LOCAL); 326 | #endif 327 | #ifdef RTLD_PARENT 328 | INSINT(RTLD_PARENT); 329 | #endif 330 | #ifdef RTLD_GROUP 331 | INSINT(RTLD_GROUP); 332 | #endif 333 | #ifdef RTLD_WORLD 334 | INSINT(RTLD_WORLD); 335 | #endif 336 | #ifdef RTLD_NODELETE 337 | INSINT(RTLD_NODELETE); 338 | #endif 339 | } 340 | -------------------------------------------------------------------------------- /Modules.dlmodule.2.7.c.orig: -------------------------------------------------------------------------------- 1 | 2 | /* dl module */ 3 | 4 | #include "Python.h" 5 | 6 | #include 7 | 8 | #ifdef __VMS 9 | #include 10 | #endif 11 | 12 | #ifndef RTLD_LAZY 13 | #define RTLD_LAZY 1 14 | #endif 15 | 16 | typedef void *PyUnivPtr; 17 | typedef struct { 18 | PyObject_HEAD 19 | PyUnivPtr *dl_handle; 20 | } dlobject; 21 | 22 | static PyTypeObject Dltype; 23 | 24 | static PyObject *Dlerror; 25 | 26 | static PyObject * 27 | newdlobject(PyUnivPtr *handle) 28 | { 29 | dlobject *xp; 30 | xp = PyObject_New(dlobject, &Dltype); 31 | if (xp == NULL) 32 | return NULL; 33 | xp->dl_handle = handle; 34 | return (PyObject *)xp; 35 | } 36 | 37 | static void 38 | dl_dealloc(dlobject *xp) 39 | { 40 | if (xp->dl_handle != NULL) 41 | dlclose(xp->dl_handle); 42 | PyObject_Del(xp); 43 | } 44 | 45 | static PyObject * 46 | dl_close(dlobject *xp) 47 | { 48 | if (xp->dl_handle != NULL) { 49 | dlclose(xp->dl_handle); 50 | xp->dl_handle = NULL; 51 | } 52 | Py_INCREF(Py_None); 53 | return Py_None; 54 | } 55 | 56 | static PyObject * 57 | dl_sym(dlobject *xp, PyObject *args) 58 | { 59 | char *name; 60 | PyUnivPtr *func; 61 | if (PyString_Check(args)) { 62 | name = PyString_AS_STRING(args); 63 | } else { 64 | PyErr_Format(PyExc_TypeError, "expected string, found %.200s", 65 | Py_TYPE(args)->tp_name); 66 | return NULL; 67 | } 68 | func = dlsym(xp->dl_handle, name); 69 | if (func == NULL) { 70 | Py_INCREF(Py_None); 71 | return Py_None; 72 | } 73 | return PyInt_FromLong((long)func); 74 | } 75 | 76 | static PyObject * 77 | dl_call(dlobject *xp, PyObject *args) 78 | { 79 | PyObject *name; 80 | long (*func)(long, long, long, long, long, 81 | long, long, long, long, long); 82 | long alist[10]; 83 | long res; 84 | Py_ssize_t i; 85 | Py_ssize_t n = PyTuple_Size(args); 86 | if (n < 1) { 87 | PyErr_SetString(PyExc_TypeError, "at least a name is needed"); 88 | return NULL; 89 | } 90 | name = PyTuple_GetItem(args, 0); 91 | if (!PyString_Check(name)) { 92 | PyErr_SetString(PyExc_TypeError, 93 | "function name must be a string"); 94 | return NULL; 95 | } 96 | func = (long (*)(long, long, long, long, long, 97 | long, long, long, long, long)) 98 | dlsym(xp->dl_handle, PyString_AsString(name)); 99 | if (func == NULL) { 100 | PyErr_SetString(PyExc_ValueError, dlerror()); 101 | return NULL; 102 | } 103 | if (n-1 > 10) { 104 | PyErr_SetString(PyExc_TypeError, 105 | "too many arguments (max 10)"); 106 | return NULL; 107 | } 108 | for (i = 1; i < n; i++) { 109 | PyObject *v = PyTuple_GetItem(args, i); 110 | if (PyInt_Check(v)) 111 | alist[i-1] = PyInt_AsLong(v); 112 | else if (PyString_Check(v)) 113 | alist[i-1] = (long)PyString_AsString(v); 114 | else if (v == Py_None) 115 | alist[i-1] = (long) ((char *)NULL); 116 | else { 117 | PyErr_SetString(PyExc_TypeError, 118 | "arguments must be int, string or None"); 119 | return NULL; 120 | } 121 | } 122 | for (; i <= 10; i++) 123 | alist[i-1] = 0; 124 | res = (*func)(alist[0], alist[1], alist[2], alist[3], alist[4], 125 | alist[5], alist[6], alist[7], alist[8], alist[9]); 126 | return PyInt_FromLong(res); 127 | } 128 | 129 | static PyMethodDef dlobject_methods[] = { 130 | {"call", (PyCFunction)dl_call, METH_VARARGS}, 131 | {"sym", (PyCFunction)dl_sym, METH_O}, 132 | {"close", (PyCFunction)dl_close, METH_NOARGS}, 133 | {NULL, NULL} /* Sentinel */ 134 | }; 135 | 136 | static PyObject * 137 | dl_getattr(dlobject *xp, char *name) 138 | { 139 | return Py_FindMethod(dlobject_methods, (PyObject *)xp, name); 140 | } 141 | 142 | 143 | static PyTypeObject Dltype = { 144 | PyVarObject_HEAD_INIT(NULL, 0) 145 | "dl.dl", /*tp_name*/ 146 | sizeof(dlobject), /*tp_basicsize*/ 147 | 0, /*tp_itemsize*/ 148 | /* methods */ 149 | (destructor)dl_dealloc, /*tp_dealloc*/ 150 | 0, /*tp_print*/ 151 | (getattrfunc)dl_getattr,/*tp_getattr*/ 152 | 0, /*tp_setattr*/ 153 | 0, /*tp_compare*/ 154 | 0, /*tp_repr*/ 155 | 0, /*tp_as_number*/ 156 | 0, /*tp_as_sequence*/ 157 | 0, /*tp_as_mapping*/ 158 | 0, /*tp_hash*/ 159 | }; 160 | 161 | static PyObject * 162 | dl_open(PyObject *self, PyObject *args) 163 | { 164 | char *name; 165 | int mode; 166 | PyUnivPtr *handle; 167 | if (sizeof(int) != sizeof(long) || 168 | sizeof(long) != sizeof(char *)) { 169 | PyErr_SetString(PyExc_SystemError, 170 | "module dl requires sizeof(int) == sizeof(long) == sizeof(char*)"); 171 | return NULL; 172 | } 173 | 174 | if (PyArg_ParseTuple(args, "z:open", &name)) 175 | mode = RTLD_LAZY; 176 | else { 177 | PyErr_Clear(); 178 | if (!PyArg_ParseTuple(args, "zi:open", &name, &mode)) 179 | return NULL; 180 | #ifndef RTLD_NOW 181 | if (mode != RTLD_LAZY) { 182 | PyErr_SetString(PyExc_ValueError, "mode must be 1"); 183 | return NULL; 184 | } 185 | #endif 186 | } 187 | handle = dlopen(name, mode); 188 | if (handle == NULL) { 189 | char *errmsg = dlerror(); 190 | if (!errmsg) 191 | errmsg = "dlopen() error"; 192 | PyErr_SetString(Dlerror, errmsg); 193 | return NULL; 194 | } 195 | #ifdef __VMS 196 | /* Under OpenVMS dlopen doesn't do any check, just save the name 197 | * for later use, so we have to check if the file is readable, 198 | * the name can be a logical or a file from SYS$SHARE. 199 | */ 200 | if (access(name, R_OK)) { 201 | char fname[strlen(name) + 20]; 202 | strcpy(fname, "SYS$SHARE:"); 203 | strcat(fname, name); 204 | strcat(fname, ".EXE"); 205 | if (access(fname, R_OK)) { 206 | dlclose(handle); 207 | PyErr_SetString(Dlerror, 208 | "File not found or protection violation"); 209 | return NULL; 210 | } 211 | } 212 | #endif 213 | return newdlobject(handle); 214 | } 215 | 216 | static PyMethodDef dl_methods[] = { 217 | {"open", dl_open, METH_VARARGS}, 218 | {NULL, NULL} /* sentinel */ 219 | }; 220 | 221 | /* From socketmodule.c 222 | * Convenience routine to export an integer value. 223 | * 224 | * Errors are silently ignored, for better or for worse... 225 | */ 226 | static void 227 | insint(PyObject *d, char *name, int value) 228 | { 229 | PyObject *v = PyInt_FromLong((long) value); 230 | if (!v || PyDict_SetItemString(d, name, v)) 231 | PyErr_Clear(); 232 | 233 | Py_XDECREF(v); 234 | } 235 | 236 | PyMODINIT_FUNC 237 | initdl(void) 238 | { 239 | PyObject *m, *d, *x; 240 | 241 | if (PyErr_WarnPy3k("the dl module has been removed in " 242 | "Python 3.0; use the ctypes module instead", 2) < 0) 243 | return; 244 | 245 | /* Initialize object type */ 246 | Py_TYPE(&Dltype) = &PyType_Type; 247 | 248 | /* Create the module and add the functions */ 249 | m = Py_InitModule("dl", dl_methods); 250 | if (m == NULL) 251 | return; 252 | 253 | /* Add some symbolic constants to the module */ 254 | d = PyModule_GetDict(m); 255 | Dlerror = x = PyErr_NewException("dl.error", NULL, NULL); 256 | PyDict_SetItemString(d, "error", x); 257 | x = PyInt_FromLong((long)RTLD_LAZY); 258 | PyDict_SetItemString(d, "RTLD_LAZY", x); 259 | #define INSINT(X) insint(d,#X,X) 260 | #ifdef RTLD_NOW 261 | INSINT(RTLD_NOW); 262 | #endif 263 | #ifdef RTLD_NOLOAD 264 | INSINT(RTLD_NOLOAD); 265 | #endif 266 | #ifdef RTLD_GLOBAL 267 | INSINT(RTLD_GLOBAL); 268 | #endif 269 | #ifdef RTLD_LOCAL 270 | INSINT(RTLD_LOCAL); 271 | #endif 272 | #ifdef RTLD_PARENT 273 | INSINT(RTLD_PARENT); 274 | #endif 275 | #ifdef RTLD_GROUP 276 | INSINT(RTLD_GROUP); 277 | #endif 278 | #ifdef RTLD_WORLD 279 | INSINT(RTLD_WORLD); 280 | #endif 281 | #ifdef RTLD_NODELETE 282 | INSINT(RTLD_NODELETE); 283 | #endif 284 | } 285 | -------------------------------------------------------------------------------- /Pyrex-0.9.9.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pts/staticpython/1bc021851823cbbc38c0dbd0790a252b760e9beb/Pyrex-0.9.9.tar.gz -------------------------------------------------------------------------------- /Python-2.7.12.tar.xz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pts/staticpython/1bc021851823cbbc38c0dbd0790a252b760e9beb/Python-2.7.12.tar.xz -------------------------------------------------------------------------------- /Python-3.2.tar.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pts/staticpython/1bc021851823cbbc38c0dbd0790a252b760e9beb/Python-3.2.tar.bz2 -------------------------------------------------------------------------------- /README.txt: -------------------------------------------------------------------------------- 1 | statically linked Python 2.x, 3.x and Stackless for 32-bit Linux, Mac OS X and FreeBSD 2 | 3 | documentation, project home page: https://rawgit.com/pts/staticpython/master/staticpython.html 4 | Linux i386 executable binary: release/python2.7-static 5 | blog post: http://ptspts.blogspot.com/2010/08/staticpython-released.html 6 | blog post: http://ptspts.blogspot.com/2010/08/how-to-try-stackless-python-on-linux.html 7 | blog post: http://ptspts.blogspot.com/2011/02/how-to-run-syncless-on-linux-without.html 8 | blog post: http://ptspts.blogspot.com/2011/06/python-32-binaries-released-in.html 9 | blog post: http://ptspts.blogspot.com/2014/06/whats-difference-between-staticpython.html 10 | blog post: http://ptspts.blogspot.com/2016/02/micropython-for-linux-i386-statically.html 11 | 12 | Send donations to the author of StaticPython: 13 | https://flattr.com/submit/auto?user_id=pts&url=https://github.com/pts/staticpython 14 | 15 | __END__ 16 | -------------------------------------------------------------------------------- /advzip.darwin.inst.tbz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pts/staticpython/1bc021851823cbbc38c0dbd0790a252b760e9beb/advzip.darwin.inst.tbz2 -------------------------------------------------------------------------------- /advzip.inst.tbz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pts/staticpython/1bc021851823cbbc38c0dbd0790a252b760e9beb/advzip.inst.tbz2 -------------------------------------------------------------------------------- /alo-aes-0.3.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pts/staticpython/1bc021851823cbbc38c0dbd0790a252b760e9beb/alo-aes-0.3.tar.gz -------------------------------------------------------------------------------- /busybox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pts/staticpython/1bc021851823cbbc38c0dbd0790a252b760e9beb/busybox -------------------------------------------------------------------------------- /bzip2-1.0.5.inst.tbz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pts/staticpython/1bc021851823cbbc38c0dbd0790a252b760e9beb/bzip2-1.0.5.inst.tbz2 -------------------------------------------------------------------------------- /bzip2-1.0.6.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pts/staticpython/1bc021851823cbbc38c0dbd0790a252b760e9beb/bzip2-1.0.6.tar.gz -------------------------------------------------------------------------------- /calculate_path.2.7.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | /* StaticPython */ /* StaticPython-appended */ 4 | #include 5 | #include 6 | #include 7 | static void calculate_path (void) { 8 | extern char *Py_GetProgramName(void); 9 | 10 | static char delimiter[2] = {DELIM, '\0'}; 11 | char *rtpypath = Py_GETENV("PYTHONPATH"); 12 | char *path = getenv("PATH"); 13 | char *prog = Py_GetProgramName(); 14 | static char proc_exe_path[] = "/proc/self/exe"; 15 | char *xzip_path; 16 | char *buf; 17 | 18 | /* If there is no slash in the argv0 path, then we have to 19 | * assume python is on the user's $PATH, since there's no 20 | * other way to find a directory to start the search from. If 21 | * $PATH isn't exported, you lose. 22 | */ 23 | if (strchr(prog, SEP)) 24 | strncpy(progpath, prog, MAXPATHLEN); 25 | else if (path) { 26 | while (1) { 27 | char *delim = strchr(path, DELIM); 28 | 29 | if (delim) { 30 | size_t len = delim - path; 31 | if (len > MAXPATHLEN) 32 | len = MAXPATHLEN; 33 | strncpy(progpath, path, len); 34 | *(progpath + len) = '\0'; 35 | } 36 | else 37 | strncpy(progpath, path, MAXPATHLEN); 38 | 39 | joinpath(progpath, prog); 40 | if (isxfile(progpath)) 41 | break; 42 | 43 | if (!delim) { 44 | progpath[0] = '\0'; 45 | break; 46 | } 47 | path = delim + 1; 48 | } 49 | } 50 | else 51 | progpath[0] = '\0'; 52 | if (progpath[0] != SEP && progpath[0] != '\0') 53 | absolutize(progpath); 54 | 55 | /**** pts ****/ 56 | { int fd = open(proc_exe_path, O_RDONLY); 57 | char hdr[22]; 58 | /* fprintf(stderr, "progpath=(%s)\n", progpath); */ 59 | if (fd < 0) { /* If /proc is not avaialbe, e.g. in chroot */ 60 | after_bad_proc_exe: 61 | xzip_path = progpath; /* Use argv[0] for the .zip filename */ 62 | } else { 63 | xzip_path = proc_exe_path; 64 | if (lseek(fd, -22, SEEK_END) < 0) { 65 | bad_proc_exe: 66 | close(fd); 67 | goto after_bad_proc_exe; 68 | } 69 | if (read(fd, hdr, 22) != 22) goto bad_proc_exe; 70 | /* ZIP end-ef-central-directory header with comment size == 0. */ 71 | /* We check this because Linux i386 code running Docker on macOS 72 | * Ventura 13 with Apple Silicon doesn't have a working 73 | * /proc/self/exe, so we fall back to progpath (arg[0], sys.interpreter). 74 | */ 75 | if (memcmp(hdr, "PK\5\6", 4) != 0 || hdr[20] != 0 || hdr[21] != 0) goto bad_proc_exe; 76 | close(fd); 77 | } 78 | } 79 | /*fprintf(stderr, "info: xzip_path=(%s)\n", xzip_path);*/ 80 | 81 | /**** pts ****/ 82 | if (rtpypath == NULL || rtpypath[0] == '\0') { 83 | module_search_path = xzip_path; 84 | } else if (NULL == (buf = (char *)PyMem_Malloc( 85 | 2 + strlen(xzip_path) + strlen(rtpypath)))) { 86 | /* We can't exit, so print a warning and limp along */ 87 | fprintf(stderr, "Not enough memory for dynamic PYTHONPATH.\n"); 88 | fprintf(stderr, "Using default static PYTHONPATH.\n"); 89 | module_search_path = xzip_path; 90 | } else { 91 | strcpy(buf, rtpypath); 92 | strcat(buf, delimiter); 93 | strcat(buf, xzip_path); 94 | module_search_path = buf; 95 | } 96 | } 97 | 98 | -------------------------------------------------------------------------------- /calculate_path.3.2.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | /* StaticPython */ /* StaticPython-appended */ 4 | #include 5 | static void calculate_path (void) { 6 | extern wchar_t *Py_GetProgramName(void); 7 | 8 | static wchar_t delimiter[2] = {DELIM, '\0'}; 9 | char *_rtpypath = Py_GETENV("PYTHONPATH"); 10 | wchar_t rtpypath[MAXPATHLEN + 1]; 11 | char *_path = getenv("PATH"); 12 | wchar_t pathbuf[MAXPATHLEN + 1]; 13 | wchar_t *prog = Py_GetProgramName(); 14 | static wchar_t proc_exe_path[] = L"/proc/self/exe"; 15 | wchar_t *xzip_path; 16 | wchar_t *buf; 17 | 18 | /* If there is no slash in the argv0 path, then we have to 19 | * assume python is on the user's $PATH, since there's no 20 | * other way to find a directory to start the search from. If 21 | * $PATH isn't exported, you lose. 22 | */ 23 | if (wcschr(prog, SEP)) 24 | wcsncpy(progpath, prog, MAXPATHLEN); 25 | else if (_path) { 26 | size_t s = mbstowcs(pathbuf, _path, sizeof(pathbuf) / sizeof(wchar_t)); 27 | if (s == (size_t)-1 || s >= sizeof(pathbuf) / sizeof(wchar_t)) 28 | /* XXX deal with errors more gracefully */ 29 | _path = NULL; 30 | if (_path) { 31 | wchar_t *path = pathbuf; 32 | while (1) { 33 | wchar_t *delim = wcschr(path, DELIM); 34 | 35 | if (delim) { 36 | size_t len = delim - path; 37 | if (len > MAXPATHLEN) 38 | len = MAXPATHLEN; 39 | wcsncpy(progpath, path, len); 40 | *(progpath + len) = '\0'; 41 | } 42 | else 43 | wcsncpy(progpath, path, MAXPATHLEN); 44 | 45 | joinpath(progpath, prog); 46 | if (isxfile(progpath)) 47 | break; 48 | 49 | if (!delim) { 50 | progpath[0] = L'\0'; 51 | break; 52 | } 53 | path = delim + 1; 54 | } 55 | } 56 | } 57 | else 58 | progpath[0] = '\0'; 59 | if (progpath[0] != SEP && progpath[0] != '\0') 60 | absolutize(progpath); 61 | 62 | /**** pts ****/ 63 | { FILE *f = _Py_wfopen(proc_exe_path, L"rb"); 64 | /* fprintf(stderr, "progpath=(%s)\n", progpath); */ 65 | if (f == NULL) { /* If /proc is not avaialbe, e.g. in chroot */ 66 | xzip_path = progpath; /* Use argv[0] for the .zip filename */ 67 | } else { 68 | xzip_path = proc_exe_path; 69 | fclose(f); 70 | } 71 | } 72 | 73 | if (_rtpypath != NULL) { 74 | size_t s = mbstowcs(rtpypath, _rtpypath, sizeof(rtpypath) / sizeof(wchar_t)); 75 | if (s == (size_t)-1 || s >= sizeof(rtpypath) / sizeof(wchar_t)) 76 | /* XXX deal with errors more gracefully */ 77 | _rtpypath = NULL; 78 | } 79 | 80 | /**** pts ****/ 81 | if (_rtpypath == NULL || _rtpypath[0] == '\0') { 82 | module_search_path = xzip_path; 83 | } else { 84 | if (NULL == (buf = (wchar_t *)PyMem_Malloc( 85 | sizeof(wchar_t) * (2 + wcslen(xzip_path) + wcslen(rtpypath))))) { 86 | /* We can't exit, so print a warning and limp along */ 87 | fprintf(stderr, "Not enough memory for dynamic PYTHONPATH.\n"); 88 | fprintf(stderr, "Using default static PYTHONPATH.\n"); 89 | module_search_path = xzip_path; 90 | } else { 91 | wcscpy(buf, rtpypath); 92 | wcscat(buf, delimiter); 93 | wcscat(buf, xzip_path); 94 | module_search_path = buf; 95 | } 96 | } 97 | } 98 | 99 | -------------------------------------------------------------------------------- /concurrence-0.3.1.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pts/staticpython/1bc021851823cbbc38c0dbd0790a252b760e9beb/concurrence-0.3.1.tar.gz -------------------------------------------------------------------------------- /d.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash -- 2 | # 3 | # download.sh: downloader for StaticPython which autodetects the OS 4 | # by pts@fazekas.hu at Mon May 23 16:06:56 CEST 2011 5 | # 6 | # Example usage: 7 | # 8 | # curl http://pts-mini-gpl.googlecode.com/svn/trunk/staticpython/d.sh | 9 | # bash /dev/stdin python2.7-static 10 | # 11 | if test $# != 1 || test "${1/\//}" != "$1"; then 12 | echo "Usage: $0: {python2.7-static|stackless2.7-static|stacklessco2.7-static}" >&2 13 | exit 1 14 | fi 15 | if test "`uname`" = Darwin; then 16 | URL="https://raw.githubusercontent.com/pts/staticpython/master/release.darwin/$1" 17 | else 18 | URL="https://raw.githubusercontent.com/pts/staticpython/master/release/$1" 19 | fi 20 | echo "info: downloading: $URL" 21 | if type -p curl >/dev/null 2>&1; then 22 | curl -o "$1.download" "$URL" || exit 2 23 | else 24 | wget -O "$1.download" "$URL" || exit 2 25 | fi 26 | chmod +x "$1.download" || exit 2 27 | mv "$1.download" "$1" || exit 2 28 | echo "info: download OK, run with: ./$1" 29 | -------------------------------------------------------------------------------- /doc/compress.txt: -------------------------------------------------------------------------------- 1 | by pts@fazekas.hu at Sun Oct 7 14:16:05 CEST 2012 2 | 3 | Python 2.7, Linux i386 4 | 5 | disadvantage of UPX: slower to start 6 | disadvantage of UPX: code memory not shared between processes 7 | 8 | TODO(pts): How much larger is a .pyc? 9 | TODO(pts): Can we do something smarter instead of .zip? (.tar.gz is 1378618 10 | instead of 1554899 bytes). To save startup time... 11 | TODO(pts): Recompile with flags to remove unused code. 12 | 13 | stacklessxx2.7 14 | ~~~~~~~~~~~~~~ 15 | python 8072260 16 | python.lzma 2741696 17 | python.brute 2741056 18 | xlib.zip 2168717 19 | xlib0.zip 8629551 20 | plib0.zip 5322748 21 | pliba4.zip 1554899 22 | pri 5326796 23 | pri.lzma 1034436 24 | pri.brute 1031356 25 | python+pri 13399056 26 | python+pri.lzma 3776132 27 | python+pri.brute 3772412 28 | pythonpri 13393017 29 | pythonpri.lzma 3780264 30 | pythonpri.brute 3759168 31 | 32 | C-bin 8072260 33 | lzma -5330564 34 | brute -640 35 | 36 | py-concat 8629551 37 | zipa4 -6460834 38 | pypack -613818 39 | lzma -524511 40 | brute -3080 41 | combo -9196 42 | 43 | startup speed 0ms 44 | C-lzma +320ms 45 | py-lzma combo +134ms 46 | 47 | python2.7 48 | ~~~~~~~~~ 49 | python 4983485 50 | python.lzma 1800048 51 | python.brute 1800048 52 | xlib.zip 1785327 53 | xlib0.zip 7310544 54 | plib0.zip 4493141 55 | pliba4.zip 1284357 56 | pri 4497188 57 | pri.lzma 874320 58 | pri.brute 874072 59 | python+pri 9480673 60 | python+pri.lzma 2674368 61 | python+pri.brute 2674120 62 | pythonpri 9476850 63 | pythonpri.lzma 2665128 64 | pythonpri.brute 2663168 65 | 66 | C-bin 4983485 67 | lzma -3183437 68 | brute -0 69 | 70 | py-concat 7310544 71 | zipa4 -5525217 72 | pypack -500970 73 | lzma -414085 74 | minipy -4988 75 | brute -248 76 | combo -6904 77 | 78 | startup speed 0ms 79 | C-lzma +210ms 80 | py-lzma combo +104ms 81 | -------------------------------------------------------------------------------- /doc/slides_2011-06-23/sh_dull.min.css: -------------------------------------------------------------------------------- 1 | pre.sh_sourceCode{background-color:#bfbfbf;color:#656565;font-weight:normal;font-style:normal;}pre.sh_sourceCode .sh_keyword{color:#353535;font-weight:bold;font-style:normal;}pre.sh_sourceCode .sh_type{color:#3241c6;font-weight:normal;font-style:normal;}pre.sh_sourceCode .sh_string{color:#059;font-weight:normal;font-style:normal;}pre.sh_sourceCode .sh_regexp{color:#059;font-weight:normal;font-style:normal;}pre.sh_sourceCode .sh_specialchar{color:#059;font-weight:normal;font-style:normal;}pre.sh_sourceCode .sh_comment{color:#d11d20;font-weight:normal;font-style:italic;}pre.sh_sourceCode .sh_number{color:#16930d;font-weight:normal;font-style:normal;}pre.sh_sourceCode .sh_preproc{color:#003;font-weight:normal;font-style:normal;}pre.sh_sourceCode .sh_symbol{color:#222;font-weight:normal;font-style:normal;}pre.sh_sourceCode .sh_function{color:#38255c;font-weight:normal;font-style:normal;}pre.sh_sourceCode .sh_cbracket{color:#222;font-weight:normal;font-style:normal;}pre.sh_sourceCode .sh_url{color:#059;font-weight:normal;font-style:normal;}pre.sh_sourceCode .sh_date{color:#353535;font-weight:bold;font-style:normal;}pre.sh_sourceCode .sh_time{color:#353535;font-weight:bold;font-style:normal;}pre.sh_sourceCode .sh_file{color:#353535;font-weight:bold;font-style:normal;}pre.sh_sourceCode .sh_ip{color:#059;font-weight:normal;font-style:normal;}pre.sh_sourceCode .sh_name{color:#059;font-weight:normal;font-style:normal;}pre.sh_sourceCode .sh_variable{color:#ae5a16;font-weight:normal;font-style:normal;}pre.sh_sourceCode .sh_oldfile{color:#059;font-weight:normal;font-style:normal;}pre.sh_sourceCode .sh_newfile{color:#059;font-weight:normal;font-style:normal;}pre.sh_sourceCode .sh_difflines{color:#353535;font-weight:bold;font-style:normal;}pre.sh_sourceCode .sh_selector{color:#ae5a16;font-weight:normal;font-style:normal;}pre.sh_sourceCode .sh_property{color:#353535;font-weight:bold;font-style:normal;}pre.sh_sourceCode .sh_value{color:#059;font-weight:normal;font-style:normal;} -------------------------------------------------------------------------------- /doc/slides_2011-06-23/sh_javascript.min.js: -------------------------------------------------------------------------------- 1 | if(!this.sh_languages){this.sh_languages={}}sh_languages.javascript=[[[/\/\/\//g,"sh_comment",1],[/\/\//g,"sh_comment",7],[/\/\*\*/g,"sh_comment",8],[/\/\*/g,"sh_comment",9],[/\b(?:abstract|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|false|final|finally|for|function|goto|if|implements|in|instanceof|interface|native|new|null|private|protected|prototype|public|return|static|super|switch|synchronized|throw|throws|this|transient|true|try|typeof|var|volatile|while|with)\b/g,"sh_keyword",-1],[/(\+\+|--|\)|\])(\s*)(\/=?(?![*\/]))/g,["sh_symbol","sh_normal","sh_symbol"],-1],[/(0x[A-Fa-f0-9]+|(?:[\d]*\.)?[\d]+(?:[eE][+-]?[\d]+)?)(\s*)(\/(?![*\/]))/g,["sh_number","sh_normal","sh_symbol"],-1],[/([A-Za-z$_][A-Za-z0-9$_]*\s*)(\/=?(?![*\/]))/g,["sh_normal","sh_symbol"],-1],[/\/(?:\\.|[^*\\\/])(?:\\.|[^\\\/])*\/[gim]*/g,"sh_regexp",-1],[/\b[+-]?(?:(?:0x[A-Fa-f0-9]+)|(?:(?:[\d]*\.)?[\d]+(?:[eE][+-]?[\d]+)?))u?(?:(?:int(?:8|16|32|64))|L)?\b/g,"sh_number",-1],[/"/g,"sh_string",10],[/'/g,"sh_string",11],[/~|!|%|\^|\*|\(|\)|-|\+|=|\[|\]|\\|:|;|,|\.|\/|\?|&|<|>|\|/g,"sh_symbol",-1],[/\{|\}/g,"sh_cbracket",-1],[/\b(?:Math|Infinity|NaN|undefined|arguments)\b/g,"sh_predef_var",-1],[/\b(?:Array|Boolean|Date|Error|EvalError|Function|Number|Object|RangeError|ReferenceError|RegExp|String|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt)\b/g,"sh_predef_func",-1],[/(?:[A-Za-z]|_)[A-Za-z0-9_]*(?=[ \t]*\()/g,"sh_function",-1]],[[/$/g,null,-2],[/(?:?)|(?:?)/g,"sh_url",-1],[/<\?xml/g,"sh_preproc",2,1],[//g,"sh_keyword",-1],[/<(?:\/)?[A-Za-z](?:[A-Za-z0-9_:.-]*)/g,"sh_keyword",6,1],[/&(?:[A-Za-z0-9]+);/g,"sh_preproc",-1],[/<(?:\/)?[A-Za-z][A-Za-z0-9]*(?:\/)?>/g,"sh_keyword",-1],[/<(?:\/)?[A-Za-z][A-Za-z0-9]*/g,"sh_keyword",6,1],[/@[A-Za-z]+/g,"sh_type",-1],[/(?:TODO|FIXME|BUG)(?:[:]?)/g,"sh_todo",-1]],[[/\?>/g,"sh_preproc",-2],[/([^=" \t>]+)([ \t]*)(=?)/g,["sh_type","sh_normal","sh_symbol"],-1],[/"/g,"sh_string",3]],[[/\\(?:\\|")/g,null,-1],[/"/g,"sh_string",-2]],[[/>/g,"sh_preproc",-2],[/([^=" \t>]+)([ \t]*)(=?)/g,["sh_type","sh_normal","sh_symbol"],-1],[/"/g,"sh_string",3]],[[/-->/g,"sh_comment",-2],[/