-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathPython_Modules.patch
More file actions
2356 lines (2303 loc) · 79.9 KB
/
Copy pathPython_Modules.patch
File metadata and controls
2356 lines (2303 loc) · 79.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
diff -Naur tmp/Python-2.7.13/Modules/Setup Python-2.7.13/Modules/Setup
--- tmp/Python-2.7.13/Modules/Setup 1970-01-01 01:00:00.000000000 +0100
+++ Python-2.7.13/Modules/Setup 2018-12-09 15:27:27.000000000 +0100
@@ -0,0 +1,499 @@
+# -*- makefile -*-
+# The file Setup is used by the makesetup script to construct the files
+# Makefile and config.c, from Makefile.pre and config.c.in,
+# respectively. The file Setup itself is initially copied from
+# Setup.dist; once it exists it will not be overwritten, so you can edit
+# Setup to your heart's content. Note that Makefile.pre is created
+# from Makefile.pre.in by the toplevel configure script.
+
+# (VPATH notes: Setup and Makefile.pre are in the build directory, as
+# are Makefile and config.c; the *.in and *.dist files are in the source
+# directory.)
+
+# Each line in this file describes one or more optional modules.
+# Modules enabled here will not be compiled by the setup.py script,
+# so the file can be used to override setup.py's behavior.
+
+# Lines have the following structure:
+#
+# <module> ... [<sourcefile> ...] [<cpparg> ...] [<library> ...]
+#
+# <sourcefile> is anything ending in .c (.C, .cc, .c++ are C++ files)
+# <cpparg> is anything starting with -I, -D, -U or -C
+# <library> is anything ending in .a or beginning with -l or -L
+# <module> is anything else but should be a valid Python
+# identifier (letters, digits, underscores, beginning with non-digit)
+#
+# (As the makesetup script changes, it may recognize some other
+# arguments as well, e.g. *.so and *.sl as libraries. See the big
+# case statement in the makesetup script.)
+#
+# Lines can also have the form
+#
+# <name> = <value>
+#
+# which defines a Make variable definition inserted into Makefile.in
+#
+# Finally, if a line contains just the word "*shared*" (without the
+# quotes but with the stars), then the following modules will not be
+# built statically. The build process works like this:
+#
+# 1. Build all modules that are declared as static in Modules/Setup,
+# combine them into libpythonxy.a, combine that into python.
+# 2. Build all modules that are listed as shared in Modules/Setup.
+# 3. Invoke setup.py. That builds all modules that
+# a) are not builtin, and
+# b) are not listed in Modules/Setup, and
+# c) can be build on the target
+#
+# Therefore, modules declared to be shared will not be
+# included in the config.c file, nor in the list of objects to be
+# added to the library archive, and their linker options won't be
+# added to the linker options. Rules to create their .o files and
+# their shared libraries will still be added to the Makefile, and
+# their names will be collected in the Make variable SHAREDMODS. This
+# is used to build modules as shared libraries. (They can be
+# installed using "make sharedinstall", which is implied by the
+# toplevel "make install" target.) (For compatibility,
+# *noconfig* has the same effect as *shared*.)
+#
+# In addition, *static* explicitly declares the following modules to
+# be static. Lines containing "*static*" and "*shared*" may thus
+# alternate throughout this file.
+
+# NOTE: As a standard policy, as many modules as can be supported by a
+# platform should be present. The distribution comes with all modules
+# enabled that are supported by most platforms and don't require you
+# to ftp sources from elsewhere.
+
+
+# Some special rules to define PYTHONPATH.
+# Edit the definitions below to indicate which options you are using.
+# Don't add any whitespace or comments!
+
+# Directories where library files get installed.
+# DESTLIB is for Python modules; MACHDESTLIB for shared libraries.
+DESTLIB=$(LIBDEST)
+MACHDESTLIB=$(BINLIBDEST)
+
+# NOTE: all the paths are now relative to the prefix that is computed
+# at run time!
+
+# Standard path -- don't edit.
+# No leading colon since this is the first entry.
+# Empty since this is now just the runtime prefix.
+DESTPATH=
+
+# Site specific path components -- should begin with : if non-empty
+SITEPATH=
+
+# Standard path components for test modules
+TESTPATH=
+
+# Path components for machine- or system-dependent modules and shared libraries
+MACHDEPPATH=:$(PLATDIR)
+EXTRAMACHDEPPATH=
+
+# Path component for the Tkinter-related modules
+# The TKPATH variable is always enabled, to save you the effort.
+TKPATH=:lib-tk
+
+# Path component for old modules.
+OLDPATH=:lib-old
+
+COREPYTHONPATH=$(DESTPATH)$(SITEPATH)$(TESTPATH)$(MACHDEPPATH)$(EXTRAMACHDEPPATH)$(TKPATH)$(OLDPATH)
+PYTHONPATH=$(COREPYTHONPATH)
+
+
+# The modules listed here can't be built as shared libraries for
+# various reasons; therefore they are listed here instead of in the
+# normal order.
+
+# This only contains the minimal set of modules required to run the
+# setup.py script in the root of the Python source tree.
+
+posix posixmodule.c # posix (UNIX) system calls
+errno errnomodule.c # posix (UNIX) errno values
+pwd pwdmodule.c # this is needed to find out the user's home dir
+ # if $HOME is not set
+_sre _sre.c # Fredrik Lundh's new regular expressions
+_codecs _codecsmodule.c # access to the builtin codecs and codec registry
+_weakref _weakref.c # weak references
+
+# The zipimport module is always imported at startup. Having it as a
+# builtin module avoids some bootstrapping problems and reduces overhead.
+zipimport zipimport.c
+
+# The rest of the modules listed in this file are all commented out by
+# default. Usually they can be detected and built as dynamically
+# loaded modules by the new setup.py script added in Python 2.1. If
+# you're on a platform that doesn't support dynamic loading, want to
+# compile modules statically into the Python binary, or need to
+# specify some odd set of compiler switches, you can uncomment the
+# appropriate lines below.
+
+# ======================================================================
+
+# The Python symtable module depends on .h files that setup.py doesn't track
+_symtable symtablemodule.c
+
+# The SGI specific GL module:
+
+GLHACK=-Dclear=__GLclear
+#gl glmodule.c cgensupport.c -I$(srcdir) $(GLHACK) -lgl -lX11
+
+# Pure module. Cannot be linked dynamically.
+# -DWITH_QUANTIFY, -DWITH_PURIFY, or -DWITH_ALL_PURE
+#WHICH_PURE_PRODUCTS=-DWITH_ALL_PURE
+#PURE_INCLS=-I/usr/local/include
+#PURE_STUBLIBS=-L/usr/local/lib -lpurify_stubs -lquantify_stubs
+#pure puremodule.c $(WHICH_PURE_PRODUCTS) $(PURE_INCLS) $(PURE_STUBLIBS)
+
+# Uncommenting the following line tells makesetup that all following
+# modules are to be built as shared libraries (see above for more
+# detail; also note that *static* reverses this effect):
+
+#*shared*
+
+# GNU readline. Unlike previous Python incarnations, GNU readline is
+# now incorporated in an optional module, configured in the Setup file
+# instead of by a configure script switch. You may have to insert a
+# -L option pointing to the directory where libreadline.* lives,
+# and you may have to change -ltermcap to -ltermlib or perhaps remove
+# it, depending on your system -- see the GNU readline instructions.
+# It's okay for this to be a shared library, too.
+
+#readline readline.c -lreadline -ltermcap
+
+
+# Modules that should always be present (non UNIX dependent):
+
+#array arraymodule.c # array objects
+#cmath cmathmodule.c _math.c # -lm # complex math library functions
+#math mathmodule.c _math.c # -lm # math library functions, e.g. sin()
+#_struct _struct.c # binary structure packing/unpacking
+#time timemodule.c # -lm # time operations and variables
+#operator operator.c # operator.add() and similar goodies
+#_testcapi _testcapimodule.c # Python C API test module
+#_random _randommodule.c # Random number generator
+#_collections _collectionsmodule.c # Container types
+#_heapq _heapqmodule.c # Heapq type
+#itertools itertoolsmodule.c # Functions creating iterators for efficient looping
+#strop stropmodule.c # String manipulations
+#_functools _functoolsmodule.c # Tools for working with functions and callable objects
+#_elementtree -I$(srcdir)/Modules/expat -DHAVE_EXPAT_CONFIG_H -DUSE_PYEXPAT_CAPI _elementtree.c # elementtree accelerator
+#_pickle _pickle.c # pickle accelerator
+#datetime datetimemodule.c # date/time type
+#_bisect _bisectmodule.c # Bisection algorithms
+
+#unicodedata unicodedata.c # static Unicode character database
+
+# access to ISO C locale support
+#_locale _localemodule.c # -lintl
+
+# Standard I/O baseline
+#_io -I$(srcdir)/Modules/_io _io/bufferedio.c _io/bytesio.c _io/fileio.c _io/iobase.c _io/_iomodule.c _io/stringio.c _io/textio.c
+
+
+# Modules with some UNIX dependencies -- on by default:
+# (If you have a really backward UNIX, select and socket may not be
+# supported...)
+
+#fcntl fcntlmodule.c # fcntl(2) and ioctl(2)
+#spwd spwdmodule.c # spwd(3)
+#grp grpmodule.c # grp(3)
+#select selectmodule.c # select(2); not on ancient System V
+
+# Memory-mapped files (also works on Win32).
+#mmap mmapmodule.c
+
+# CSV file helper
+#_csv _csv.c
+
+# Socket module helper for socket(2)
+#_socket socketmodule.c timemodule.c
+
+# Socket module helper for SSL support; you must comment out the other
+# socket line above, and possibly edit the SSL variable:
+SSL=../blink/Frameworks
+_ssl _ssl.c \
+ -DUSE_SSL -I$(SSL)/include \
+ -F$(SSL) -Framework openssl -lcrypto
+
+# The crypt module is now disabled by default because it breaks builds
+# on many systems (where -lcrypt is needed), e.g. Linux (I believe).
+#
+# First, look at Setup.config; configure may have set this for you.
+
+#crypt cryptmodule.c # -lcrypt # crypt(3); needs -lcrypt on some systems
+
+
+# Some more UNIX dependent modules -- off by default, since these
+# are not supported by all UNIX systems:
+
+#nis nismodule.c -lnsl # Sun yellow pages -- not everywhere
+#termios termios.c # Steen Lumholt's termios module
+#resource resource.c # Jeremy Hylton's rlimit interface
+
+
+# Multimedia modules -- off by default.
+# These don't work for 64-bit platforms!!!
+# #993173 says audioop works on 64-bit platforms, though.
+# These represent audio samples or images as strings:
+
+#audioop audioop.c # Operations on audio samples
+#imageop imageop.c # Operations on images
+
+
+# Note that the _md5 and _sha modules are normally only built if the
+# system does not have the OpenSSL libs containing an optimized version.
+
+# The _md5 module implements the RSA Data Security, Inc. MD5
+# Message-Digest Algorithm, described in RFC 1321. The necessary files
+# md5.c and md5.h are included here.
+
+#_md5 md5module.c md5.c
+
+
+# The _sha module implements the SHA checksum algorithms.
+# (NIST's Secure Hash Algorithms.)
+#_sha shamodule.c
+#_sha256 sha256module.c
+#_sha512 sha512module.c
+
+
+# SGI IRIX specific modules -- off by default.
+
+# These module work on any SGI machine:
+
+# *** gl must be enabled higher up in this file ***
+#fm fmmodule.c $(GLHACK) -lfm -lgl # Font Manager
+#sgi sgimodule.c # sgi.nap() and a few more
+
+# This module requires the header file
+# /usr/people/4Dgifts/iristools/include/izoom.h:
+#imgfile imgfile.c -limage -lgutil -lgl -lm # Image Processing Utilities
+
+
+# These modules require the Multimedia Development Option (I think):
+
+#al almodule.c -laudio # Audio Library
+#cd cdmodule.c -lcdaudio -lds -lmediad # CD Audio Library
+#cl clmodule.c -lcl -lawareaudio # Compression Library
+#sv svmodule.c yuvconvert.c -lsvideo -lXext -lX11 # Starter Video
+
+
+# The FORMS library, by Mark Overmars, implements user interface
+# components such as dialogs and buttons using SGI's GL and FM
+# libraries. You must ftp the FORMS library separately from
+# ftp://ftp.cs.ruu.nl/pub/SGI/FORMS. It was tested with FORMS 2.2a.
+# NOTE: if you want to be able to use FORMS and curses simultaneously
+# (or both link them statically into the same binary), you must
+# compile all of FORMS with the cc option "-Dclear=__GLclear".
+
+# The FORMS variable must point to the FORMS subdirectory of the forms
+# toplevel directory:
+
+#FORMS=/ufs/guido/src/forms/FORMS
+#fl flmodule.c -I$(FORMS) $(GLHACK) $(FORMS)/libforms.a -lfm -lgl
+
+
+# SunOS specific modules -- off by default:
+
+#sunaudiodev sunaudiodev.c
+
+
+# A Linux specific module -- off by default; this may also work on
+# some *BSDs.
+
+#linuxaudiodev linuxaudiodev.c
+
+
+# George Neville-Neil's timing module:
+
+#timing timingmodule.c
+
+
+# The _tkinter module.
+#
+# The command for _tkinter is long and site specific. Please
+# uncomment and/or edit those parts as indicated. If you don't have a
+# specific extension (e.g. Tix or BLT), leave the corresponding line
+# commented out. (Leave the trailing backslashes in! If you
+# experience strange errors, you may want to join all uncommented
+# lines and remove the backslashes -- the backslash interpretation is
+# done by the shell's "read" command and it may not be implemented on
+# every system.
+
+# *** Always uncomment this (leave the leading underscore in!):
+# _tkinter _tkinter.c tkappinit.c -DWITH_APPINIT \
+# *** Uncomment and edit to reflect where your Tcl/Tk libraries are:
+# -L/usr/local/lib \
+# *** Uncomment and edit to reflect where your Tcl/Tk headers are:
+# -I/usr/local/include \
+# *** Uncomment and edit to reflect where your X11 header files are:
+# -I/usr/X11R6/include \
+# *** Or uncomment this for Solaris:
+# -I/usr/openwin/include \
+# *** Uncomment and edit for Tix extension only:
+# -DWITH_TIX -ltix8.1.8.2 \
+# *** Uncomment and edit for BLT extension only:
+# -DWITH_BLT -I/usr/local/blt/blt8.0-unoff/include -lBLT8.0 \
+# *** Uncomment and edit for PIL (TkImaging) extension only:
+# (See http://www.pythonware.com/products/pil/ for more info)
+# -DWITH_PIL -I../Extensions/Imaging/libImaging tkImaging.c \
+# *** Uncomment and edit for TOGL extension only:
+# -DWITH_TOGL togl.c \
+# *** Uncomment and edit to reflect your Tcl/Tk versions:
+# -ltk8.2 -ltcl8.2 \
+# *** Uncomment and edit to reflect where your X11 libraries are:
+# -L/usr/X11R6/lib \
+# *** Or uncomment this for Solaris:
+# -L/usr/openwin/lib \
+# *** Uncomment these for TOGL extension only:
+# -lGL -lGLU -lXext -lXmu \
+# *** Uncomment for AIX:
+# -lld \
+# *** Always uncomment this; X11 libraries to link with:
+# -lX11
+
+# Lance Ellinghaus's syslog module
+#syslog syslogmodule.c # syslog daemon interface
+
+
+# Curses support, requring the System V version of curses, often
+# provided by the ncurses library. e.g. on Linux, link with -lncurses
+# instead of -lcurses).
+#
+# First, look at Setup.config; configure may have set this for you.
+
+#_curses _cursesmodule.c -lcurses -ltermcap
+# Wrapper for the panel library that's part of ncurses and SYSV curses.
+#_curses_panel _curses_panel.c -lpanel -lncurses
+
+
+# Generic (SunOS / SVR4) dynamic loading module.
+# This is not needed for dynamic loading of Python modules --
+# it is a highly experimental and dangerous device for calling
+# *arbitrary* C functions in *arbitrary* shared libraries:
+
+#dl dlmodule.c
+
+
+# Modules that provide persistent dictionary-like semantics. You will
+# probably want to arrange for at least one of them to be available on
+# your machine, though none are defined by default because of library
+# dependencies. The Python module anydbm.py provides an
+# implementation independent wrapper for these; dumbdbm.py provides
+# similar functionality (but slower of course) implemented in Python.
+
+# The standard Unix dbm module has been moved to Setup.config so that
+# it will be compiled as a shared library by default. Compiling it as
+# a built-in module causes conflicts with the pybsddb3 module since it
+# creates a static dependency on an out-of-date version of db.so.
+#
+# First, look at Setup.config; configure may have set this for you.
+
+#dbm dbmmodule.c # dbm(3) may require -lndbm or similar
+
+# Anthony Baxter's gdbm module. GNU dbm(3) will require -lgdbm:
+#
+# First, look at Setup.config; configure may have set this for you.
+
+#gdbm gdbmmodule.c -I/usr/local/include -L/usr/local/lib -lgdbm
+
+
+# Sleepycat Berkeley DB interface.
+#
+# This requires the Sleepycat DB code, see http://www.sleepycat.com/
+# The earliest supported version of that library is 3.0, the latest
+# supported version is 4.0 (4.1 is specifically not supported, as that
+# changes the semantics of transactional databases). A list of available
+# releases can be found at
+#
+# http://www.sleepycat.com/update/index.html
+#
+# Edit the variables DB and DBLIBVERto point to the db top directory
+# and the subdirectory of PORT where you built it.
+#DB=/usr/local/BerkeleyDB.4.0
+#DBLIBVER=4.0
+#DBINC=$(DB)/include
+#DBLIB=$(DB)/lib
+#_bsddb _bsddb.c -I$(DBINC) -L$(DBLIB) -ldb-$(DBLIBVER)
+
+# Historical Berkeley DB 1.85
+#
+# This module is deprecated; the 1.85 version of the Berkeley DB library has
+# bugs that can cause data corruption. If you can, use later versions of the
+# library instead, available from <http://www.sleepycat.com/>.
+
+#DB=/depot/sundry/src/berkeley-db/db.1.85
+#DBPORT=$(DB)/PORT/irix.5.3
+#bsddb185 bsddbmodule.c -I$(DBPORT)/include -I$(DBPORT) $(DBPORT)/libdb.a
+
+
+
+# Helper module for various ascii-encoders
+#binascii binascii.c
+
+# Fred Drake's interface to the Python parser
+#parser parsermodule.c
+
+# cStringIO and cPickle
+#cStringIO cStringIO.c
+#cPickle cPickle.c
+
+
+# Lee Busby's SIGFPE modules.
+# The library to link fpectl with is platform specific.
+# Choose *one* of the options below for fpectl:
+
+# For SGI IRIX (tested on 5.3):
+#fpectl fpectlmodule.c -lfpe
+
+# For Solaris with SunPro compiler (tested on Solaris 2.5 with SunPro C 4.2):
+# (Without the compiler you don't have -lsunmath.)
+#fpectl fpectlmodule.c -R/opt/SUNWspro/lib -lsunmath -lm
+
+# For other systems: see instructions in fpectlmodule.c.
+#fpectl fpectlmodule.c ...
+
+# Test module for fpectl. No extra libraries needed.
+#fpetest fpetestmodule.c
+
+# Andrew Kuchling's zlib module.
+# This require zlib 1.1.3 (or later).
+# See http://www.gzip.org/zlib/
+#zlib zlibmodule.c -I$(prefix)/include -L$(exec_prefix)/lib -lz
+
+# Interface to the Expat XML parser
+#
+# Expat was written by James Clark and is now maintained by a group of
+# developers on SourceForge; see www.libexpat.org for more
+# information. The pyexpat module was written by Paul Prescod after a
+# prototype by Jack Jansen. Source of Expat 1.95.2 is included in
+# Modules/expat/. Usage of a system shared libexpat.so/expat.dll is
+# not advised.
+#
+# More information on Expat can be found at www.libexpat.org.
+#
+#pyexpat expat/xmlparse.c expat/xmlrole.c expat/xmltok.c pyexpat.c -I$(srcdir)/Modules/expat -DHAVE_EXPAT_CONFIG_H -DUSE_PYEXPAT_CAPI
+
+
+# Hye-Shik Chang's CJKCodecs
+
+# multibytecodec is required for all the other CJK codec modules
+#_multibytecodec cjkcodecs/multibytecodec.c
+
+#_codecs_cn cjkcodecs/_codecs_cn.c
+#_codecs_hk cjkcodecs/_codecs_hk.c
+#_codecs_iso2022 cjkcodecs/_codecs_iso2022.c
+#_codecs_jp cjkcodecs/_codecs_jp.c
+#_codecs_kr cjkcodecs/_codecs_kr.c
+#_codecs_tw cjkcodecs/_codecs_tw.c
+
+# Example -- included for reference only:
+# xx xxmodule.c
+
+# Another example -- the 'xxsubtype' module shows C-level subtyping in action
+xxsubtype xxsubtype.c
diff -Naur tmp/Python-2.7.13/Modules/Setup.config Python-2.7.13/Modules/Setup.config
--- tmp/Python-2.7.13/Modules/Setup.config 1970-01-01 01:00:00.000000000 +0100
+++ Python-2.7.13/Modules/Setup.config 2018-12-09 15:27:27.000000000 +0100
@@ -0,0 +1,13 @@
+# This file is transmogrified into Setup.config by config.status.
+
+# The purpose of this file is to conditionally enable certain modules
+# based on configure-time options.
+
+# Threading
+thread threadmodule.c
+
+# The signal module
+signal signalmodule.c
+
+# The rest of the modules previously listed in this file are built
+# by the setup.py script in Python 2.1 and later.
diff -Naur tmp/Python-2.7.13/Modules/Setup.dist Python-2.7.13/Modules/Setup.dist
--- tmp/Python-2.7.13/Modules/Setup.dist 2016-12-17 21:05:07.000000000 +0100
+++ Python-2.7.13/Modules/Setup.dist 2018-12-09 15:27:27.000000000 +0100
@@ -215,10 +215,10 @@
# Socket module helper for SSL support; you must comment out the other
# socket line above, and possibly edit the SSL variable:
-#SSL=/usr/local/ssl
-#_ssl _ssl.c \
-# -DUSE_SSL -I$(SSL)/include -I$(SSL)/include/openssl \
-# -L$(SSL)/lib -lssl -lcrypto
+SSL=../blink/Frameworks
+_ssl _ssl.c \
+ -DUSE_SSL -I$(SSL)/include \
+ -F$(SSL) -Framework openssl -lcrypto
# The crypt module is now disabled by default because it breaks builds
# on many systems (where -lcrypt is needed), e.g. Linux (I believe).
diff -Naur tmp/Python-2.7.13/Modules/Setup.local Python-2.7.13/Modules/Setup.local
--- tmp/Python-2.7.13/Modules/Setup.local 1970-01-01 01:00:00.000000000 +0100
+++ Python-2.7.13/Modules/Setup.local 2018-12-09 15:27:27.000000000 +0100
@@ -0,0 +1 @@
+# Edit this file for local setup changes
diff -Naur tmp/Python-2.7.13/Modules/_ctypes/malloc_closure.c Python-2.7.13/Modules/_ctypes/malloc_closure.c
--- tmp/Python-2.7.13/Modules/_ctypes/malloc_closure.c 2016-12-17 21:05:07.000000000 +0100
+++ Python-2.7.13/Modules/_ctypes/malloc_closure.c 2018-12-09 15:27:27.000000000 +0100
@@ -75,7 +75,7 @@
#endif
#ifdef MALLOC_CLOSURE_DEBUG
- printf("block at %p allocated (%d bytes), %d ITEMs\n",
+ fprintf(thread_stdout, "block at %p allocated (%d bytes), %d ITEMs\n",
item, count * sizeof(ITEM), count);
#endif
/* put them into the free list */
diff -Naur tmp/Python-2.7.13/Modules/_multiprocessing/connection.h Python-2.7.13/Modules/_multiprocessing/connection.h
--- tmp/Python-2.7.13/Modules/_multiprocessing/connection.h 2016-12-17 21:05:07.000000000 +0100
+++ Python-2.7.13/Modules/_multiprocessing/connection.h 2018-12-09 15:27:27.000000000 +0100
@@ -474,7 +474,7 @@
" Connection(handle, readable=True, writable=True).\n\n"
"The constructor does *not* duplicate the handle.");
-PyTypeObject CONNECTION_TYPE = {
+__thread PyTypeObject CONNECTION_TYPE = {
PyVarObject_HEAD_INIT(NULL, 0)
/* tp_name */ "_multiprocessing." CONNECTION_NAME,
/* tp_basicsize */ sizeof(ConnectionObject),
diff -Naur tmp/Python-2.7.13/Modules/_multiprocessing/multiprocessing.c Python-2.7.13/Modules/_multiprocessing/multiprocessing.c
--- tmp/Python-2.7.13/Modules/_multiprocessing/multiprocessing.c 2016-12-17 21:05:07.000000000 +0100
+++ Python-2.7.13/Modules/_multiprocessing/multiprocessing.c 2018-12-09 15:27:27.000000000 +0100
@@ -16,8 +16,8 @@
PyObject *create_win32_namespace(void);
-PyObject *pickle_dumps, *pickle_loads, *pickle_protocol;
-PyObject *ProcessError, *BufferTooShort;
+__thread PyObject *pickle_dumps, *pickle_loads, *pickle_protocol;
+__thread PyObject *ProcessError, *BufferTooShort;
/*
* Function which raises exceptions based on error codes
diff -Naur tmp/Python-2.7.13/Modules/_multiprocessing/multiprocessing.h Python-2.7.13/Modules/_multiprocessing/multiprocessing.h
--- tmp/Python-2.7.13/Modules/_multiprocessing/multiprocessing.h 2016-12-17 21:05:07.000000000 +0100
+++ Python-2.7.13/Modules/_multiprocessing/multiprocessing.h 2018-12-09 15:27:27.000000000 +0100
@@ -130,14 +130,14 @@
* Externs - not all will really exist on all platforms
*/
-extern PyObject *pickle_dumps;
-extern PyObject *pickle_loads;
-extern PyObject *pickle_protocol;
-extern PyObject *BufferTooShort;
-extern PyTypeObject SemLockType;
-extern PyTypeObject ConnectionType;
-extern PyTypeObject PipeConnectionType;
-extern HANDLE sigint_event;
+__thread extern PyObject *pickle_dumps;
+__thread extern PyObject *pickle_loads;
+__thread extern PyObject *pickle_protocol;
+__thread extern PyObject *BufferTooShort;
+__thread extern PyTypeObject SemLockType;
+__thread extern PyTypeObject ConnectionType;
+__thread extern PyTypeObject PipeConnectionType;
+__thread extern HANDLE sigint_event;
/*
* Py3k compatibility
diff -Naur tmp/Python-2.7.13/Modules/_multiprocessing/semaphore.c Python-2.7.13/Modules/_multiprocessing/semaphore.c
--- tmp/Python-2.7.13/Modules/_multiprocessing/semaphore.c 2016-12-17 21:05:07.000000000 +0100
+++ Python-2.7.13/Modules/_multiprocessing/semaphore.c 2018-12-09 15:27:27.000000000 +0100
@@ -598,7 +598,7 @@
* Semaphore type
*/
-PyTypeObject SemLockType = {
+__thread PyTypeObject SemLockType = {
PyVarObject_HEAD_INIT(NULL, 0)
/* tp_name */ "_multiprocessing.SemLock",
/* tp_basicsize */ sizeof(SemLockObject),
diff -Naur tmp/Python-2.7.13/Modules/_ssl.c Python-2.7.13/Modules/_ssl.c
--- tmp/Python-2.7.13/Modules/_ssl.c 2016-12-17 21:05:07.000000000 +0100
+++ Python-2.7.13/Modules/_ssl.c 2018-12-09 15:27:27.000000000 +0100
@@ -776,7 +776,7 @@
value = X509_NAME_ENTRY_get_data(entry);
attr = _create_tuple_for_attribute(name, value);
/*
- fprintf(stderr, "RDN level %d, attribute %s: %s\n",
+ fprintf(thread_stderr, "RDN level %d, attribute %s: %s\n",
entry->set,
PyBytes_AS_STRING(PyTuple_GET_ITEM(attr, 0)),
PyBytes_AS_STRING(PyTuple_GET_ITEM(attr, 1)));
diff -Naur tmp/Python-2.7.13/Modules/bsddbmodule.c Python-2.7.13/Modules/bsddbmodule.c
--- tmp/Python-2.7.13/Modules/bsddbmodule.c 2016-12-17 21:05:07.000000000 +0100
+++ Python-2.7.13/Modules/bsddbmodule.c 2018-12-09 15:27:27.000000000 +0100
@@ -17,6 +17,7 @@
#ifdef WITH_THREAD
#include "pythread.h"
#endif
+#include "ios_error.h"
#include <sys/types.h>
#include <sys/stat.h>
@@ -223,7 +224,7 @@
status = (dp->di_bsddb->close)(dp->di_bsddb);
Py_END_ALLOW_THREADS
if (status != 0)
- fprintf(stderr,
+ fprintf(thread_stderr,
"Python bsddb: close errno %d in dealloc\n",
errno);
}
@@ -582,6 +583,8 @@
BSDDB_END_SAVE(dp)
if (status == 0) {
if ((kdata == NULL) || (ddata == NULL))
+ if (kdata != NULL) free(kdata);
+ if (ddata != NULL) free(ddata);
return PyErr_NoMemory();
}
else {
diff -Naur tmp/Python-2.7.13/Modules/config.c Python-2.7.13/Modules/config.c
--- tmp/Python-2.7.13/Modules/config.c 1970-01-01 01:00:00.000000000 +0100
+++ Python-2.7.13/Modules/config.c 2018-12-09 15:27:27.000000000 +0100
@@ -0,0 +1,187 @@
+/* Generated automatically from ./Modules/config.c.in by makesetup. */
+/* -*- C -*- ***********************************************
+Copyright (c) 2000, BeOpen.com.
+Copyright (c) 1995-2000, Corporation for National Research Initiatives.
+Copyright (c) 1990-1995, Stichting Mathematisch Centrum.
+All rights reserved.
+
+See the file "Misc/COPYRIGHT" for information on usage and
+redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+******************************************************************/
+
+/* Module configuration */
+
+/* !!! !!! !!! This file is edited by the makesetup script !!! !!! !!! */
+// iOS: edited by hand, because cross-compilation //
+// Missing: openssl module (ssl is there)
+
+/* This file contains the table of built-in modules.
+ See init_builtin() in import.c. */
+
+#include "Python.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+extern void initarray(void);
+extern void initbinascii(void);
+extern void initcmath(void);
+extern void initfuture_builtins(void);
+extern void initmath(void);
+extern void init_md5(void);
+extern void initnt(void);
+extern void initoperator(void);
+extern void initstrop(void);
+extern void inittime(void);
+extern void initthread(void);
+
+extern void init_hashlib(void);
+extern void init_sha(void);
+extern void init_sha256(void);
+extern void init_sha512(void);
+extern void init_locale(void);
+extern void init_socket(void);
+extern void initsyslog(void);
+extern void initgrp(void);
+extern void initfcntl(void);
+extern void initcrypt(void);
+extern void initselect(void);
+extern void initpyexpat(void);
+extern void init_ctypes(void);
+extern void initunicodedata(void);
+extern void initbz2(void);
+
+extern void initsignal(void);
+extern void initposix(void);
+extern void initerrno(void);
+extern void initpwd(void);
+extern void init_sre(void);
+extern void init_codecs(void);
+extern void init_weakref(void);
+extern void initzipimport(void);
+extern void init_symtable(void);
+extern void init_ssl(void);
+extern void initxxsubtype(void);
+
+extern void initcStringIO(void);
+extern void initcPickle(void);
+extern void init_hotshot(void);
+extern void init_random(void);
+extern void inititertools(void);
+extern void init_collections(void);
+extern void init_heapq(void);
+extern void init_bisect(void);
+extern void initmmap(void);
+extern void init_csv(void);
+extern void initparser(void);
+extern void init_struct(void);
+extern void initdatetime(void);
+extern void init_functools(void);
+extern void init_json(void);
+extern void initzlib(void);
+
+extern void init_lsprof(void);
+extern void init_io(void);
+
+
+/* -- ADDMODULE MARKER 1 -- */
+
+extern void PyMarshal_Init(void);
+extern void initimp(void);
+extern void initgc(void);
+extern void init_ast(void);
+extern void _PyWarnings_Init(void);
+
+struct _inittab _PyImport_Inittab[] = {
+ {"array", initarray},
+ {"binascii", initbinascii},
+ {"cmath", initcmath},
+ {"future_builtins", initfuture_builtins},
+ {"math", initmath},
+ {"_md5", init_md5},
+ {"operator", initoperator},
+ {"strop", initstrop},
+ {"time", inittime},
+
+ {"_hash", init_hashlib},
+ {"_sha", init_sha},
+ {"_sha256", init_sha256},
+ {"_sha512", init_sha512},
+ {"_locale", init_locale},
+ {"_socket", init_socket},
+ {"syslog", initsyslog},
+ {"grp", initgrp},
+ {"fcntl", initfcntl},
+ {"crypt", initcrypt},
+ {"select", initselect},
+ {"pyexpat", initpyexpat},
+ {"_ctypes", init_ctypes},
+ {"unicodedata", initunicodedata},
+ {"bz2", initbz2},
+
+ {"thread", initthread},
+ {"signal", initsignal},
+ {"posix", initposix},
+ {"cStringIO", initcStringIO},
+ {"cPickle", initcPickle},
+
+ {"_hotshot", init_hotshot},
+ {"_random", init_random},
+ {"_bisect", init_bisect},
+ {"_heapq", init_heapq},
+ {"_lsprof", init_lsprof},
+ {"itertools", inititertools},
+ {"_collections", init_collections},
+ {"mmap", initmmap},
+ {"_csv", init_csv},
+ {"parser", initparser},
+ {"_struct", init_struct},
+ {"datetime", initdatetime},
+ {"_functools", init_functools},
+ {"_json", init_json},
+
+ {"zlib", initzlib},
+
+ {"errno", initerrno},
+ {"pwd", initpwd},
+ {"_sre", init_sre},
+ {"_codecs", init_codecs},
+ {"_weakref", init_weakref},
+ {"zipimport", initzipimport},
+ {"_symtable", init_symtable},
+ {"_ssl", init_ssl},
+ {"xxsubtype", initxxsubtype},
+
+/* -- ADDMODULE MARKER 2 -- */
+
+ /* This module lives in marshal.c */
+ {"marshal", PyMarshal_Init},
+
+ /* This lives in import.c */
+ {"imp", initimp},
+
+ /* This lives in Python/Python-ast.c */
+ {"_ast", init_ast},
+
+ /* These entries are here for sys.builtin_module_names */
+ {"__main__", NULL},
+ {"__builtin__", NULL},
+ {"sys", NULL},
+ {"exceptions", NULL},
+ {"_io", init_io},
+
+ /* This lives in gcmodule.c */
+ {"gc", initgc},
+
+ /* This lives in _warnings.c */
+ {"_warnings", _PyWarnings_Init},
+
+ /* Sentinel */
+ {0, 0}
+};
+
+
+#ifdef __cplusplus
+}
+#endif
diff -Naur tmp/Python-2.7.13/Modules/config_sharedlibs.c Python-2.7.13/Modules/config_sharedlibs.c
--- tmp/Python-2.7.13/Modules/config_sharedlibs.c 1970-01-01 01:00:00.000000000 +0100
+++ Python-2.7.13/Modules/config_sharedlibs.c 2018-12-09 15:27:27.000000000 +0100
@@ -0,0 +1,97 @@
+/* Generated automatically from ./Modules/config.c.in by makesetup. */
+/* -*- C -*- ***********************************************
+Copyright (c) 2000, BeOpen.com.
+Copyright (c) 1995-2000, Corporation for National Research Initiatives.
+Copyright (c) 1990-1995, Stichting Mathematisch Centrum.
+All rights reserved.
+
+See the file "Misc/COPYRIGHT" for information on usage and
+redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+******************************************************************/
+
+/* Module configuration */
+
+/* !!! !!! !!! This file is edited by the makesetup script !!! !!! !!! */
+
+/* This file contains the table of built-in modules.
+ See init_builtin() in import.c. */
+
+#include "Python.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+extern void initthread(void);
+extern void initsignal(void);
+extern void initposix(void);
+extern void initerrno(void);
+extern void initpwd(void);
+extern void init_sre(void);
+extern void init_codecs(void);
+extern void init_weakref(void);
+extern void initzipimport(void);
+extern void init_symtable(void);
+extern void init_ssl(void);
+// extern void initopenssl(void);
+extern void SSL_library_init(void);
+extern void initxxsubtype(void);
+
+/* -- ADDMODULE MARKER 1 -- */
+
+extern void PyMarshal_Init(void);
+extern void initimp(void);
+extern void initgc(void);
+extern void init_ast(void);
+extern void _PyWarnings_Init(void);
+
+struct _inittab _PyImport_Inittab[] = {
+
+ {"thread", initthread},
+ {"signal", initsignal},
+ {"posix", initposix},
+ {"errno", initerrno},
+ {"pwd", initpwd},
+ {"_sre", init_sre},
+ {"_codecs", init_codecs},
+ {"_weakref", init_weakref},
+ {"zipimport", initzipimport},
+ {"_symtable", init_symtable},
+ {"_ssl", init_ssl},
+ // ??? iOS
+ // {"openssl", initopenssl},
+ {"openssl", SSL_library_init},
+ {"xxsubtype", initxxsubtype},
+
+/* -- ADDMODULE MARKER 2 -- */
+
+ /* This module lives in marshal.c */
+ {"marshal", PyMarshal_Init},
+
+ /* This lives in import.c */
+ {"imp", initimp},
+
+ /* This lives in Python/Python-ast.c */
+ {"_ast", init_ast},
+
+ /* These entries are here for sys.builtin_module_names */
+ {"__main__", NULL},
+ {"__builtin__", NULL},
+ {"sys", NULL},
+ {"exceptions", NULL},
+
+ /* This lives in gcmodule.c */
+ {"gc", initgc},
+
+ /* This lives in _warnings.c */
+ {"_warnings", _PyWarnings_Init},
+
+ /* Sentinel */
+ {0, 0}
+};
+
+
+#ifdef __cplusplus
+}
+#endif
diff -Naur tmp/Python-2.7.13/Modules/expat/xmlparse.c Python-2.7.13/Modules/expat/xmlparse.c
--- tmp/Python-2.7.13/Modules/expat/xmlparse.c 2016-12-17 21:05:07.000000000 +0100
+++ Python-2.7.13/Modules/expat/xmlparse.c 2018-12-09 15:27:27.000000000 +0100
@@ -13,7 +13,7 @@
#elif defined(__WATCOMC__)
#include "watcomconfig.h"
#elif defined(HAVE_EXPAT_CONFIG_H)
-#include <expat_config.h>
+#include "expat_config.h"
#endif /* ndef COMPILED_FROM_DSP */
#include <stddef.h>
diff -Naur tmp/Python-2.7.13/Modules/expat/xmlrole.c Python-2.7.13/Modules/expat/xmlrole.c
--- tmp/Python-2.7.13/Modules/expat/xmlrole.c 2016-12-17 21:05:07.000000000 +0100
+++ Python-2.7.13/Modules/expat/xmlrole.c 2018-12-09 15:27:27.000000000 +0100
@@ -14,7 +14,7 @@
#include "watcomconfig.h"
#else
#ifdef HAVE_EXPAT_CONFIG_H
-#include <expat_config.h>
+#include "expat_config.h"
#endif
#endif /* ndef COMPILED_FROM_DSP */
diff -Naur tmp/Python-2.7.13/Modules/expat/xmltok.c Python-2.7.13/Modules/expat/xmltok.c
--- tmp/Python-2.7.13/Modules/expat/xmltok.c 2016-12-17 21:05:07.000000000 +0100
+++ Python-2.7.13/Modules/expat/xmltok.c 2018-12-09 15:27:27.000000000 +0100
@@ -14,7 +14,7 @@
#include "watcomconfig.h"
#else
#ifdef HAVE_EXPAT_CONFIG_H
-#include <expat_config.h>
+#include "expat_config.h"
#endif
#endif /* ndef COMPILED_FROM_DSP */
diff -Naur tmp/Python-2.7.13/Modules/fpectlmodule.c Python-2.7.13/Modules/fpectlmodule.c
--- tmp/Python-2.7.13/Modules/fpectlmodule.c 2016-12-17 21:05:07.000000000 +0100
+++ Python-2.7.13/Modules/fpectlmodule.c 2018-12-09 15:27:27.000000000 +0100
@@ -75,7 +75,8 @@
#include <starlet.h>
#include <ieeedef.h>
#endif
-
+#include "ios_error.h"
+
#ifndef WANT_SIGFPE_HANDLER
/* Define locally if they are not defined in Python. This gives only