Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
sagemathinc
GitHub Repository: sagemathinc/wapython
Path: blob/main/python/cpython/src/Setup.local-native
1067 views
# This is all we need for installing the wasm cpython.  We can't build anything dynamically
# natively due to bugs in zig...
# Right now all the modules fail to compile, but if you do:
#   make BLDSHARED="zig cc -shared -bundle -undefined dynamic_lookup -lpython3.11 -lz"
# then they compile, but then zig segfaults. This is something to keep trying as
# zig matures, I guess.


*static*

_lzma _lzmamodule.c -I$(abs_srcdir)/../../../lzma-native/dist/native/include/ $(abs_srcdir)/../../../lzma-native/dist/native/lib/liblzma.a $(abs_srcdir)/../../../termcap-native/dist/native/lib/libtermcap.a
readline readline.c -I$(abs_srcdir)/../../../libedit-native/dist/native/include/ $(abs_srcdir)/../../../libedit-native/dist/native/lib/libedit.a $(abs_srcdir)/../../../termcap-native/dist/native/lib/libtermcap.a
_struct _struct.c
binascii binascii.c
zlib  zlibmodule.c -lz
_posixsubprocess _posixsubprocess.c
_asyncio _asynciomodule.c
_bisect _bisectmodule.c
_contextvars _contextvarsmodule.c
_csv _csv.c
_datetime _datetimemodule.c
_decimal _decimal/_decimal.c
_heapq _heapqmodule.c
_json _json.c
_lsprof _lsprof.c rotatingtree.c
_multiprocessing -I$(srcdir)/Modules/_multiprocessing _multiprocessing/multiprocessing.c _multiprocessing/semaphore.c
_opcode _opcode.c
_pickle _pickle.c
_queue _queuemodule.c
_random _randommodule.c
_socket socketmodule.c
_statistics _statisticsmodule.c
_struct _struct.c
_typing _typingmodule.c
_zoneinfo _zoneinfo.c
array arraymodule.c
audioop audioop.c
binascii binascii.c
cmath cmathmodule.c
math mathmodule.c
mmap mmapmodule.c
select selectmodule.c

# XML
_elementtree _elementtree.c
pyexpat pyexpat.c

# hashing builtins
_blake2 _blake2/blake2module.c _blake2/blake2b_impl.c _blake2/blake2s_impl.c
_md5 md5module.c
_sha1 sha1module.c
_sha256 sha256module.c
_sha512 sha512module.c
_sha3 _sha3/sha3module.c

# text encodings and unicode
_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
_multibytecodec cjkcodecs/multibytecodec.c
unicodedata unicodedata.c

# Modules with some UNIX dependencies

_posixsubprocess _posixsubprocess.c
_posixshmem -I$(srcdir)/Modules/_multiprocessing _multiprocessing/posixshmem.c -lrt
fcntl fcntlmodule.c
grp grpmodule.c
#ossaudiodev ossaudiodev.c
resource resource.c
syslog syslogmodule.c
termios termios.c

# OpenSSL bindings.  Just statically link them for simplicity since we will never distribution our python-native.
# This is not *used*, but is likely going to be useful for development since we can see precisely how python-native
# does something, to make implementing it in python-wasm easier.
# _ssl _ssl.c -DOPENSSL_THREADS -I$(abs_srcdir)/../../../openssl-native/dist/native/include $(abs_srcdir)/../../../openssl-native/dist/native/lib/libssl.a $(abs_srcdir)/../../../openssl-native/dist/native/lib/libcrypto.a
# _hashlib _hashopenssl.c -DOPENSSL_THREADS -I$(abs_srcdir)/../../../openssl-native/dist/native/include $(abs_srcdir)/../../../openssl-native/dist/native/lib/libcrypto.a