Help me to completely disable psutil
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- Python
- Sterne
- 1k
- Forks
- 203
- Ø Merge
- 1 Std. 20 Min.
- Gemergte PRs (30 T.)
- 2
Beschreibung
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)
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne mit pyperformance/venv.py und verfolge die durch pyperformance run und pyperformance venv create ausgelöste Installation von Abhängigkeiten. Prüfe, wie die virtuelle Umgebung pyperformance und pyperf auswählt, und verifiziere anschließend, dass lokale Installationen verwendet werden können, ohne psutil zu installieren.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- python
- Bereich
- performance, tooling
- Issue-Typ
- Feature
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100