bazel-contrib / bazel-contrib/rules_python
pkg_zip creates the zip file with broken link inside venv
- 主要言語
- Starlark
- スター
- 688
- フォーク
- 721
- 平均マージ
- 15時間 7分
- マージ済み PR(30日)
- 76
説明
Using latest rules_python 1.8.2 (venv enabled) and rules_pkg 1.2.0
```
py_binary(
name = "app",
...
)
pkg_zip(
name = "app_zip",
srcs = [":app"],
include_runfiles = True,
)
```
When I unzip the app_zip.zip file, I can see all the symlinks inside app.runfiles/_main/utils/_app.venv are broken. They all have one extra ../
I checked unzipped directory structure, those rules_python++pip* directories are wrongly located inside app.runfiles/_main/ while on the build host bazel-bin, they are directly inside app.runfiles, parallel to _main. This caused all symlinks in venv broken.
コントリビューションガイド
調査の方向性
rules_python 1.8.2 と rules_pkg 1.2.0 を使用して、示されている py_binary ターゲットと pkg_zip ターゲットで問題を再現します。展開した app.runfiles のレイアウトを bazel-bin と比較し、rules_python++pip ディレクトリと _main/utils/_app.venv 配下のシンボリックリンクのターゲットに注目します。アーカイブが期待されるレイアウトを保持し、展開後に仮想環境のシンボリックリンクを解決できれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- python
- 領域
- build-system
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100