python / python/pyperformance

Help me to completely disable psutil

Aperta
#332 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Lingua principale
Python
Stelle
1k
Fork
203
Merge medio
1h 20m
PR unite (30g)
2

Descrizione

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)

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Inizia da pyperformance/venv.py e segui l’installazione delle dipendenze attivata da pyperformance run e pyperformance venv create. Controlla come l’ambiente virtuale seleziona pyperformance e pyperf, quindi verifica che sia possibile usare installazioni locali senza installare psutil.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
python
Ambito
performance, tooling
Tipo di issue
Funzionalità
Difficoltà
3/5
Tempo stimato
1-2 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.