Skip to content
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

Adding grpcio to setup.py as an extra. #1553

Merged
merged 1 commit into from
Mar 3, 2016

Conversation

dhermes
Copy link
Contributor

@dhermes dhermes commented Mar 1, 2016

grpcio can only be installed with Python 2.7, so the py27 tox environment is the only one that doesn't need to run without mocks.

FYI @jgeewax the grpcio install fails on Python 2.6 and 3.4 (didn't try 3.5).

  • This won't run Py2.7 tests on AppVeyor with grpcio but will at least install it. I tried to tackle but can't write faithful powershell without a test machine
  • If this works, I'll conditionally add the Bigtable tests (in Py2.7) in attempt_system_tests.py

@dhermes dhermes added packaging api: bigtable Issues related to the Bigtable API. labels Mar 1, 2016
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Mar 1, 2016
@theacodes
Copy link
Contributor

Would it make sense to make this an extra?

@tseaver
Copy link
Contributor

tseaver commented Mar 1, 2016

I like the idea of the extra: users can make perfectly valid use of gcloud without grpc.

@dhermes
Copy link
Contributor Author

dhermes commented Mar 1, 2016

👍 I like the idea. Then we'd have

pip install gcloud[grpc]

for people that want to use gRPC?


@jgeewax Please weigh in

@theacodes
Copy link
Contributor

Actually I think it's better for the extra to the the part of this library that requires extra dependencies. So IMO it should be pip install gcloud[bigtable].

@dhermes
Copy link
Contributor Author

dhermes commented Mar 1, 2016

But in the not-too-distant future datastore, pubsub, logging, others? will have direct gRPC support in this library.

@theacodes
Copy link
Contributor

Hmm. Fair point. I'm unsure. It seems that right now grpc doesn't have a good install story (unless that's recently changed).

One part of me is leaning on having grpc remain an "extra" (in one way or another) until the install story improves or the tipping point where most clients in this library use grpc.

@jgeewax what do you think?

@dhermes
Copy link
Contributor Author

dhermes commented Mar 2, 2016

pip install grpcio>=0.13.0 works fairly well now, but must be 2.7 and only targets a limited number of platforms (but Linux, OS X and Windows covers a lot).

@theacodes
Copy link
Contributor

That's fair, I suppose. Are any os-level dependencies needed other than just build-essential?

@dhermes
Copy link
Contributor Author

dhermes commented Mar 2, 2016

No idea. @nathanielmanistaatgoogle do you know who might be able to chime in?

@jgeewax
Copy link
Contributor

jgeewax commented Mar 2, 2016

I don't think even build-essential is needed.... It shouldn't as there's no compiling so gcc and make shouldn't be required for this...

@theacodes
Copy link
Contributor

Cool, SGTM.

@dhermes
Copy link
Contributor Author

dhermes commented Mar 2, 2016

I'm about to test it on bare GCE Debian and Ubuntu images.

@dhermes
Copy link
Contributor Author

dhermes commented Mar 2, 2016

Seems to work on Ubuntu:

$ sudo apt-get update
$ sudo apt-get -y upgrade
$ curl -O https://bootstrap.pypa.io/get-pip.py
$ sudo python get-pip.py
$ sudo -H pip install --upgrade pip
$ sudo -H pip install 'grpcio==0.13.0'
# FAILURE: https://gist.github.com/dhermes/f3cc291bb289ae69c86d
$ sudo -H pip install --upgrade six
$ sudo -H pip install 'grpcio==0.13.0'
$ # SUCCESS!
$ dpkg -s build-essential
dpkg-query: package 'build-essential' is not installed and no information is available
Use dpkg --info (= dpkg-deb --info) to examine archive files,
and dpkg --contents (= dpkg-deb --contents) to list their contents.

@dhermes
Copy link
Contributor Author

dhermes commented Mar 2, 2016

Confirmed it works (with the same funky VersionConflict when --upgrade isn't used) on Debian

grpcio can only be installed with Python 2.7, so the
py27 tox environment is the only one that doesn't need to
run without mocks.
@dhermes dhermes changed the title Adding grpcio to setup.py. Adding grpcio to setup.py as an extra. Mar 2, 2016
python2.7
deps =
{[testenv]deps}
grpcio >= 0.13.0

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

@dhermes
Copy link
Contributor Author

dhermes commented Mar 2, 2016

@tseaver PTAL. Updated to make it an extra.

@tseaver
Copy link
Contributor

tseaver commented Mar 3, 2016

LGTM

dhermes added a commit that referenced this pull request Mar 3, 2016
Adding grpcio to setup.py as an extra.
@dhermes dhermes merged commit 1193eab into googleapis:master Mar 3, 2016
@dhermes dhermes deleted the enable-grpcio branch March 3, 2016 16:32
@tseaver
Copy link
Contributor

tseaver commented Mar 4, 2016

grpc 0.13.0 is broken on UCS2 versions of python 2.7 (which you get when you build Python 2.x from source).

We should drop testing with it in tox until they make a release with the fix.

@dhermes
Copy link
Contributor Author

dhermes commented Mar 4, 2016

@tseaver can you file an issue? I'm AFK right now

@tseaver
Copy link
Contributor

tseaver commented Mar 4, 2016

#1572

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: bigtable Issues related to the Bigtable API. cla: yes This human has signed the Contributor License Agreement. packaging
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants