python / python/pyperformance

Help me to completely disable psutil

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

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

主要言語
Python
スター
1k
フォーク
203
平均マージ
1時間 20分
マージ済み PR(30日)
2

説明

Hello everyone, for personal needs I'm working (on a personal fork ofc) on completely removing the use of psutil when launching pyperformance. I already did it for pyperf, and I thought I'd done it for pyperformance as well but despite removing psutil from the pyperformance/venv.py when I do 'pyperformance run' or 'pyperformance venv create' it still tries to install psutil because as far as I understand it, it doesn't use the local modified installation of pyperformance and pyperf but tries to download the original ones, which of course tells it to install psutil. How can I tell the venv to use the local installations?

Creating the virtual environment /home/xbit18/venv/cpython3.12-2da5632e88af-compat-d933292d5dcb
# /home/xbit18/.pyenv/versions/3.12.2/bin/python3.12 -m venv --without-pip /home/xbit18/venv/cpython3.12-2da5632e88af-compat-d933292d5dcb
# /home/xbit18/venv/cpython3.12-2da5632e88af-compat-d933292d5dcb/bin/python -m ensurepip -v
Using pip 24.0 from /tmp/tmpapjkh5y1/pip-24.0-py3-none-any.whl/pip (python 3.12)
Looking in links: /tmp/tmpapjkh5y1
Processing /tmp/tmpapjkh5y1/pip-24.0-py3-none-any.whl
Installing collected packages: pip
  changing mode of /home/xbit18/venv/cpython3.12-2da5632e88af-compat-d933292d5dcb/bin/pip3 to 775
  changing mode of /home/xbit18/venv/cpython3.12-2da5632e88af-compat-d933292d5dcb/bin/pip3.12 to 775
Successfully installed pip-24.0
# /home/xbit18/venv/cpython3.12-2da5632e88af-compat-d933292d5dcb/bin/python -m pip install -U 'setuptools>=18.5' wheel
Collecting setuptools>=18.5
  Downloading setuptools-69.2.0-py3-none-any.whl.metadata (6.3 kB)
Collecting wheel
  Downloading wheel-0.43.0-py3-none-any.whl.metadata (2.2 kB)
Downloading setuptools-69.2.0-py3-none-any.whl (821 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 821.5/821.5 kB 3.4 MB/s eta 0:00:00
Downloading wheel-0.43.0-py3-none-any.whl (65 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 65.8/65.8 kB 635.6 kB/s eta 0:00:00
Installing collected packages: wheel, setuptools
Successfully installed setuptools-69.2.0 wheel-0.43.0
# /home/xbit18/venv/cpython3.12-2da5632e88af-compat-d933292d5dcb/bin/python -m pip --version
pip 24.0 from /home/xbit18/venv/cpython3.12-2da5632e88af-compat-d933292d5dcb/lib/python3.12/site-packages/pip (python 3.12)
# /home/xbit18/venv/cpython3.12-2da5632e88af-compat-d933292d5dcb/bin/python -m ensurepip -v -U
Using pip 24.0 from /tmp/tmplckrat4v/pip-24.0-py3-none-any.whl/pip (python 3.12)
Looking in links: /tmp/tmplckrat4v
Requirement already satisfied: pip in ./venv/cpython3.12-2da5632e88af-compat-d933292d5dcb/lib/python3.12/site-packages (24.0)
# /home/xbit18/venv/cpython3.12-2da5632e88af-compat-d933292d5dcb/bin/python -m pip install -U 'setuptools>=18.5' wheel
Requirement already satisfied: setuptools>=18.5 in ./venv/cpython3.12-2da5632e88af-compat-d933292d5dcb/lib/python3.12/site-packages (69.2.0)
Requirement already satisfied: wheel in ./venv/cpython3.12-2da5632e88af-compat-d933292d5dcb/lib/python3.12/site-packages (0.43.0)
installing pyperformance in the venv at /home/xbit18/venv/cpython3.12-2da5632e88af-compat-d933292d5dcb
Installing requirements into the virtual environment /home/xbit18/venv/cpython3.12-2da5632e88af-compat-d933292d5dcb
# /home/xbit18/venv/cpython3.12-2da5632e88af-compat-d933292d5dcb/bin/python -m pip install pyperformance==1.11.0
Collecting pyperformance==1.11.0
  Downloading pyperformance-1.11.0-py3-none-any.whl.metadata (2.0 kB)
Collecting pyperf (from pyperformance==1.11.0)
  Downloading pyperf-2.6.3-py3-none-any.whl.metadata (6.0 kB)
Collecting packaging (from pyperformance==1.11.0)
  Downloading packaging-24.0-py3-none-any.whl.metadata (3.2 kB)
Collecting psutil>=5.9.0 (from pyperf->pyperformance==1.11.0)
  Downloading psutil-5.9.8-cp36-abi3-manylinux_2_12_x86_64.manylinux2010_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (21 kB)

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

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

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

調査の方向性

pyperformance/venv.py から始めて、pyperformance runpyperformance venv create によって実行される依存関係のインストールを追跡します。仮想環境が pyperformance と pyperf をどのように選択するかを確認し、psutil をインストールせずにローカルインストールを使用できることを検証します。

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

評価

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

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

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