Skip to content

pip download --no-deps --no-binary does some unwanted build steps #7995

Closed
@altendky

Description

@altendky

Environment

  • pip version: 20.0.2
  • Python version: 3.8.2
  • OS: Linux
  • Ubuntu eoan
  • pyenv installed cpython

Description
I would like to download an sdist from PyPI without any other activity. pip download --no-deps --no-binary :all: cryptography ends up 'installing' build dependencies and more. The example below is done with the cryptography package because it is faster than my real case of PyQt5.

Expected behavior
Pip should exclusively download the sdist.

How to Reproduce
Run pip download --no-deps --no-binary :all: cryptography.

Output

altendky@p1:~/blue$ ll
total 8
drwxrwxr-x  2 altendky altendky 4096 Apr  7 10:04 ./
drwxr-xr-x 55 altendky altendky 4096 Apr  7 09:59 ../
altendky@p1:~/blue$ virtualenv -p python3 venv
created virtual environment CPython3.8.2.final.0-64 in 124ms
  creator CPython3Posix(dest=/home/altendky/blue/venv, clear=False, global=False)
  seeder FromAppData(download=False, pip=latest, setuptools=latest, wheel=latest, via=copy, app_data_dir=/home/altendky/.local/share/virtualenv/seed-app-data/v1)
  activators BashActivator,CShellActivator,FishActivator,PowerShellActivator,PythonActivator,XonshActivator
altendky@p1:~/blue$ venv/bin/pip download --no-deps --no-binary :all: cryptography
Collecting cryptography
  Using cached cryptography-2.9.tar.gz (517 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
    Preparing wheel metadata ... done
  Saved ./cryptography-2.9.tar.gz
Successfully downloaded cryptography
altendky@p1:~/blue$ ll
total 520
drwxrwxr-x  3 altendky altendky   4096 Apr  7 10:05 ./
drwxr-xr-x 55 altendky altendky   4096 Apr  7 09:59 ../
-rw-rw-r--  1 altendky altendky 517211 Apr  7 10:05 cryptography-2.9.tar.gz
drwxrwxr-x  4 altendky altendky   4096 Apr  7 10:04 venv/
altendky@p1:~/blue$ venv/bin/pip download --no-deps --no-binary cryptography cryptography
Collecting cryptography
  File was already downloaded /home/altendky/blue/cryptography-2.9.tar.gz
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
    Preparing wheel metadata ... done
Successfully downloaded cryptography
altendky@p1:~/blue$ venv/bin/pip --version
pip 20.0.2 from /home/altendky/blue/venv/lib/python3.8/site-packages/pip (python 3.8)
altendky@p1:~/blue$ venv/bin/python --version --version
Python 3.8.2 (default, Mar  7 2020, 20:18:24) 
[GCC 9.2.1 20191008]
altendky@p1:~/blue$ venv/bin/pip download --no-deps --no-binary=:all: cryptography
Collecting cryptography
  File was already downloaded /home/altendky/blue/cryptography-2.9.tar.gz
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
    Preparing wheel metadata ... done
Successfully downloaded cryptography```

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions