Commit Graph

281 Commits

Author SHA1 Message Date
Hood Chatham 4f392d22a8
Fix out of tree pip (#3767) 2023-04-13 22:50:49 -07:00
Hood Chatham f2b2a17d2f
Make executables installed in Pyodide venv run in Pyodide not in host (#3752)
pip can't run inside of Pyodide because it needs to do stuff like make requests
that don't work inside the virtual environment. So the virtual environment bin
folder contains a python-host executable which is a symlink to the
sys.executable that created the virtual environment. The shebang for pip uses
python-host. But then when pip installs an executable it uses sys.executable to
create the shebang for the installed executable. If that is python-host then the
installed executable will run outside of Pyodide. So we need to patch
`sys.executable` to point to the Pyodide Python.
2023-04-12 17:47:20 +02:00
Hood Chatham b1405ffede
Pass the source and build directory explicitly, don't use chdir (#3746)
This switches to passing the source and build directories as arguments.
It adds an output-directory argument to pyodide build allowing us to
indicate where the output wheel should go independent of the build
directory. I also did some cleanup of the logic added in #3310
2023-04-12 17:43:57 +02:00
Loïc Estève 7193109f4d
Package OpenBLAS and use OpenBLAS in scipy (#3331) 2023-04-11 21:30:07 -07:00
Gyeongjae Choi 862163ece3
Add python_stdlib.zip to xbuildenv (#3760)
Resolves #3730
2023-04-12 06:14:18 +02:00
Gyeongjae Choi 6213477940
Make sure PYODIDE_ROOT points to absolute path in out-of-tree build (#3751) 2023-04-11 13:05:11 +09:00
Hood Chatham d5d2396f6a
Fix set_build_environment so that it works even if HOME is unset (#3744)
I'm running into a crash in cibuildwheel where some of its CI environments don't set HOME. This fixes set_build_environment to be a bit more resistant against crashes due to missing environment variables.
2023-04-08 19:34:10 +02:00
Gyeongjae Choi 5a8ecf130a
Add `xbuildenv create` CLI command and remove old entrypoints (#3732)
Add a private pyodide xbuildenv create CLI commad that replaces pyodide-build create_xbuildenv. Also removes legacy entrypoints: `pyodide-build {create,install}_xbuildenv.
2023-04-07 20:54:11 +09:00
Roman Yurchak 8be4402e4f
Fix passing compression-level in `pyodide py-compile` CLI (#3727)
The compression-level wasn't passed through in the internal functions when the target is a single archive.
2023-04-03 16:08:26 +09:00
Roman Yurchak 3446d2e0a1
Bump main to 0.24.0.dev0 (#3721) 2023-03-31 09:29:32 +02:00
Roman Yurchak 53de1c3e72
Version 0.23.0 (#3712) 2023-03-30 23:30:18 +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
Roman Yurchak 8058cb6703
Support for py-compiling folders + repodata.json update (#3700)
Co-authored-by: Gyeongjae Choi <def6488@gmail.com>
2023-03-28 11:28:28 +00:00
Hood Chatham edddf21c7b
MAINT Improvements to mkpkg error handling (#3684)
Removes tracebacks from "user errors" and improves error messages.
2023-03-27 09:55:51 +09:00
Gyeongjae Choi b801885353
Out-of-tree recipe build support (#3544)
Add out-of-tree support for `pyodide build-recipes` command.
This mostly reuses xbuildenv we use for the out-of-tree build.
2023-03-23 14:01:27 +09:00
Roman Yurchak 601d939fdd
Fix wheel compression with the JsDelivr CDN (#3667)
Set the MIME type for wheels and zip files to application/wasm to enable CDN compression. Also optionally disable compression in zip files and wheels to make the brotli compression by the CDN more efficient.

Co-authored-by: Gyeongjae Choi <def6488@gmail.com>
2023-03-21 09:11:47 +01:00
Roman Yurchak 59b2c4e1ef
Remove deprecated pyodide-build buildall and mkpkg CLI endpoints (#3668) 2023-03-20 08:43:04 +01:00
Gyeongjae Choi 802a9cd26b
Handle response files in pywasmcross (#3645)
Co-authored-by: josephrocca <1167575+josephrocca@users.noreply.github.com>
2023-03-17 09:00:51 +09:00
Loïc Estève 4028757968
Fix arpack *eupd issues due to numpy 1.24 f2py changes (#3658) 2023-03-17 08:59:16 +09:00
Christian Clauss 57f36ac6f8
Ruff is now compatible with Python pattern matching (#3650) 2023-03-13 22:45:06 +01:00
Gyeongjae Choi a9182030cd
Merge pyodide_py into python_stdlib.zip (#3621)
Co-authored-by: Hood Chatham <roberthoodchatham@gmail.com>
2023-03-04 11:05:12 +01:00
Joe Marshall 0fdf9a80fa
Add Fastparquet (#3590) 2023-03-02 14:46:58 +09:00
Gyeongjae Choi 61f3d35eca
Pin types-setuptools version (#3613) 2023-02-28 10:46:00 +01:00
Gyeongjae Choi c99584d4b8
FIX Change rust packages not to build concurrently (#3607)
Co-authored-by: Hood Chatham <roberthoodchatham@gmail.com>
2023-02-27 14:55:03 +09:00
Christian Clauss 01c00d70b4
PEP621: Move pytest configuration into pyproject.toml (#3609)
* PEP621: Move pytest configuration into pyproject.toml

Migrate `setup.cfg` to `pyproject.toml` using [ini2toml](https://pypi.org/project/ini2toml) to do the file conversion and running [validate-pyproject](https://github.com/abravalheri/validate-pyproject) in pre-commit to validate the results.

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-02-27 08:33:53 +09:00
Gyeongjae Choi 1138a4af2d
Add url parameter to install_xbuildenv (#3592) 2023-02-22 11:56:35 +09:00
Gyeongjae Choi 0d5bd851fe
Use loky.cpu_count() instead of os.cpu_count() (#3598) 2023-02-22 07:53:19 +09:00
Gyeongjae Choi 994ce5111f
BLD Add DISTDIR variable (#3584) 2023-02-17 08:25:42 +09:00
Gyeongjae Choi 5ad2dcf76f
Improve the error message when a meta.yaml file is not found (#3568) 2023-02-14 08:49:52 +09:00
Gyeongjae Choi 0b378d6727
Remove globally pinned build requirements (#3577) 2023-02-13 09:55:41 -08:00
Nicholas Bollweg e835bf05ff
add license file and metadata to pyodide-build (#3574) 2023-02-11 13:29:01 -08:00
Gyeongjae Choi 2fb9440e91
BLD Remove _pywasmcross entrypoint (#3566) 2023-02-11 00:04:25 -08:00
Gyeongjae Choi b6fc9e7b1d
Add --no-user flag when installing packages in xbuildenv (#3562) 2023-02-10 09:17:53 +09:00
Gyeongjae Choi 68e42b1867
ENH Autodetect the number of cores when invoking `pyodide build-recipes` (#3559)
Co-authored-by: Hood Chatham <roberthoodchatham@gmail.com>
2023-02-10 08:56:42 +09:00
Roman Yurchak 48258ff146
Replace isort, flake8, pycln and pyupgrade by ruff (#3522)
Co-authored-by: Henry Schreiner <HenrySchreinerIII@gmail.com>
2023-02-07 08:35:20 +09:00
Joe Marshall ba3a8d7eb8
Reproducible package builds (and requirements.txt support) (#3469)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-02-04 14:55:09 +01:00
Gyeongjae Choi f943739e8f
ENH Add --no-deps parameter to build-recipes CLI (#3520)
This adds `--no-deps` parameter to `pyodide build-recipes` CLI, which is a replacement for `pyodide_build buildpkg` entrypoint.

Ref: https://github.com/pyodide/pyodide/issues/2879
2023-02-03 21:31:46 -08:00
Gyeongjae Choi 01e0c92380
Add package_type field to repodata.json (#3528)
This PR adds `package_type` field to repodata.json and use it to create a list of
unvendored standard libraries. After this we don't need to manage a hard-coded
list of unvendored stdlib lists in pyodide-py.
2023-02-03 21:26:23 -08:00
Gyeongjae Choi dcdc1e6941
Unvendor pydoc_data and _pydecimal (#3525)
Removes / unvendors some python modules:

- Remove `_aix_support.py`, which is for supporting IBM AIX OS.

- Unvendor `_pydecimal.py`.
  - _pydecimal is a pure Python implementation of `decimal` module. [Importing `decimal` fallbacks](https://github.com/python/cpython/blob/main/Lib/decimal.py) to `_pydecimal` if the C-implementation `_decimal` is not available. In our case, _decimal is available, so _pydecimal will not be normally used. 

- Unvendor `pydoc_data`.
  - pydoc_data contains [a large (~700KB) dictionary](https://github.com/python/cpython/blob/main/Lib/pydoc_data/topics.py) for explaining python builtins. This is mostly used when `help("...")` is called.
2023-02-01 11:00:17 +09:00
Gyeongjae Choi 570e69ad4f
Add BuildArgs class to store common build arguments (#3514) 2023-01-30 13:35:18 +09:00
Gyeongjae Choi f50c749c9a
Apply upstream cpython commits to relocate test directories (#3507) 2023-01-30 13:34:33 +09:00
Hood Chatham cca5e9f87f
Add pynacl (#3500)
Resolves https://github.com/pyodide/pyodide/issues/3327
2023-01-27 16:36:46 -08:00
Gyeongjae Choi 328a9ffc34
Add tag key in meta.yaml spec (#3444)
Co-authored-by: Roman Yurchak <rth.yurchak@gmail.com>
Co-authored-by: Hood Chatham <roberthoodchatham@gmail.com>
2023-01-27 13:31:26 +09:00
Hood Chatham 036f9cb545 Revert "0.23.0a1"
This reverts commit 2eaee0673d.
2023-01-24 07:30:10 -08:00
Hood Chatham 2eaee0673d 0.23.0a1 2023-01-23 21:45:09 -08:00
Hood Chatham 3b2952fc92
Python3.11 (#3252) 2023-01-23 19:45:59 -08:00
Hood Chatham 3f845c87a1
Pass same environment variables to out of tree builds as in tree ones (#3495)
Resolves https://github.com/pyodide/pyodide/issues/3493
2023-01-23 17:09:31 -08:00
Hood Chatham 485e806383
Make sure pyodide config doesn't output anything extra (#3483)
Resolves https://github.com/pyodide/pyodide/issues/3430
2023-01-22 08:24:58 -08:00
Hood Chatham af4158da77
Don't check emscripten version when creating pyodide venv (#3485)
Resolves https://github.com/pyodide/pyodide/issues/3472
2023-01-22 08:21:03 -08:00
Gyeongjae Choi 8d7137f112
Fix incorrect error messages in ModuleNotFoundError (#3435)
Close https://github.com/pyodide/pyodide/issues/3423
2023-01-22 09:20:19 +01:00