Skip to content

Move test file unvendoring functionality from pyodide-build to pyodide-lock #30

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

Closed
ryanking13 opened this issue Jun 8, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@ryanking13
Copy link
Member

When creating a pyodide-lock file, we separate test codes inside the wheel and pack them in a separate file to reduce the size of the wheel. This feature is highly related to the lockfile, so I think it would be nice to move it to pyodide-lock so users can use it when creating a custom lockfile using out-of-tree wheels.

On the other hand, if we move this functionality to pyodide-lock, we should support some ways to specify which packages should have their test files split and which should not. We were using unvendor_tests in the meta.yaml file, but the recipe file will not be available for out-of-tree builds.

So, probably we would need some cmdline flags such as:

--vendor-tests pkg-name pkg-name2

and also make it configurable using a config file:

[tool.pyodide.lock]
vendor-tests = ['pkg-name', 'pkg-name2']

This can also be extended to general unvendoring mechanism not only for test files as discussed in pyodide/pyodide#3092.

@agriyakhetarpal
Copy link
Member

This should be closed in favour of pyodide/pyodide-pack#41, as we decided that such functionality is better handled in pyodide-lock. Please refer to pyodide/pyodide-build#116 (comment) for additional context.

@agriyakhetarpal
Copy link
Member

Actually, @ryanking13, I don't seem to have permissions to close this issue – could you do it instead?

@ryanking13
Copy link
Member Author

@agriyakhetarpal Sure, let me close this issue. I also updated the repository permission to grant theadmin role to pyodide/core group.

ryanking13 added a commit to pyodide/pyodide-build that referenced this issue Mar 22, 2025
This PR changes when test codes are unvendored.

Before:

- it is unvendored right after the wheel file is built (== at the same
step when `build.post` script runs).
- when generating a lockfile, we check if the test codes are unvendored
and update the lockfile entry.

After:

- it is unvendored when we are creating a lockfile.

__Why?__

I would like to move the unvendoring logic to somewhere else like
`pyodide-pack` or `pyodide-lock`
(pyodide/pyodide-lock#30,
pyodide/pyodide-pack#41), so package
maintainers can use that feature when they are not using a recipe.



---

Related issues:

- pyodide/pyodide-lock#30
- pyodide/pyodide-pack#41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants