Adam
Adam

Reputation: 1086

Error in Travis trying to submit app to Google's Play Store

I started by looking into a couple of Gists I found on Github: https://gist.github.com/lpetre/87a5196d14cf4484f1f2

And this works great on my laptop, however I'm trying to set up Travis-CI to automatically build the release APK and submit it to the Play Store. The issue that I'm encountering now is on the Travis side, in that I cannot use pip to install the google_api_python_client.

upon that call, I get the following:

 Installing collected packages: google-api-python-client, httplib2
  Running setup.py install for google-api-python-client
    error: could not create '/usr/local/lib/python2.7/dist-packages/apiclient': Permission denied
    Complete output from command /usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip_build_travis/google-api-python-client/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-ctZKCR-record/install-record.txt --single-version-externally-managed --compile:

So I strayed away from using pip, downloaded the python client libraries on their own, and am now including them in my git repo (under /google_api_upload).

A part of Google's API Upload client library instructions (https://github.com/googlesamples/android-play-publisher-api/blob/master/v2/python/README.md) say to run "import apiclient" in a python console (again, works fine on my laptop, but not travis because I can't start a python session and enter in "import apiclient" so far as I've found; it just hangs on the python session).

So then I figured it'd be awesome to just have a Gradle function in my gradle files which calls the API functions, and is called from the travis.yml file; but I don't even know if that's possible.

So any input would help, notably:

Thanks!

Upvotes: 3

Views: 550

Answers (2)

MaciejGórski
MaciejGórski

Reputation: 22232

I had similar error message

error: could not create '/usr/local/lib/python2.7/dist-packages/googleapiclient': Permission denied

and fixed that by adding sudo:

sudo pip install google-api-python-client

Compare build #162 and #163.

Upvotes: 2

Adam
Adam

Reputation: 1086

Got a response from Travis support, but have not confirmed yet.

I believe this is an issue reported in https://github.com/travis-ci/travis-ci/issues/2280. https://github.com/travis-ci/travis-ci/issues/2280#issuecomment-42798869 suggests that adding "mvn -pl extras/google-play-services install" should do the trick.

Upvotes: 0

Related Questions