python/pyperformance

Help me to completely disable psutil

xbit18 opened this issue · 0 comments

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)