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

Travis build fails #10

Closed
parinporecha opened this issue Apr 1, 2014 · 7 comments
Closed

Travis build fails #10

parinporecha opened this issue Apr 1, 2014 · 7 comments
Labels
bug maintainability Automated tests suite, tooling, refactoring, or anything that makes it easier for developers priority:critical

Comments

@parinporecha
Copy link
Contributor

Travis build for GTG fails because it is not able to import the module 'gi'.
Here's a bulid-log - https://travis-ci.org/getting-things-gnome/gtg/builds/22000561#L302

Here's the relevant question asked on SO - http://stackoverflow.com/questions/22748528/travis-ci-gobject-introspection

@parinporecha parinporecha added this to the 0.3.2 milestone Apr 1, 2014
@parinporecha
Copy link
Contributor Author

Travis uses virtualenv for Python tests. So, could it be possible that the python3-gi package installed globally before the build is not able to be imported inside the virtualenv ?
Relevant answer regarding virtualenv - http://stackoverflow.com/a/17800821

But since gir cannot be installed through pip, a possible fix would be adding its location to the virtual path - http://stackoverflow.com/a/12831223

@izidormatusov
Copy link
Contributor

Feel free to modify .travis.yml and try to make it work. I found couple repos with really similar config file and it works for them. :(

I've enabled importing system packages into virtualenv, that should not be the issue

@pqrth
Copy link
Contributor

pqrth commented Apr 1, 2014

Looks like Travis CI uses ubuntu 12.04 (maybe because of LTS), so we couldn't install python3 packages using apt-get. Also, GObject Introspection libraries aren't available on pypi, so we need to

  • either add python3-gi's ppa to apt-get & then try to install it
  • or download 'gi' module's tarball, compile it & move it with virtualenv's packages.

I'll test whether any of the above methods works.

@parinporecha
Copy link
Contributor Author

@PARTP , apt-get is successfully able to install python3-gi. You can find it in the buildlog - https://s3.amazonaws.com/archive.travis-ci.org/jobs/22000562/log.txt

I've pasted below the relevant part -

Unpacking gir1.2-gtk-3.0 (from .../gir1.2-gtk-3.0_3.4.2-0ubuntu0.7_amd64.deb) ...
Selecting previously unselected package python3-minimal.
Unpacking python3-minimal (from .../python3-minimal_3.2.3-0ubuntu1.2_amd64.deb) ...
Selecting previously unselected package python3.
Unpacking python3 (from .../python3_3.2.3-0ubuntu1.2_amd64.deb) ...
Selecting previously unselected package python3-gi.
Unpacking python3-gi (from .../python3-gi_3.2.2-1~precise_amd64.deb) ...
Processing triggers for man-db ...
Setting up gir1.2-gtk-3.0 (3.4.2-0ubuntu0.7) ...
Setting up python3-minimal (3.2.3-0ubuntu1.2) ...
Setting up python3 (3.2.3-0ubuntu1.2) ...
Setting up python3-gi (3.2.2-1~precise) ...
Processing triggers for libc-bin ...
ldconfig deferred processing now taking place

@pqrth
Copy link
Contributor

pqrth commented Apr 3, 2014

@parinporecha, you're right. Packages via apt-get do get installed & are even imported with the help of system_site_packages.

  • The problem is with gi._gi module. When I explored the gi package, there's no python module for _gi but a shared object file _gi.cpython-32mu.so for cpython implementation.
  • I also set up a new Ubuntu 12.04 VM, just like Travis CI's worker & no error was thrown when I linked system-wide gi module to virtualenv & executed the same steps.

@izidormatusov
Copy link
Contributor

ibus-bogo-python seems to run those tests on Travis perfectly fine:

@pqrth
Copy link
Contributor

pqrth commented Apr 4, 2014

Thanks @izidormatusov for the example, the problem was caused by the combination of python 3.3 & Ubuntu 12.04 for shared object file _gi.cpython-32mu.so in gi package.
I should have understood the problem by noticing the python version on the Ubuntu 12.04 VM I set up.

izidormatusov added a commit to getting-things-gnome/liblarch that referenced this issue Apr 4, 2014
@NimitS1 NimitS1 closed this as completed Apr 13, 2014
@izidormatusov izidormatusov modified the milestones: 0.4, 0.3.2 Mar 15, 2015
johnnybubonic pushed a commit to johnnybubonic/gtg that referenced this issue Jul 20, 2020
@nekohayo nekohayo added the maintainability Automated tests suite, tooling, refactoring, or anything that makes it easier for developers label Feb 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug maintainability Automated tests suite, tooling, refactoring, or anything that makes it easier for developers priority:critical
Projects
None yet
Development

No branches or pull requests

5 participants