Skip to content

Installing with pip -t broken #3806

@ghost

Description

  1. OS type and version
    Linux localhost.localdomain 4.11.11-300.fc26.x86_64 #1 SMP Mon Jul 17 16:32:11 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

Rest of the questions are context sensitive.

If I install google-cloud in someEnv like so...

[stephen@localhost ~]$ python2.7 -m pip --version
pip 9.0.1 from /usr/lib/python2.7/site-packages (python 2.7)

[stephen@localhost ~]$ virtualenv someEnv
New python executable in /home/stephen/someEnv/bin/python2.7
Also creating executable in /home/stephen/someEnv/bin/python
Installing setuptools, pip, wheel...done.

[stephen@localhost ~]$ source someEnv/bin/activate
(someEnv) [stephen@localhost ~]$ python2.7 -m pip install google-cloud --upgrade
# ...snip...
(someEnv) [stephen@localhost ~]$ ls someEnv/lib/python2.7/site-packages/google
api  auth  cloud  gapic  gax  iam  logging  longrunning  oauth2  protobuf  resumable_media  rpc  type

Those folders look good, right?

Now, lets say I want to use cloud with AppEngine Standard. You would normally use -t some_target with pip and vendor some_target in your appengine_config.py, right?

[stephen@localhost ~]$ mkdir myAppEngineProject
[stephen@localhost ~]$ python2.7 -m pip install google-cloud -t myAppEngineProject/lib --upgrade
# ...snip...
[stephen@localhost ~]$ ls myAppEngineProject/lib/google
protobuf

So only protobuf makes it through. Without the --upgrade switch, this happens:

[stephen@localhost ~]$ rm myAppEngineProject/lib/ -rf
[stephen@localhost ~]$ python2.7 -m pip install google-cloud -t myAppEngineProject/lib
# ...snip...
Target directory /home/stephen/myAppEngineProject/lib/google already exists. Specify --upgrade to force replacement.
[stephen@localhost ~]$ ls myAppEngineProject/lib/google
api  auth  cloud  gapic  gax  iam  logging  longrunning  oauth2  resumable_media  rpc  type

So now protobuf is missing and pip just wants to wipe the whole google dir when upgrading, even from a fresh install.

This is also an issue with just wanting to install google-cloud-pubsub, guess other sub-projects might be affected.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions