Code Monkey home page Code Monkey logo

Comments (7)

parinporecha avatar parinporecha commented on July 19, 2024

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

from gtg.

izidormatusov avatar izidormatusov commented on July 19, 2024

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

from gtg.

pqrth avatar pqrth commented on July 19, 2024

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.

from gtg.

parinporecha avatar parinporecha commented on July 19, 2024

@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

from gtg.

pqrth avatar pqrth commented on July 19, 2024

@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.

from gtg.

izidormatusov avatar izidormatusov commented on July 19, 2024

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

from gtg.

pqrth avatar pqrth commented on July 19, 2024

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.

from gtg.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.