-
Notifications
You must be signed in to change notification settings - Fork 31
Install unisolated packages into the isolated build venv and overlay their cross-build files #21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
77 commits
Select commit
Hold shift + click to select a range
1dc34fd
Update cross build installation mechanism
ryanking13 ee09707
Fix symlink
ryanking13 c806c05
type
ryanking13 033e552
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 797e605
Merge remote-tracking branch 'upstream/main' into no-host-site
ryanking13 c8f4663
cleanup [integration]
ryanking13 821cef1
Merge branch 'no-host-site' of https://github.com/ryanking13/pyodide-…
ryanking13 6521bef
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 0ec228c
Merge branch 'main' into no-host-site
ryanking13 f039816
Add more test
ryanking13 5b49ad5
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 221f9ea
changelog
ryanking13 10edfb7
More integration test files [integration]
ryanking13 a18357d
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 611ed7b
exclude patchfile from codespell
ryanking13 9ec8e60
[integration]
ryanking13 f962cc4
Remove integration tests from pre-commit check
ryanking13 54efacc
Fix integration test [integration]
ryanking13 2f5bc3b
Remove uncessery arg
ryanking13 0feb9aa
Force install cross-build package even if version mismatches [integra…
ryanking13 401aa67
Merge main
agriyakhetarpal f72ca2a
Update SciPy integration test to 1.17.1, drop f2py generators patch
agriyakhetarpal f98ef43
Rename `openblas` to `libopenblas`
agriyakhetarpal 2c7e98f
Change openblas to libopenblas in recipe file
agriyakhetarpal aac25bd
Add Boost recipe needed for SciPy
agriyakhetarpal 2e9ed3f
Update OpenBLAS version and patches
agriyakhetarpal 24746e6
Update `_find_executable_and_scripts` as per build 1.5.0
agriyakhetarpal eedcb31
Better docstring
agriyakhetarpal 491bb9c
Rework `AVOIDED_REQUIREMENTS` bits
agriyakhetarpal fddf520
Early skip if no unisolated packages
agriyakhetarpal 8c85dcf
Drop tests
agriyakhetarpal 0795637
More changes
agriyakhetarpal f572a3d
Don't exclude integration tests from linting
agriyakhetarpal 1e37553
Put TODO above function
agriyakhetarpal 679daad
Drop oldest-supported-numpy, it's deprecated now
agriyakhetarpal f3bdb7d
Drop `integration_tests/` changes, will test separately
agriyakhetarpal 9715cf4
Add f2py example for testing
agriyakhetarpal aedf9b8
Fix grammar in `get_unisolated_packages` docstring
agriyakhetarpal 14749d1
Fix docstring for `get_unisolated_files`
agriyakhetarpal daecc1a
Fix param name mismatch (`venv_path`)
agriyakhetarpal 48e674d
Use warning instead of bare print
agriyakhetarpal 1821d6c
Deprecation warning for `skip_install_cross_build_packages`
agriyakhetarpal 5bb795c
Be a bit more defensive about xbuildenv reqs file
agriyakhetarpal 25f0ce4
Add CHANGELOG entries for #21
agriyakhetarpal 4f88027
Fix license compliance for pypa/build
agriyakhetarpal 0bc7d3e
Merge main and resolve conflicts in CHANGELOG
agriyakhetarpal 10275a0
Restore logic to install cross-build packages
agriyakhetarpal a97c864
Restructure and add lazy tests back
agriyakhetarpal a0f5420
Discard changes to pyodide_build/xbuildenv.py
agriyakhetarpal 29ef6e8
Add back existence guard in `get_unisolated_packages`
agriyakhetarpal a95de42
Fix case-sensitivity issue in `_replace_unisolated_packages`
agriyakhetarpal 37bbc6f
Rename `symlink_unisolated_packages` to something better
agriyakhetarpal c0a3603
Use `shutil.copytree` for cross-build file copying
agriyakhetarpal afdbe68
Add tests for getting unisolated packages
agriyakhetarpal 9d89aa7
Tests for unisolated package name normalisation
agriyakhetarpal 4fdbf9c
Tests for cross-build file installation
agriyakhetarpal 905925b
Drop unnecessary list conversion
agriyakhetarpal 44e6da0
Invert condition for matched packages
agriyakhetarpal 0772d46
Rename `get_unisolated_files` to `get_cross_build_files_dir`
agriyakhetarpal 981b099
Simplify CHANGELOG entry
agriyakhetarpal e523091
Simplify tests for cross-build files checking
agriyakhetarpal a1ea4be
Simplify Fortran package recipe
agriyakhetarpal a9d4841
Repack dummy xbuildenv without `unisolated.txt`
agriyakhetarpal a898657
Update test to handle unisolated package version mismatch warning
agriyakhetarpal 53e5f91
Add line in between
agriyakhetarpal 1e82983
Merge branch 'main' into no-host-site
agriyakhetarpal 38edec2
Explicitly reject `oldest-supported-numpy`
agriyakhetarpal 2c05513
Raise `FileNotFoundError` for non-existent xbuildenv requirements file
agriyakhetarpal 8e682f9
Add comment about skipping cross-build file installation
agriyakhetarpal a8f63ff
Shapely was using oldest-supported-numpy, bump its version
agriyakhetarpal a5bbea2
Revert "Shapely was using oldest-supported-numpy, bump its version"
agriyakhetarpal ea0f514
Evaluate PEP 508 markers for build-time reqs
agriyakhetarpal 78cc998
Same bug for removing avoided requirements
agriyakhetarpal 86104b9
Fix order in CHANGELOG + adjust version
agriyakhetarpal cb3f8a8
Add `numpy.pc` through `PKG_CONFIG_LIBDIR`
agriyakhetarpal c90969e
Revert oldest-supported-numpy change for now
agriyakhetarpal 304bab0
Add comment about PEP 508 and `evaluate()`
agriyakhetarpal File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| package: | ||
| name: numpy-scripts-example | ||
| version: 0.1.0 | ||
| top-level: | ||
| - numpy_scripts_example | ||
|
|
||
| source: | ||
| path: source | ||
|
|
||
| requirements: | ||
| host: | ||
| - numpy | ||
| run: | ||
| - numpy | ||
|
|
||
| about: | ||
| home: https://github.com/pyodide/pyodide-build | ||
| summary: Minimal integration test that verifies f2py and numpy-config are on PATH during the build | ||
| license: MIT | ||
|
|
||
| extra: | ||
| recipe-maintainers: | ||
| - agriyakhetarpal |
32 changes: 32 additions & 0 deletions
32
integration_tests/recipes/numpy-scripts-example/source/meson.build
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| project('numpy-scripts-example', 'c', | ||
| version: '0.1.0', | ||
| license: 'MIT', | ||
| meson_version: '>= 1.3.0', | ||
| ) | ||
|
|
||
| py_mod = import('python') | ||
| py3 = py_mod.find_installation() | ||
| py3_dep = py3.dependency() | ||
|
|
||
| # The only point of this recipe is to verify that NumPy's console scripts | ||
| # are discoverable on PATH when it is a build-time dependency. | ||
| f2py = find_program('f2py') | ||
| numpy_cflags = run_command('numpy-config', '--cflags', check: true).stdout().strip().split() | ||
|
|
||
| incdir_numpy = run_command(py3, | ||
| ['-c', 'import numpy; print(numpy.get_include())'], | ||
| check: true, | ||
| ).stdout().strip() | ||
|
|
||
| py3.install_sources(['numpy_scripts_example/__init__.py'], | ||
| pure: false, | ||
| subdir: 'numpy_scripts_example') | ||
|
|
||
| py3.extension_module('_add', | ||
| 'numpy_scripts_example/_add.c', | ||
| include_directories: incdir_numpy, | ||
| c_args: numpy_cflags, | ||
| dependencies: py3_dep, | ||
| install: true, | ||
| subdir: 'numpy_scripts_example', | ||
| ) |
3 changes: 3 additions & 0 deletions
3
integration_tests/recipes/numpy-scripts-example/source/numpy_scripts_example/__init__.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| from ._add import add | ||
|
|
||
| __all__ = ["add"] |
28 changes: 28 additions & 0 deletions
28
integration_tests/recipes/numpy-scripts-example/source/numpy_scripts_example/_add.c
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| #define PY_SSIZE_T_CLEAN | ||
| #include <Python.h> | ||
| #include <numpy/arrayobject.h> | ||
|
|
||
| static PyObject * | ||
| add(PyObject *self, PyObject *args) | ||
| { | ||
| double a, b; | ||
| if (!PyArg_ParseTuple(args, "dd", &a, &b)) | ||
| return NULL; | ||
| return PyFloat_FromDouble(a + b); | ||
| } | ||
|
|
||
| static PyMethodDef methods[] = { | ||
| {"add", add, METH_VARARGS, "Add two floats."}, | ||
| {NULL, NULL, 0, NULL} | ||
| }; | ||
|
|
||
| static struct PyModuleDef module = { | ||
| PyModuleDef_HEAD_INIT, "_add", NULL, -1, methods | ||
| }; | ||
|
|
||
| PyMODINIT_FUNC | ||
| PyInit__add(void) | ||
| { | ||
| import_array(); | ||
| return PyModule_Create(&module); | ||
| } |
9 changes: 9 additions & 0 deletions
9
integration_tests/recipes/numpy-scripts-example/source/pyproject.toml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| [build-system] | ||
| build-backend = "mesonpy" | ||
| requires = ["meson-python", "numpy"] | ||
|
|
||
| [project] | ||
| name = "numpy-scripts-example" | ||
| version = "0.1.0" | ||
| requires-python = ">=3.9" | ||
| dependencies = ["numpy"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.