python-poetry / python-poetry/install.python-poetry.org
Installation of poetry in default location for macOS not working for framework builds
まだ誰も着手していません。
- 主要言語
- Python
- スター
- 255
- フォーク
- 65
- 平均マージ
- 2時間 48分
- マージ済み PR(30日)
- 1
説明
After poetry installation, poetry is not a recognized command.
I am running python 3.11 on macOS. I inspected the installation code and I see the following function:
def bin_dir(version: Optional[str] = None) -> Path:
if os.getenv("POETRY_HOME"):
return Path(os.getenv("POETRY_HOME"), "bin").expanduser()
user_base = site.getuserbase()
if WINDOWS:
bin_dir = os.path.join(user_base, "Scripts")
else:
bin_dir = os.path.join(user_base, "bin")
return Path(bin_dir)
It seems like site.getuserbase() resolves to ~/Library/Python/3.11. That is not part of my PATH and therefore I get poetry: command not found.
Since I am configuring poetry with github-actions, I ended up doing the following:
python -c "import os, site; print(os.path.join(site.getuserbase(), 'bin'))" >> $GITHUB_PATH
I was just wondering if site-packages is the best default location for poetry and I presented an example on how sometimes poetry is not installed by default in a location included by PATH. Usually the decision is to install it in /usr/bin or /usr/local/bin.
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
インストーラーの bin_dir 関数から始め、site.getuserbase() が ~/Library/Python/3.11 を返す Python 3.11 の macOS 上での挙動を再現します。結果として得られる bin パスを、インストールフローでの PATH の扱いおよび GitHub Actions の回避策と比較します。デフォルトのインストール先が PATH に含まれるか、意図した PATH の設定が明確に定義され、テストされていれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- github-actions, macos, python
- 領域
- cli, devops, tooling
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 25/100