-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Attempt to un-break Appveyor: #1965
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Attempt to un-break Appveyor: #1965
Conversation
- Put '_testing' on PYTHONPATH only for Py3k (debug grpico-on-Py3k issues later). - Use 'setup.py develop' rather than 'setup.py build' to get dependencies installed. - Run 'pip list' afterwards to show what got installed. Toward #1863.
Now we see if it works. |
@tseaver, I get those I have to import them first before I make a client...really weird. I thought it was just something with my machine. >>> from gcloud import storage
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "gcloud/storage/__init__.py", line 43, in <module>
from gcloud.storage.blob import Blob
File "gcloud/storage/blob.py", line 30, in <module>
from gcloud._helpers import _rfc3339_to_datetime
File "gcloud/_helpers.py", line 28, in <module>
from google.protobuf import timestamp_pb2
ImportError: cannot import name timestamp_pb2 If I import timestamp_pb2 before I import gcloud.storage it works... pip install protobuf==3.0.0b2 >>> from google.protobuf import timestamp_pb2
>>> from gcloud import storage
>>> |
Hmmm. Installing from PyPI works: $ /tmp/fscked/bin/pip install gcloud
Collecting gcloud
Downloading gcloud-0.17.0.tar.gz (458kB)
100% |████████████████████████████████| 460kB 1.5MB/s
Collecting httplib2>=0.9.1 (from gcloud)
Collecting googleapis-common-protos (from gcloud)
Collecting oauth2client>=2.0.1 (from gcloud)
Collecting protobuf!=3.0.0.b2.post1,>=3.0.0b2 (from gcloud)
Using cached protobuf-3.0.0b3-py2-none-any.whl
Collecting six (from gcloud)
Using cached six-1.10.0-py2.py3-none-any.whl
Collecting grpcio>=0.14.0 (from gcloud)
Using cached grpcio-0.15.0-cp27-cp27m-manylinux1_x86_64.whl
Collecting google-gax>=0.12.1 (from gcloud)
Collecting gax-google-pubsub-v1>=0.7.10 (from gcloud)
Collecting gax-google-logging-v2>=0.7.10 (from gcloud)
Collecting rsa>=3.1.4 (from oauth2client>=2.0.1->gcloud)
Using cached rsa-3.4.2-py2.py3-none-any.whl
Collecting pyasn1-modules>=0.0.5 (from oauth2client>=2.0.1->gcloud)
Using cached pyasn1_modules-0.0.8-py2.py3-none-any.whl
Collecting pyasn1>=0.1.7 (from oauth2client>=2.0.1->gcloud)
Using cached pyasn1-0.1.9-py2.py3-none-any.whl
Requirement already satisfied (use --upgrade to upgrade): setuptools in /tmp/fscked/lib/python2.7/site-packages (from protobuf!=3.0.0.b2.post1,>=3.0.0b2->gcloud)
Collecting enum34>=1.0.4 (from grpcio>=0.14.0->gcloud)
Using cached enum34-1.1.6-py2-none-any.whl
Collecting futures>=2.2.0 (from grpcio>=0.14.0->gcloud)
Using cached futures-3.0.5-py2-none-any.whl
Collecting ply==3.8 (from google-gax>=0.12.1->gcloud)
Collecting grpc-google-pubsub-v1>=0.7.11 (from gax-google-pubsub-v1>=0.7.10->gcloud)
Collecting grpc-google-logging-v2>=0.7.11 (from gax-google-logging-v2>=0.7.10->gcloud)
Building wheels for collected packages: gcloud
Running setup.py bdist_wheel for gcloud ... done
Stored in directory: /.../.cache/pip/wheels/d3/00/37/a3194dbb53f305c998b78c6d6b74af80dff545207a7909f45a
Successfully built gcloud
Installing collected packages: httplib2, six, protobuf, googleapis-common-protos, pyasn1, rsa, pyasn1-modules, oauth2client, enum34, futures, grpcio, ply, google-gax, grpc-google-pubsub-v1, gax-google-pubsub-v1, grpc-google-logging-v2, gax-google-logging-v2, gcloud
Successfully installed enum34-1.1.6 futures-3.0.5 gax-google-logging-v2-0.7.11 gax-google-pubsub-v1-0.7.11 gcloud-0.17.0 google-gax-0.12.2 googleapis-common-protos-1.2.0 grpc-google-logging-v2-0.7.11 grpc-google-pubsub-v1-0.7.11 grpcio-0.15.0 httplib2-0.9.2 oauth2client-2.2.0 ply-3.8 protobuf-3.0.0b3 pyasn1-0.1.9 pyasn1-modules-0.0.8 rsa-3.4.2 six-1.10.0 As does installing from Github with pip: $ /opt/Python-2.7.11/bin/virtualenv /tmp/borked
New python executable in /tmp/borked/bin/python
Installing setuptools, pip, wheel...done.
$ /tmp/borked/bin/pip install git+https://github.com/GoogleCloudPlatform/gcloud-python.git
Collecting git+https://github.com/GoogleCloudPlatform/gcloud-python.git
Cloning https://github.com/GoogleCloudPlatform/gcloud-python.git to /tmp/pip-rhbBzC-build
Collecting httplib2>=0.9.1 (from gcloud==0.17.0)
Collecting googleapis-common-protos (from gcloud==0.17.0)
Collecting oauth2client>=2.0.1 (from gcloud==0.17.0)
Collecting protobuf!=3.0.0.b2.post1,>=3.0.0b2 (from gcloud==0.17.0)
Using cached protobuf-3.0.0b3-py2-none-any.whl
Collecting six (from gcloud==0.17.0)
Using cached six-1.10.0-py2.py3-none-any.whl
Collecting grpcio>=0.14.0 (from gcloud==0.17.0)
Using cached grpcio-0.15.0-cp27-cp27m-manylinux1_x86_64.whl
Collecting google-gax>=0.12.1 (from gcloud==0.17.0)
Collecting gax-google-pubsub-v1>=0.7.10 (from gcloud==0.17.0)
Collecting gax-google-logging-v2>=0.7.10 (from gcloud==0.17.0)
Collecting rsa>=3.1.4 (from oauth2client>=2.0.1->gcloud==0.17.0)
Using cached rsa-3.4.2-py2.py3-none-any.whl
Collecting pyasn1-modules>=0.0.5 (from oauth2client>=2.0.1->gcloud==0.17.0)
Using cached pyasn1_modules-0.0.8-py2.py3-none-any.whl
Collecting pyasn1>=0.1.7 (from oauth2client>=2.0.1->gcloud==0.17.0)
Using cached pyasn1-0.1.9-py2.py3-none-any.whl
Requirement already satisfied (use --upgrade to upgrade): setuptools in /tmp/borked/lib/python2.7/site-packages (from protobuf!=3.0.0.b2.post1,>=3.0.0b2->gcloud==0.17.0)
Collecting enum34>=1.0.4 (from grpcio>=0.14.0->gcloud==0.17.0)
Using cached enum34-1.1.6-py2-none-any.whl
Collecting futures>=2.2.0 (from grpcio>=0.14.0->gcloud==0.17.0)
Using cached futures-3.0.5-py2-none-any.whl
Collecting ply==3.8 (from google-gax>=0.12.1->gcloud==0.17.0)
Collecting grpc-google-pubsub-v1>=0.7.11 (from gax-google-pubsub-v1>=0.7.10->gcloud==0.17.0)
Collecting grpc-google-logging-v2>=0.7.11 (from gax-google-logging-v2>=0.7.10->gcloud==0.17.0)
Installing collected packages: httplib2, six, protobuf, googleapis-common-protos, pyasn1, rsa, pyasn1-modules, oauth2client, enum34, futures, grpcio, ply, google-gax, grpc-google-pubsub-v1, gax-google-pubsub-v1, grpc-google-logging-v2, gax-google-logging-v2, gcloud
Running setup.py install for gcloud ... done
Successfully installed enum34-1.1.6 futures-3.0.5 gax-google-logging-v2-0.7.11 gax-google-pubsub-v1-0.7.11 gcloud-0.17.0 google-gax-0.12.2 googleapis-common-protos-1.2.0 grpc-google-logging-v2-0.7.11 grpc-google-pubsub-v1-0.7.11 grpcio-0.15.0 httplib2-0.9.2 oauth2client-2.2.0 ply-3.8 protobuf-3.0.0b3 pyasn1-0.1.9 pyasn1-modules-0.0.8 rsa-3.4.2 six-1.10.0
$ /tmp/borked/bin/python
Python 2.7.11 (default, Feb 22 2016, 07:44:44)
[GCC 4.8.4] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from gcloud import storage
>>> |
Yeah I had the same results with pip. Not sure why |
$ /opt/Python-2.7.11/bin/virtualenv /tmp/snorged
New python executable in /tmp/snorged/bin/python
Installing setuptools, pip, wheel...done.
$ cd /tmp/snorged/
$ git clone --depth 1 https://github.com/GoogleCloudPlatform/gcloud-python.git
Cloning into 'gcloud-python'...
remote: Counting objects: 409, done.
remote: Compressing objects: 100% (384/384), done.
remote: Total 409 (delta 78), reused 101 (delta 20), pack-reused 0
Receiving objects: 100% (409/409), 5.77 MiB | 779.00 KiB/s, done.
Resolving deltas: 100% (78/78), done.
Checking connectivity... done.
$ cd gcloud-python/
$ ../bin/python setup.py -q develop
...
$ ../bin/python
Python 2.7.11 (default, Feb 22 2016, 07:44:44)
[GCC 4.8.4] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from gcloud import storage
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "gcloud/storage/__init__.py", line 43, in <module>
from gcloud.storage.blob import Blob
File "gcloud/storage/blob.py", line 30, in <module>
from gcloud._helpers import _rfc3339_to_datetime
File "gcloud/_helpers.py", line 28, in <module>
from google.protobuf import timestamp_pb2
ImportError: cannot import name timestamp_pb2 Which leads me to a smoking gun: $ /tmp/snorged/bin/python
Python 2.7.11 (default, Feb 22 2016, 07:44:44)
[GCC 4.8.4] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import google
>>> from google import protobuf
>>> protobuf.__path__
['/tmp/snorged/lib/python2.7/site-packages/gax_google_logging_v2-0.7.11-py2.7.egg/google/protobuf'] Which is Just Wrong (TM). @bjwatson both |
Should we make an issue for this over on gax? |
IIUC, this is describing the same issue as #1972, right? |
@bjwatson I believe so. |
Thanks @daspecster. I shared my opinion in that issue. |
@tseaver This didn't seem to do the trick: https://ci.appveyor.com/project/dhermes/gcloud-python/build/job/1n38cps6rh8075g8 |
@dhermes There are no Py3k Windows wheels published for |
Yup. But the unit tests don't need |
_testing
on PYTHONPATH only for Py3k (debug grpico-on-Py3k issues later).setup.py develop
rather thansetup.py build
to get dependencies installed.pip list
afterwards to show what got installed.Toward #1863.