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

fix: write __init__ shim for pip runfiles helper #519

Merged
merged 2 commits into from
Jan 28, 2025
Merged

Conversation

thesayyn
Copy link
Member

@thesayyn thesayyn commented Jan 27, 2025

Fixes #377

Even though messing with init.py is a little risky, in this case its safer since we only generate it while symlinking files from external repositories into venv, and since /~https://github.com/bazelbuild/rules_python/blob/18f76f9cc4c3c6c4470f7a881e6ea4e8b80d7bab/python/runfiles/__init__.py#L15 is simple line, i can't think of easier fix than this.

Changes are visible to end-users: no

  • Searched for relevant documentation and updated as needed: yes
  • Breaking change (forces users to change their own code or config): no
  • Suggested release notes appear below: no

Test plan

  • New test cases added

@thesayyn thesayyn requested a review from alexeagle January 27, 2025 23:52
Copy link

github-actions bot commented Jan 27, 2025

e2e/use_release folder: LCOV of commit a89e960 during CI #1657

Summary coverage rate:
  lines......: 100.0% (2 of 2 lines)
  functions..: 100.0% (1 of 1 function)
  branches...: no data found

Files changed coverage rate: n/a

Copy link

aspect-workflows bot commented Jan 27, 2025

Test

10 test targets passed

Targets
//examples/multi_version:py_version_default_test [k8-fastbuild]                         1s
//examples/multi_version:py_version_test [k8-fastbuild-ST-494921797612]                 1s
//examples/pytest:nested/pytest [k8-fastbuild]                                          2s
//examples/pytest:pytest_test [k8-fastbuild]                                            2s
//examples/virtual_deps:pytest_test [k8-fastbuild]                                      1s
//py/tests/external-deps:test_can_import_runfiles_helper [k8-fastbuild]                 741ms
//py/tests/internal-deps:assert [k8-fastbuild]                                          460ms
//py/tests/py-binary:runfiles_from_pip_test [k8-fastbuild]                              968ms
//py/tests/py-test:test_env_vars [k8-fastbuild]                                         416ms
//py/tests/repo_relative_imports/test:test [k8-fastbuild]                               490ms

Total test execution time was 10s. 19 tests (65.5%) were fully cached saving 36s.

@alexeagle alexeagle merged commit eb45eca into main Jan 28, 2025
16 checks passed
@alexeagle alexeagle deleted the runfiles_init_fix branch January 28, 2025 20:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: bazel-runfiles pypi library does not work
2 participants