Skip to content
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

[Bug]: py_layers.bzl's interpreter layer also fetches dependencies #311

Open
harshalparekh6 opened this issue Mar 26, 2024 · 1 comment
Open
Labels
bug Something isn't working untriaged Requires traige

Comments

@harshalparekh6
Copy link

What happened?

While adopting rules_oci for python using the macro py_oci_image, I noticed non-interpreter files in the interpreter layer. Some of the site-packages have compiled modules for cpython-*, which pass the regex for interpreter (screenshot attached).

.../bazel-bin/services/services_image.interpreter_tar_manifest.spec:

services/service_name/service.runfiles/pip_parse_name_sqlalchemy/site-packages/sqlalchemy/cimmutabledict.cpython-39-x86_64-linux-gnu.so uid=0 gid=0 time=1672560000 mode=0755 type=file content=external/pip_parse_name_sqlalchemy/site-packages/sqlalchemy/cimmutabledict.cpython-39-x86_64-linux-gnu.so

image

Should be a simple fix:

cmd = "grep '{}' $< | grep -v '{}' >$@".format(PY_INTERPRETER_REGEX, SITE_PACKAGES_REGEX),

Happy to open a PR!

Version

Development (host) and target OS/architectures:

Output of bazel --version:

Version of the Aspect rules, or other relevant rules from your
WORKSPACE or MODULE.bazel file:

Language(s) and/or frameworks involved:

How to reproduce

No response

Any other information?

No response

@harshalparekh6 harshalparekh6 added the bug Something isn't working label Mar 26, 2024
@github-actions github-actions bot added the untriaged Requires traige label Mar 26, 2024
@gfrankliu
Copy link

Has this been fixed by #357 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working untriaged Requires traige
Projects
Status: No status
Development

No branches or pull requests

2 participants