Commit Graph

140 Commits

Author SHA1 Message Date
Gyeongjae Choi df0460ae4f TST Fix S3 test (#5347) 2025-01-23 11:20:12 +01:00
Agriya Khetarpal b0be236d9b
Temporarily pin maturin <1.8 (#5285) 2024-12-31 00:24:09 +05:30
Agriya Khetarpal f831fc9445
Fix regression in `pplpy` build, update `cysignals` to version 1.12.2 (#5267) 2024-12-20 10:17:07 +09:00
Christian Clauss 5669d58e6b
Ruff rules for comprehensions and performance (#5230) 2024-12-19 15:59:16 +01:00
Agriya Khetarpal e6d4baeae5
Update to NumPy v2 and bump versions for several dependent packages (#4925)
Co-authored-by: Gyeongjae Choi <def6488@gmail.com>
Co-authored-by: Hood Chatham <roberthoodchatham@gmail.com>
2024-12-19 19:10:20 +05:30
Gyeongjae Choi b6ce33c42d
Unpin meson (#5253) 2024-12-18 18:09:17 +09:00
Gyeongjae Choi 489a302729
Pin cysignals version temporarily (#5222) 2024-11-25 17:59:46 +09:00
Agriya Khetarpal a4aae4ed37
MAINT Fix cross-build metadata update workflow, open issue on failures (#5192) 2024-11-14 21:50:10 +01:00
Gyeongjae Choi 1c82138a27
Use pyodide-build submodule (#5152)
Co-authored-by: Agriya Khetarpal <74401230+agriyakhetarpal@users.noreply.github.com>
2024-11-07 21:04:14 +09:00
Christian Clauss 0adc6d050a
bump_version.py: `ast.Str` will be removed in Py314 so use `ast.Constant` (#5164) 2024-11-07 15:54:12 +09:00
Juniper Tyree 2aa31871e4
Constrain meson < 1.6 to fix the scipy build (#5132) 2024-10-25 16:44:21 +02:00
Gyeongjae Choi 66a64b6f28
Remove third-party libraries from cross-build env (#4995)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-08-10 22:58:07 +09:00
Gyeongjae Choi 8fbf59203c
Unvendor pyodide-build (#4882)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-07-26 23:51:57 +09:00
Loïc Estève d471855b5f
Run scipy tests as part of the Github Action CI (#4935)
Triggered only on push and on PR commits if [scipy] is in the commit message.
2024-07-17 09:39:11 +02:00
Loïc Estève 4cfc0ff4b6
Update codespell version in pre-commit (#4938) 2024-07-16 13:44:45 +02:00
Gyeongjae Choi c2a797530d
CI Fill out more information to pyodide-cross-build-environments.json automatically (#4855) 2024-06-10 20:53:55 +09:00
Gyeongjae Choi 1196a59a8b
Backfill missing releases to pyodide-cross-build-environments.json (#4829) 2024-06-03 20:30:27 +09:00
Gyeongjae Choi dd9366e30f
BLD Extract out xbuildenv create command from pyodide-build (#4798)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-05-31 18:27:57 +09:00
Gyeongjae Choi c4a6964429
Use Pyodide version instead of pyodide-build version when creating lockfile (#4732)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-05-02 20:32:10 +09:00
Gyeongjae Choi 6fb3d7340c
BLD Add a file holding cross build environment metadata (#4695) 2024-04-20 22:52:37 +09:00
pre-commit-ci[bot] 6f7ae21aa8
[pre-commit.ci] pre-commit autoupdate (#3736) 2024-04-04 09:21:19 +02:00
Hood Chatham 6a1b0b09b6 Add CI job to check that release version matches repo file contents 2024-02-28 14:03:57 -08:00
Hood Chatham df8aa663b0
Reduce the amount of stuff that the makefile always redoes (#4515)
libgl is marked .PHONY and is a dependency for the link step which forces us to always redo the link
step even though it's completely not necessary. I moved embuilder build libgl into the link step
since that's the only place where it's needed.

dist/python_stdlib.zip and dist/pyodide-lock.json both declare a dependency on pyodide_build but
there is never a file of that name so they always have to run. Instead, run make pyodide_build so
that they can reuse the logic but they don't always run if their other deps are satisfied.

Now that dist/python_stdlib.zip doesn't always run it needs to rely on all files in src/py.
Make pyodide_build only invoke pip install if pyodide_build is not already installed. Pip generates
a lot of noise and takes a while so skipping it when we don't need it helps a lot.
Make dist/webworker.js and friends not phony since they stopped needing to be when PYODIDE_BASE_URL
was removed from them.
2024-02-13 15:20:31 -08:00
Hood Chatham 8f71575dcc Fix bump_version pattern for src/py/pyproject.toml 2024-02-05 17:07:32 -08:00
Emil Nikolov 44107e8e78
Replace references to /bin/bash with /usr/bin/env bash (#4478) 2024-02-04 09:54:17 -08:00
Gyeongjae Choi d1628de4ff
TST Move run_docker test outside of pyodide-build (#4463)
It is weird that test_run_docker is inside pyodide-build. This PR moves the
run_docker test file to tools directory. Maybe it is not the best place to put
this test file, but it is at least better than pyodide-build.
2024-02-02 10:46:04 -08:00
Matthias Köppe eb6e03e56c
src/py/pyproject.toml: Move metadata here from setup.cfg (#4472)
Modernizing metadata
2024-02-02 08:32:08 -08:00
Hood Chatham b8287e42d9
chore: Update pre-commit (#4440)
I also reordered prettier to come last since it's the slowest. I switched from
using black to ruff-format which says its defaults are nearly the same as black.
2024-01-28 13:20:08 -08:00
Gyeongjae Choi d4450d9ee3
Pin pytest < 8.0 and make s3 test compatible to moto 5.0 update (#4437)
pytest 8.0 and moto 5.0 were released a few hours ago, and
they seem to be breaking tests. This is a (temporary) fix.
2024-01-28 09:04:40 -08:00
Matthias Köppe cf52fe9166
Do not set constraint Cython<3; update `libproj`, `pyproj`, `h5py` (#4426)
Since the release of Cython 3 in July 2023, many packages have been updated to
either set an upper bound "Cython < 3", to support both Cython 0.29.x and 3.0, or 
to require Cython 3.

Here we remove the global constraint Cython < 3 added in #4001 and update
individual packages if necessary.
2024-01-27 09:50:34 -08:00
Matthias Köppe cd9cb8d4a2
`tools/dependency-check.sh`: Avoid confusing error message (#4423) 2024-01-25 21:29:27 -08:00
Gyeongjae Choi f2d546dbe3
Bump numpy version to 1.26.1 and use meson backend (#4240)
Co-authored-by: Hood Chatham <roberthoodchatham@gmail.com>
2023-10-25 12:20:58 +09:00
Gyeongjae Choi fb9417ffe5
BLD Unpin types-setuptools (#4205) 2023-10-08 17:01:02 +09:00
Hood Chatham 9042e6cb1b
ENH Print helpful error if ccache was linked against too new glibc (#4127)
Resolves pyodide#4126.
If someone builds emsdk outside of the docker image and then attempts to use it
inside, there will be an error. This detects it and tells people to clean emsdk.
2023-09-10 21:08:02 -07:00
Hood Chatham ec05ccd762
Cap cython<3 (#4001)
I added tools/constraints.txt and set it into the PIP_CONSTRAINT environment variable.
2023-07-18 23:47:05 -07:00
Juniper Tyree 0980b51677
Implement PEP 658: .whl.metadata files (#3981) 2023-07-17 21:17:24 +09:00
Hood Chatham 983f83ba1d
Remove assemble_wat (#3952)
This is dead code.
2023-06-23 16:09:43 -07:00
Loïc Estève 1c27915653
Build scikit-image 0.21 with meson (#3874) 2023-06-23 17:28:44 +02:00
Gyeongjae Choi d9c29e7083
Avoid compressing archives twice (#3802) 2023-05-02 10:49:05 +09:00
Gyeongjae Choi 25ba93485a
Deploy top-of-tree xbuildenv and pyodide-core to S3 (#3766) 2023-04-17 14:22:07 +09:00
Christian Clauss 4a0ca4ed48
Create tools/docker_image_tag.py (#3758)
[skip ci]
2023-04-14 08:51:30 +02:00
Roman Yurchak 49caa889da
Fix content compression in the deployment script (#3716) 2023-03-30 20:48:19 +02:00
Roman Yurchak 7f4f66b34b
Deploy py-compiled build (#3701)
Co-authored-by: Hood Chatham <roberthoodchatham@gmail.com>
2023-03-29 22:54:46 +02:00
Christian Clauss 57f36ac6f8
Ruff is now compatible with Python pattern matching (#3650) 2023-03-13 22:45:06 +01:00
Gyeongjae Choi 52c033af9f
CI Add MacOS build (#3602) 2023-03-08 21:22:59 +01:00
Hood Chatham 861a758c3b
Add new `pyodide.ffi` JavaScript submodule with PyProxy subtypes (#3523)
This creates a new `pyodide.ffi` submodule and adds a bunch of new subclasses of
`PyProxy` to it.

There are three stages in which we are concerned with the behavior of the
objects we define:
1. at time of static typechecks
2. at execution time
3. when generating docs

Prior to this PR, the subtypes of PyProxy only work well for static type checks,
they work acceptably at runtime (just don't let the user access them), and the
docs don't look that great. This PR is primarily intended to improve the docs
for PyProxy, but they also make execution time checks work better: you can now
say `obj instanceof pyodide.ffi.PyCallable` instead of `obj.isCallable()` which
I is easier to understand and to cross reference against the documentation. I am
marking `isCallable` as deprecated.

I also made a bunch of edits and improvements to the docs.

I have deprecated `PyProxyCallable` in favor of `pyodide.ffi.PyCallable` and
`PyProxy.isCallable` in favor of `obj instanceof pyodide.ffi.PyCallable`.
`PyBuffer` has been renamed to `pyodide.ffi.PyBufferView` and a new `PyBuffer`
has been created which is a subtype of `PyProxy`.
2023-02-05 19:35:08 -08:00
Gyeongjae Choi 66812b8295
CI Show compressed size of main modules after build (#3526)
This adds a short helper script which shows a gzip and brotli compressed size of a file,
and uses it in CI to check compressed size of pyodide.asm.* after build in addition to
the original file size.
2023-02-03 21:25:38 -08:00
Hood Chatham 8c5ae6ff9e
Update description of github releases in docs (#3498) 2023-01-24 13:11:31 -08:00
Gyeongjae Choi 2f1716b575
Relocate files inside tools directory (#3358)
This PR relocates files inside `tools` directory so that `tools` directory doesn't
have to be vendored when creating xbuildenv.

- cmake, pyo3 config ==> moved to `pyodide-build`.
- venv python script ==> moved to templates, then copied to dist during build.
2022-12-26 20:00:24 -08:00
Hood Chatham 7422ab370d
Implement more detailed streams support (#3268)
Resolves https://github.com/pyodide/pyodide/issues/3112
This adds a carefully designed API for controlling stdin, stdout, and stderr. It changes
the default behavior to be a bit more useful, though in doing so introduces some mild
backwards incompatibility. In particular:

1. By default, stdin reads directly from `process.stdin` in node (as before) and raises an
error if in browser (not as before).
2. By default, stdout writes directly to `process.stdout` in node (before it called console.log)
and calls console.log in browser (as before).
3. By default, stderr writes directly to `process.stderr` in node (before it called console.warn)
and calls console.warn in browser (as before).
4. In all three cases, by default isatty(stdin/stdout/stderr) is true in node and false in browser
(in the browser it used to be true).
5. As before, if you pass `stdin`, `stdout`, or `stderr` as arguments to `loadPyodide`, `isatty` of
the corresponding stream is set to false.

The stdin function is now more flexible: we now correctly handle the case where it returns an
ArrayBuffer or ArrayBufferView.

I also added 3 new functions to set streams after Pyodide is loaded which offer additional
control:
* `setStdin({stdin?, error?, isatty = false})` -- Sets the stdin function. The stdin function takes no
arguments and should return null, undefined, a string, or a buffer. Sets and `isatty(stdin)` to 
`isatty` (by default `false`). If error is true, set stdin to always raise an EIO error when it is read.
* `setStdout({raw?, batched?, isatty = false})` -- If neither raw nor batched is passed, restore 
default stdout behavior. If rwa is passed, the raw stdout function receives a byte which it should
interpret as a utf8 character code. Sets `isatty(stdout)` to isatty (by default `false`). If batched is
passed but not raw, it sets a batched stdout function. The stdout function receives a string and
should do something with it. In this case it ignores isatty and sets isatty(stdout) to false.
* `setStderr({raw?, batched?, isatty = false})` -- same but with stderr.
2022-12-18 15:55:52 -08:00