Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 491404 - dev-python/pexpect-3.0 with pypy-2.0 - ImportError: No module named ctypes_config_cache._resource_cache
Summary: dev-python/pexpect-3.0 with pypy-2.0 - ImportError: No module named ctypes_co...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Python Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 451828
  Show dependency tree
 
Reported: 2013-11-16 10:57 UTC by Michał Górny
Modified: 2014-11-04 22:21 UTC (History)
3 users (show)

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


Attachments
Build log (dev-python:pexpect-3.0:20131116-105305.log,9.85 KB, text/x-log)
2013-11-16 10:57 UTC, Michał Górny
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2013-11-16 10:57:37 UTC
Created attachment 363364 [details]
Build log

In compile phase for pypy2.0:

Traceback (most recent call last):
  File "app_main.py", line 72, in run_toplevel
  File "setup.py", line 3, in <module>
    from pexpect import __version__
  File "/tmp/portage/dev-python/pexpect-3.0/work/pexpect-3.0/pexpect/__init__.py", line 85, in <module>
    raise ImportError(str(err) + '''
ImportError: No module named ctypes_config_cache._resource_cache

A critical module was not found. Probably this operating system does not
support it. Pexpect is intended for UNIX-like operating systems.


Is my pypy broken or did you add it without testing?
Comment 1 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2013-11-16 11:31:11 UTC
Looking closer at it, it seems to fail at import of resource module [1]. So it's most likely our pypy being broken somehow ;/.

[1]:http://docs.python.org/2/library/resource.html
Comment 2 Justin Lecher (RETIRED) gentoo-dev 2013-11-23 14:49:45 UTC
In progress here?
Comment 3 Justin Lecher (RETIRED) gentoo-dev 2013-12-06 19:30:18 UTC
+  06 Dec 2013; Justin Lecher <jlec@gentoo.org> pexpect-3.0.ebuild,
+  metadata.xml:
+  Drop pypy2_0 support, #491404
+
Comment 4 Alice Ferrazzi Gentoo Infrastructure gentoo-dev 2014-03-17 13:49:17 UTC
i could compile and import pexpect without problem http://bpaste.net/show/189957/ pexpect-3.1 pypy-2.0
Comment 5 Juraj Variny 2014-08-20 20:17:25 UTC
I am not able to install it. Using pypy-bin-2.3.1, trying to install pexpect in virtualenv ( virtualenv-1.11.6 ) yiels the same error. I did not try to emerge it as I don't need it globally and don't know how to force pypy into its PYTHON_TARGETS.

% pip install pexpect
Downloading/unpacking pexpect
  Downloading pexpect-3.3.tar.gz (132kB): 132kB downloaded
  Running setup.py (path:/data/s3env/build/pexpect/setup.py) egg_info for package pexpect
    Traceback (most recent call last):
      File "app_main.py", line 75, in run_toplevel
      File "app_main.py", line 581, in run_it
      File "<string>", line 17, in <module>
      File "/data/s3env/build/pexpect/setup.py", line 3, in <module>
        from pexpect import __version__
      File "pexpect/__init__.py", line 86, in <module>
        raise ImportError(str(err) + '''
    ImportError: No module named ctypes_config_cache._resource_cache
    
    A critical module was not found. Probably this operating system does not
    support it. Pexpect is intended for UNIX-like operating systems.
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):

  File "app_main.py", line 75, in run_toplevel

  File "app_main.py", line 581, in run_it

  File "<string>", line 17, in <module>

  File "/data/s3env/build/pexpect/setup.py", line 3, in <module>

    from pexpect import __version__

  File "pexpect/__init__.py", line 86, in <module>

    raise ImportError(str(err) + '''

ImportError: No module named ctypes_config_cache._resource_cache
Comment 6 Fabian Henze 2014-10-15 15:16:25 UTC
installing dev-python/pexpect-3.3 with python_targets_pypy works fine with pypy 2.3.1
Maybe it's time to close this bug and readd the pypy support to the ebuild?
Comment 7 Justin Lecher (RETIRED) gentoo-dev 2014-10-26 18:03:30 UTC
+  26 Oct 2014; Justin Lecher <jlec@gentoo.org> pexpect-3.3.ebuild:
+  add pypy support, #491404
+
Comment 8 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2014-11-01 09:31:36 UTC
I'm getting the same error on both of my systems with pypy-bin-2.3.1.
Comment 9 Justin Lecher (RETIRED) gentoo-dev 2014-11-01 09:41:54 UTC
(In reply to Michał Górny from comment #8)
> I'm getting the same error on both of my systems with pypy-bin-2.3.1.

works for me on native pypy, just rechecked.
Comment 10 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2014-11-01 11:48:41 UTC
Could you host a binpackage of your native pypy for comparison? Alternatively, compare what you get with pypy and pypy-bin :).
Comment 11 Justin Lecher (RETIRED) gentoo-dev 2014-11-03 07:42:48 UTC
(In reply to Michał Górny from comment #10)
> Could you host a binpackage of your native pypy for comparison?
> Alternatively, compare what you get with pypy and pypy-bin :).

http://dev.gentoo.org/~jlec/paste/pypy-2.3.1-r1.tbz2
Comment 12 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2014-11-03 08:24:01 UTC
So it seems that our pypy-bin is incomplete…

Only in ./include: numpy
Only in ./lib_pypy/ctypes_config_cache: _locale_64_.py
Only in ./lib_pypy/ctypes_config_cache: _locale_cache.py
Only in ./lib_pypy/ctypes_config_cache: _resource_64_.py
Only in ./lib_pypy/ctypes_config_cache: _resource_cache.py
Comment 13 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2014-11-04 20:07:14 UTC
Using emerge output:

<<<          obj /usr/lib64/pypy/lib_pypy/ctypes_config_cache/_resource_cache.pyc
<<<          obj /usr/lib64/pypy/lib_pypy/ctypes_config_cache/_resource_cache.py
<<<          obj /usr/lib64/pypy/lib_pypy/ctypes_config_cache/_resource_64_.pyc
<<<          obj /usr/lib64/pypy/lib_pypy/ctypes_config_cache/_resource_64_.py
<<<          obj /usr/lib64/pypy/lib_pypy/ctypes_config_cache/_locale_cache.pyc
<<<          obj /usr/lib64/pypy/lib_pypy/ctypes_config_cache/_locale_cache.py
<<<          obj /usr/lib64/pypy/lib_pypy/ctypes_config_cache/_locale_64_.pyc
<<<          obj /usr/lib64/pypy/lib_pypy/ctypes_config_cache/_locale_64_.py
<<<          obj /usr/lib64/pypy/include/numpy/old_defines.h
<<<          obj /usr/lib64/pypy/include/numpy/npy_3kcompat.h
<<<          obj /usr/lib64/pypy/include/numpy/arrayobject.h
Comment 14 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2014-11-04 22:21:48 UTC
+*pypy-bin-2.3.1-r2 (04 Nov 2014)
+
+  04 Nov 2014; Michał Górny <mgorny@gentoo.org> +pypy-bin-2.3.1-r2.ebuild,
+  -pypy-bin-2.3.1-r1.ebuild, pypy-bin-2.4.0.ebuild:
+  Rebuild ctypes config cache to fix resources module, bug #491404. Install
+  missing numpy headers.