After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 688062 - add py3cairo to the 3.8 modulesets
add py3cairo to the 3.8 modulesets
Status: RESOLVED FIXED
Product: jhbuild
Classification: Infrastructure
Component: module sets
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Jhbuild maintainers
Jhbuild QA
Depends on:
Blocks: python3
 
 
Reported: 2012-11-10 23:06 UTC by Matthias Clasen
Modified: 2012-11-14 22:00 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
waf: add support for a python-command attribute, useful for Python 3. (5.25 KB, patch)
2012-11-11 21:22 UTC, Frederic Peters
committed Details | Review
3.8: add py3cairo (pyobject dependency) (1.72 KB, patch)
2012-11-11 21:23 UTC, Frederic Peters
none Details | Review
3.8: add py3cairo (pygobject dependency) (1.72 KB, patch)
2012-11-11 21:24 UTC, Frederic Peters
committed Details | Review

Description Matthias Clasen 2012-11-10 23:06:06 UTC
as we are porting things to python3, we will need it as a dependency.


  <waf id="py3cairo">
    <pkg-config>py3cairo.pc</pkg-config>
    <branch module="releases/pycairo-1.10.0.tar.bz2" version="1.10.0" repo="cairo.org"
            hash="sha256:9aa4078e7eb5be583aeabbe8d87172797717f95e8c4338f0d4a17b683a7253be"
            size="246556"/>
    <dependencies>
      <dep package="cairo"/>
    </dependencies>
  </waf>


is what I tried to add next to py2cairo, but unfortunately, it doesn't work.
The waf script finds the wrong python (/usr/bin/python), and the only way to tell it to use python3 seems to be setting PYTHON=python3 in the environment - which jhbuild doesn't let me do :-(
Comment 1 Frederic Peters 2012-11-11 21:22:56 UTC
Created attachment 228734 [details] [review]
waf: add support for a python-command attribute, useful for Python 3.
Comment 2 Frederic Peters 2012-11-11 21:23:11 UTC
Created attachment 228735 [details] [review]
3.8: add py3cairo (pyobject dependency)
Comment 3 Frederic Peters 2012-11-11 21:24:37 UTC
Created attachment 228736 [details] [review]
3.8: add py3cairo (pygobject dependency)
Comment 4 Craig Keogh 2012-11-14 11:22:19 UTC
Review of attachment 228736 [details] [review]:

Thank you, looks good to commit. There is still some work to be done. I'd expect this to work:
# jhbuild run python3 -c "import cairo"
Traceback (most recent call last):
  • File "<string>", line 1 in <module>
  • File "/opt/gnome/lib64/python2.7/site-packages/cairo/__init__.py", line 1 in <module>
    from _cairo import *
ImportError: No module named _cairo

PYTHONPATH is wrong.
Comment 5 Frederic Peters 2012-11-14 12:09:41 UTC
It would have been much easier if Python 3 had a different environment variable (looks like that was discussed in <http://bugs.python.org/issue2375>); actually I don't know, I have no idea how we're supposed to get both python versions to behave properly.
Comment 6 Craig Keogh 2012-11-14 22:00:39 UTC
(In reply to comment #5)
> It would have been much easier if Python 3 had a different environment variable
> (looks like that was discussed in <http://bugs.python.org/issue2375>); actually
> I don't know, I have no idea how we're supposed to get both python versions to
> behave properly.

I raised a new bug for this. See bug 688353.