Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Stop installing `<PROJECT>_PIP_REQUIREMENTS` into system Python with `run-task`

オープン
#381 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
35/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
python
領域
devops, tooling

調査の方向性

Locate the run-task entry point that handles the _PIP_REQUIREMENTS variable and inspect how it installs the cloned repository's requirements. Compare the virtualenv and non-system-Python approaches described in the issue, then verify that bootstrapping works on Debian 12 without installing into system Python.

索引モデルが issue の本文から書いたものです。

説明

When a repo sets the <PROJECT>_PIP_REQUIREMENTS variable, run-task will automatically install the requirements file after cloning the repo. This is primarily used for bootstrapping Taskgraph in the Decision task, but can also be used for other things.

We recently upgraded the image to Debian 12, which includes Python 3.11. This version of Python fails when you attempt to pip install into the system Python:

[pip-install 2023-12-05T21:39:50.324Z] × This environment is externally managed
[pip-install 2023-12-05T21:39:50.324Z] ╰─> To install Python packages system-wide, try apt install
[pip-install 2023-12-05T21:39:50.324Z]     python3-xyz, where xyz is the package you are trying to
[pip-install 2023-12-05T21:39:50.324Z]     install.
[pip-install 2023-12-05T21:39:50.324Z]     
[pip-install 2023-12-05T21:39:50.324Z]     If you wish to install a non-Debian-packaged Python package,
[pip-install 2023-12-05T21:39:50.324Z]     create a virtual environment using python3 -m venv path/to/venv.
[pip-install 2023-12-05T21:39:50.324Z]     Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
[pip-install 2023-12-05T21:39:50.324Z]     sure you have python3-full installed.
[pip-install 2023-12-05T21:39:50.324Z]     
[pip-install 2023-12-05T21:39:50.324Z]     If you wish to install a non-Debian packaged Python application,
[pip-install 2023-12-05T21:39:50.324Z]     it may be easiest to use pipx install xyz, which will manage a
[pip-install 2023-12-05T21:39:50.324Z]     virtual environment for you. Make sure you have pipx installed.
[pip-install 2023-12-05T21:39:50.324Z]     
[pip-install 2023-12-05T21:39:50.324Z]     See /usr/share/doc/python3.11/README.venv for more information.

We'll work around this by passing --break-system-packages for now (this is probably fine anyway, especially with Docker). But it highlights some poor behaviour. It would be better to create a virtualenv first or use a non-system Python (perhaps installed via pyenv).

主要言語
Python
スター
26
フォーク
55
平均マージ
2日 6分
マージ済み PR(30日)
15

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

taskcluster/taskgraph のほかの issue

taskcluster/taskgraph の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。