Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 449720 - sys-apps/pkgcore-0.8.6: SyntaxError during compilation of Python modules for Python 3
Summary: sys-apps/pkgcore-0.8.6: SyntaxError during compilation of Python modules for ...
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Brian Dolbec
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-01-02 01:35 UTC by Dennis Schridde
Modified: 2015-04-02 04:52 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dennis Schridde 2013-01-02 01:35:37 UTC
>>> Installing (1 of 1) sys-apps/pkgcore-0.8.6
 * Compilation and optimization of Python modules for CPython 3.2 ...                                                                                                                                                                   [ !! ]
 *     Compiling /usr/lib/python3.2/site-packages/pkgcore/binpkg/remote.py ...
 *     SyntaxError: ('invalid syntax', ('/usr/lib/python3.2/site-packages/pkgcore/binpkg/remote.py', 67, 44, 'class PackagesCacheV0(cache.bulk, metaclass=cache_meta):n'))
 *     
 *     Compiling /usr/lib/python3.2/site-packages/pkgcore/binpkg/xpak.py ...
 *     SyntaxError: ('invalid syntax', ('/usr/lib/python3.2/site-packages/pkgcore/binpkg/xpak.py', 39, 29, 'class Xpak(object, metaclass=autoconvert_py3k_methods_metaclass):n'))
 *     
 *     Compiling /usr/lib/python3.2/site-packages/pkgcore/cache/__init__.py ...
 *     SyntaxError: ('invalid syntax', ('/usr/lib/python3.2/site-packages/pkgcore/cache/__init__.py', 25, 29, 'class base(object, metaclass=autoconvert_py3k_methods_metaclass):n'))
 *     
 *     Compiling /usr/lib/python3.2/site-packages/pkgcore/ebuild/atom.py ...
 *     SyntaxError: ('invalid syntax', ('/usr/lib/python3.2/site-packages/pkgcore/ebuild/atom.py', 314, 45, 'class atom(boolean.AndRestriction, metaclass=generic_equality):n'))
[...]

Reproducible: Always
Comment 1 Dennis Schridde 2013-01-02 01:41:49 UTC
I installed this from a binary package.

I think the issue is that the host that built the binpkg has:
# eselect python show
python3.2

While the host that tries to install the package has:
# eselect python show 
python2.7

How this leads to the quoted error, I don't know. But I assume that this is an issue with the Python eclasses.
Comment 2 Pacho Ramos gentoo-dev 2013-06-16 09:53:02 UTC
Likely to be treecleaned as it's no longer maintained and neither has eapi5 support
Comment 3 Brian Dolbec (RETIRED) gentoo-dev 2013-06-21 19:34:48 UTC
That binpkg certainly looks like the cause of the problem.

As pkgcore is not yet capable of EAPI 5.  We'll hold off any binkpg verification changes until that's done and working.
Comment 4 Patrick Lauer gentoo-dev 2014-06-13 08:09:01 UTC
This is a code problem with py3.2+:

# pquery --debug
Cannot load script pquery.
Traceback (most recent call last):
  File "/usr/lib64/python3.3/site-packages/snakeoil/modules.py", line 33, in load_module
    m = __import__(name)
  File "/usr/lib64/python3.3/site-packages/pkgcore/scripts/pquery.py", line 9, in <module>
    from pkgcore.ebuild import conditionals, atom
  File "/usr/lib64/python3.3/site-packages/pkgcore/ebuild/conditionals.py", line 27, in <module>
    class DepSet(boolean.AndRestriction):
  File "/usr/lib64/python3.3/site-packages/snakeoil/caching.py", line 105, in __new__
    return type.__new__(cls, name, bases, d)
ValueError: 'has_conditionals' in __slots__ conflicts with class variable

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/bin/pquery", line 24, in <module>
    script = modules.load_module('pkgcore.scripts.%s' % (name,))
  File "/usr/lib64/python3.3/site-packages/snakeoil/modules.py", line 41, in load_module
    raise_from(FailedImport(name, e))
  File "/usr/lib64/python3.3/site-packages/snakeoil/compatibility.py", line 139, in raise_from
    raise new_exception
  File "/usr/lib64/python3.3/site-packages/snakeoil/modules.py", line 33, in load_module
    m = __import__(name)
  File "/usr/lib64/python3.3/site-packages/pkgcore/scripts/pquery.py", line 9, in <module>
    from pkgcore.ebuild import conditionals, atom
  File "/usr/lib64/python3.3/site-packages/pkgcore/ebuild/conditionals.py", line 27, in <module>
    class DepSet(boolean.AndRestriction):
  File "/usr/lib64/python3.3/site-packages/snakeoil/caching.py", line 105, in __new__
    return type.__new__(cls, name, bases, d)
snakeoil.modules.FailedImport: Failed importing target 'pkgcore.scripts.pquery': ''has_conditionals' in __slots__ conflicts with class variable'
Comment 5 Tim Harder gentoo-dev 2015-04-02 04:52:26 UTC
Closing as obsolete since pkgcore has never officially supported py3 yet and current ebuilds in the tree reinforce that.