Hi.  I've landed here because of LP: #1310794.  In order to drop Python
2 from the Ubuntu touch image, we need to port all autopilot tests to
Python 3.  One of the current blockers is unity7, which uses the python-
compizconfig package to access the Python level `compizconfig.Context`
object.

This is problematic because the compiz Python bindings are provided by a
pyrex module, compizconfig.pyx.  Pyrex itself is essentially dead
upstream, the last release happening in 2011 afaict.  It also doesn't
support Python 3 afaict.  So porting python-compizconfig to Python 3 is
going to be a major PITA.  I don't even know if it's worth it, if say
unity7 is deprecated in 'U'.

Let's say it *is* worth it, there are a few options.  The Python
bindings could be hand-coded, or we could use ctypes, but in both those
cases, the entire module would have to be ported.  Are there enough
tests so that we know when we're done and have a high quality port?

The other option is to try to port just what's needed for unity7's
autopilot tests.  That may be just as big a task though, depending on
how much of the compizconfig API the tests require.

As for Python 2/3 on Ubuntu, we would like Python 3 to be "the default"
in the sense that all system scripts and services written in Python
should be Python 3.  However, we'll never change /usr/bin/python like
Arch did.  As inherited from Debian, /usr/bin/python will *always* be
Python 2 (unless and until PEP 394 changes that recommendation, but
don't hold your breath).  /usr/bin/python3 is what you need to use, but
as is pointed out, most distros will heed PEP 394 and provide a
/usr/bin/python2 symlink too.  Ubuntu and Debian do.

Any guidance you can provide on helping us get enough of compizconfig
exposed to Python 3 would be very helpful.

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to compiz in Ubuntu.
https://bugs.launchpad.net/bugs/1004592

Title:
  Compiz fails to build ~ looks like finding python ver. doesn't work
  properly (Archlinux)

Status in Compiz:
  Triaged
Status in “compiz” package in Ubuntu:
  Triaged

Bug description:
  I can't build compiz on Arch, right now. it looks like you guys have
  changed around how compiz uses python. i used to just specify in
  CMakelists.txt to use python2 instead of python (3) ... anyway, it
  currently doesn't pick up on python, and then fails a few lines later.

  (relevant) output;

  -- checking for modules 'x11;libxml-2.0;libxslt;protobuf'
  --   found x11, version 1.4.99.901
  --   found libxml-2.0, version 2.7.8
  --   found libxslt, version 1.1.26
  --   found protobuf, version 2.4.1
    File "<string>", line 1
      import sys; print str (sys.version_info.major) + '.' + str 
(sys.version_info.minor)
                          ^
  SyntaxError: invalid syntax
  CMake Error at compizconfig/compizconfig-python/CMakeLists.txt:24 (string):
    string sub-command REPLACE requires at least four arguments.

  
  -- Adding test test_profile
  -- Adding test test_setting
  -- Adding test test_plugin
  -- Adding test test_backend
    File "<string>", line 1
      import sys; print str (sys.version_info.major) + '.' + str 
(sys.version_info.minor)
                          ^
  SyntaxError: invalid syntax
  CMake Error at compizconfig/ccsm/CMakeLists.txt:24 (string):
    string sub-command REPLACE requires at least four arguments.

  
  -- checking for module 'glib-2.0'
  --   found glib-2.0, version 2.32.3
  -- checking for module 'gconf-2.0'

  So being as line 20 fails due to a syntax error, when it is supposed
  to pass on those arguments to be used in line 24, it obviously fails
  because nothing is passed.

  I think this build error actually cropped up a day or two ago, but i
  had thought it was a Clang-bug, as i was going to see if compiz would
  compile with it (ie: i saw Sam's branch - ' the whole thing goes
  clang). when it failed i didn't investigate, and hadn't tried to
  compile compiz until today after seeing the latest revisions and
  decided to upgrade (using GCC, as i normally would).

  cheerz

To manage notifications about this bug go to:
https://bugs.launchpad.net/compiz/+bug/1004592/+subscriptions

-- 
Mailing list: https://launchpad.net/~desktop-packages
Post to     : desktop-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~desktop-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to