ga4gh / ga4gh-schemas

Models and APIs for Genomic data. RETIRED 2018-01-24
http://ga4gh.org
Apache License 2.0
214 stars 114 forks source link

Fix schemas install by removing protoc call #778

Closed dcolligan closed 7 years ago

dcolligan commented 7 years ago

Issue #774

kozbo commented 7 years ago

A tentative +1 on this. My testing got beyond the problem this fix was targeted to address (protoc complier dependency) but then I ran into another sphinx build error from RTD:

Exception occurred:
  File "/home/docs/checkouts/readthedocs.org/user_builds/ko-ga4gh-server/envs/latest/lib/python2.7/site-packages/ga4gh/schemas/ga4gh/metadata_service_pb2.py", line 16, in <module>
    from ga4gh import metadata_pb2 as ga4gh_dot_metadata__pb2
ImportError: cannot import name metadata_pb2

That pb2 file is in place in the tree so I am a bit mystified. This needs to be worked out before I can merge this PR. @dcolligan does a make in the server docs directory work for you after this change?

dcolligan commented 7 years ago

It doesn't work, but I get a different error:

Exception occurred:
  File "/usr/local/Cellar/python/2.7.12/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/ga4gh/schemas/ga4gh/metadata_service_pb2.py", line 17, in <module>
    from google.api import annotations_pb2 as google_dot_api_dot_annotations__pb2
ImportError: No module named api

Thought it might be because our "google" dir and the top-level google package might be getting confused, so I tried changing everything to elgoog, but that wasn't the issue... still investigating...

By the way, this is why having a cross-repo testing strategy is a good idea! https://github.com/BD2KGenomics/ga4gh-integration/issues/41

dcolligan commented 7 years ago

I think something's wrong with the packaging. In the server after an install of the ga4gh-schemas package, I can do:

>>> import ga4gh.variants_pb2
>>> import ga4gh.schemas.ga4gh.variants_pb2
>>> ga4gh.variants_pb2.__file__
'/usr/local/Cellar/python/2.7.12/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/ga4gh/variants_pb2.pyc'
>>> ga4gh.schemas.ga4gh.variants_pb2.__file__
'/usr/local/lib/python2.7/site-packages/ga4gh/schemas/ga4gh/variants_pb2.pyc'

Whereas it seems like only the later import should work; I'm not sure why anything gets installed in the Cellar directory...

All the schemas tests pass, so the culprit is probably in setup.py, I would wager... still investigating...

kozbo commented 7 years ago

@david4096 Can you have a look at this? You have worked with he sphinx build more than anyone else at this point :-)

david4096 commented 7 years ago

We're working on it!

dcolligan commented 7 years ago

Closed in favor of #781