Commit Graph

68 Commits

Author SHA1 Message Date
Hood Chatham 07a06070e0
Make sysconfigdata relocatable (#4573)
This replaces PYODIDE_ROOT with a variable in all places in the
sysconfigdata. It fixes out of tree numpy build.
2024-02-27 22:12:23 -08:00
Hood Chatham d2c0b5b1f6
Fix linking of libhacl and tidy up cpython makefile (#4482) 2024-02-08 20:17:00 +09:00
Hood Chatham fb31fff09a
Upgrade to Python 3.12.1 (#4435) 2024-02-03 19:25:45 -08:00
Hood Chatham 1a9c0d3da0
Maintainers docs on releases, docker images, python updates (#4470) 2024-02-03 15:26:00 -08:00
Hood Chatham 7a7696bc0f
MAINT sysconfigdata updates split from #4435 (#4467) 2024-02-03 10:24:09 +09:00
Hood Chatham d6ccedfa29
MAINT python build improvements for 3.12 (#4432)
* use PYMAJOR and PYMINOR variables in --with-build-python option
* reorder sysconfigdata creation
2024-01-27 15:14:54 -08:00
Hood Chatham b460383505
Use hoodmane/hiwire library instead of our own implementation (#4128)
This change switches to my external implementation of hiwire. This is the
minimal change set to do this, it uses some hacks to avoid changing any files
outside of `hiwire.{c,h,js}`. In followups, I will gradually switch to using
the new APIs rather than compatibility shims.
2023-09-23 18:21:19 -07:00
Hood Chatham a24d69e953
MAINT use the correct version of Python in the cpython makefile (#4168) 2023-09-23 14:40:22 -07:00
Hood Chatham b57beb1e36
MAINT Add a rebuild makefile rule for Python [skip ci] (#4166) 2023-09-22 11:55:38 -07:00
Hood Chatham b67660ff9d
BLD Add CPYTHON_DEBUG environment variable to request a debug Python (#3966) 2023-06-28 17:01:15 -07:00
Hood Chatham 71cc8bc925 Revert "MAINT Use sigstore to validate Python source signature (#3916)"
This reverts commit 59bb655957.
2023-06-12 15:16:55 -07:00
Hood Chatham 59bb655957
MAINT Use sigstore to validate Python source signature (#3916)
This should make Python updates a little easier and more secure.

See: python.org/download/sigstore
2023-06-12 12:28:44 -07:00
Gyeongjae Choi 73c497bfbe
Remove in-tree dependency when building unvendored python modules (#3864) 2023-06-05 19:48:48 +09:00
Hood Chatham 32ccad8f6e
Use upstream libffi (#3629) 2023-04-01 17:32:38 -07:00
Gyeongjae Choi ed3ae1ba49
Download standard libraries in a zipfile (#3582) 2023-03-01 23:11:30 +01:00
Gyeongjae Choi 9e1e575dfe
Deepfreeze essential parts of the encodings module (#3585) 2023-02-22 18:40:05 +09:00
Hood Chatham 3b2952fc92
Python3.11 (#3252) 2023-01-23 19:45:59 -08:00
Gyeongjae Choi 26535e33cd
Unvendor sqlite3 from stdlib (#2946)
Unvendor the standard library sqlite3 to reduce the size of the main module. It reduces the size of pyodide.asm.wasm around ~1.4MB.

Co-authored-by: Hood Chatham <roberthoodchatham@gmail.com>
2022-08-22 08:52:50 +09:00
Gyeongjae Choi a72ce423b4
BLD Use emscripten ports of bzip and zlib when building cpython (#2912) 2022-07-28 10:17:58 +02:00
Hood Chatham 52287a179d
More work on create_xbuildenv to allow building numpy (#2811)
This is more WIP on create_xbuildenv. I am including some of the WASM_LIB_DIR
but not all of it to keep size in check. The current cross build environment that we
would upload/download is 20mb.

To use this, we need an extra CLI entrypoint which I am working on.
2022-07-01 11:20:45 -07:00
Hood Chatham 55a53df4a5
Update libffi tag (#2772)
Since the Emscripten update, libffi can support closures with up to 1000 arguments.
2022-06-23 12:05:40 -07:00
Hood Chatham 8a8629f2c6
MAINT Switch to using a tag to version libffi port (#2673) 2022-06-08 21:37:24 +02:00
Hood Chatham 2f4f258bb5
MAINT Use target sysconfigdata rather than host sysconfigdata when cross compiling (#2516)
sysconfig.py uses the environment variable `_PYTHON_SYSCONFIGDATA_NAME`
to decide where to look for the sysconfig data file with info about the compile target.
We also need to separately insure that our sysconfig data file is on the path. We
don't want the rest of our target stdlib on the path, so I made an extra sysconfigdata
folder, copied the sysconfig data into it, and put it on the path.
2022-05-29 18:59:10 -07:00
Ryan May 91fd7dbe89
Fix building CPython on macos (Fixes #2360) (#2554)
Updates the Makefile to avoid separating the source command from the build.
2022-05-12 15:50:01 -07:00
stonebig be59fae4f4
upgrade to SQLIte-3.38.5 (#2518) 2022-05-08 09:56:59 +09:00
echorand (Amit Saha) 213288f200
ENH Update sqlite (#2477) 2022-05-04 14:18:07 -06:00
Hood Chatham eb8afb00c2
Update libffi commit (#2350)
All libffi tests pass now. The only failing ctypes test is test_callback_too_many_args which doesn't segfault anymore, it only soft fails. Planning to submit a PR to cpython that fixes test_callback_too_many_args.
See also:
bugs.python.org/issue47208
https://github.com/emscripten-core/emscripten/pull/16658
2022-04-04 21:18:20 -07:00
Hood Chatham 37057d1704
Set PLATFORM_TRIPLET, include platform in so names, only load compatible so files (#2299)
For reasons that are a bit beyond me, `--host` and `PLATFORM_TRIPLET`
seem to be independent, in particular we've had an empty
`PLATFORM_TRIPLET`. This is unfortunate because `PLATFORM_TRIPLET`
is used to generate the SOABI config variable which in turn is used
to decide whether a .so file is a good match for loading. We'd like
for linux Pythons not to try to import emscripten .so files (it
raises `ImportError: some_file.so: invalid ELF header`). Similarly,
we'd like to avoid attempting to load linux .so files in wasm. These
platform tags are our friends.

Anyways, this PR sets `PLATFORM_TRIPLET` and ensures that .so files
built by pywasmcross are tagged with our SOABI tag.

I moved the .so file renaming from pywasmcross to buildpkg just
before running the post script. That is a better place to put it in
case the package wants to look at the .so file after linking it. It
might be surprised that we moved it.

I also improved the error message if we try to `loadWebAssemblyModule`
something that is actually say a Linux .so file and updated get_dynlibs
to filter out .so files that have an incompatible abi tag.
2022-03-28 20:07:36 -07:00
Hood Chatham 22fab55b04
MAINT Bump zlib version (#2327)
Apparently zlib v1.2.11 had an out of bounds memory access bug so
they yanked it. This bumps the version and gets the build working
again.
2022-03-28 18:17:25 -07:00
Hood Chatham 0e1e2ac01c
Python 3.10 (#2225) 2022-03-17 15:48:56 -07:00
Hood Chatham 19261f394c
Remove function pointer cast emulation (#2019) 2021-12-09 10:31:21 -08:00
Jan Max Meyer ebb75cd334
ENH Makefile targets for cpython partial and full clean (#1969) 2021-11-16 20:22:50 +01:00
Hood Chatham 6eac16825c
Update libffi to tip of tree (#1760) 2021-07-30 16:54:27 +02:00
Paul m. p. P d4a705bde2
Use PYMAJOR/PYMINOR according to Python devguide (#1570)
Co-authored-by: Roman Yurchak <rth.yurchak@gmail.com>
2021-07-06 13:28:39 +02:00
Hood Chatham 46eee26ff8
Various improvements in core (#1673) 2021-07-01 10:47:44 -07:00
Hood Chatham 447da28e80
Up to date libffi port (with varargs support) (#1674) 2021-06-29 19:01:19 -07:00
Hood Chatham 653891b045
ENH Add Ctypes support (#1656) 2021-06-26 10:34:31 +02:00
dmondev 67678a6c7f
getting bzip2,libxml,libxslt from http instead of ftp (#1400) 2021-03-31 21:04:58 -07:00
joemarshall b22b4f0c9e
Move all configuration variables for compile into Makefile.envs (#1369) 2021-03-26 15:37:59 +01:00
joemarshall 1bd8380c01
Emscripten 2.0.12 Upstream backend (#1102)
Co-authored-by: Dexter Chua <dalcde@users.noreply.github.com>
Co-authored-by: Roman Yurchak <rth.yurchak@gmail.com>
2021-02-06 08:58:12 +01:00
Dexter Chua 5f3528fb74
BLD Remover linker flags when building cpython (#1137)
We never link when building cpython; we simply generate object files and
put them in an archive.
2021-01-15 10:45:24 +01:00
Dexter Chua 72555048b6
BLD Don't copy artifacts to root (#1096) 2021-01-10 18:19:34 +01:00
Dexter Chua 2aa8982990
Actually generate a sysconfigdata.py (#1044)
Previously, we simply copied from the host, which has wildly incorrect
values. Fixes #1042
2021-01-05 14:14:55 +01:00
Dexter Chua 2dfeba4c05
Build with -fPIC (#1008)
This is needed for the upstream backend, and I believe is a noop under
the fastcomp backend

Co-authored-by: Michael Droettboom <mdboom@gmail.com>
Co-authored-by: Joe Marshall <joe.marshall@nottingham.ac.uk>
2021-01-02 09:17:14 +01:00
Dexter Chua 208fa57bcf
Explicitly tell sqlite popen is not available (#999) 2021-01-01 10:45:44 +01:00
Nicolas Ollinger 5d19ab2a3e
FIX update bzip2 url (#868) 2020-12-16 17:55:05 +01:00
Dexter Chua 452b379363
Upgrade to emscripten 1.38.42 (#843) 2020-12-15 08:56:43 +01:00
Dexter Chua e8cc4e8835
PKG Configure zlib, not patch (#849)
The #include <unistd.h> line is added in zconf.h, which is generated by
configure.
2020-12-12 12:33:33 +01:00
Dexter Chua 0d2a9f9ffe
BLD Remove undefined flags (#842)
In python's Makefile generated by makesetup, SQLITEBUILD and BZIP2BUILD
are not defined, so we are left with empty -I and -L commands. These
manage to build by virtue of us inserting -I/path/to/sqlite and
-I/path/to/bzip2 to every single build command.

This commit does the same for zlib for consistency.
2020-12-10 20:38:47 +01:00
Dexter Chua 0defcb3825
BLD Don't compile host python (#830) 2020-12-08 00:19:16 +01:00