Menu

#1 Not installable under pypy

wont-fix
nobody
None
bug
2020-01-23
2020-01-23
No
$ python --version
Python 2.7.8 (10f1b29a2bd2, Feb 02 2015, 21:22:43)
[PyPy 2.5.0 with GCC 4.6.3]
$ pip install ruamel.ordereddict
Downloading/unpacking ruamel.ordereddict
  Using download cache from /home/asottile/.pip/cache/https%3A%2F%2Fpypi.python.org%2Fpackages%2Fsource%2Fr%2Fruamel.ordereddict%2Fruamel.ordereddict-0.4.6.tar.gz
  Running setup.py (path:/home/asottile/workspace/pre-commit/venv/build/ruamel.ordereddict/setup.py) egg_info for package ruamel.ordereddict

Installing collected packages: ruamel.ordereddict
  Running setup.py install for ruamel.ordereddict
    building '_ordereddict' extension
    cc -O2 -fPIC -Wimplicit -I/home/asottile/workspace/pre-commit/venv/include -c ordereddict.c -o build/temp.linux-x86_64-2.7/ordereddict.o
    ordereddict.c: In function PyOrderedDict_GetItem:
    ordereddict.c:733:45: error: PyStringObject has no member named ob_shash
                 (hash = ((PyStringObject *) key)->ob_shash) == -1) {
                                                 ^
    ordereddict.c:744:14: error: _PyThreadState_Current undeclared (first use in this function)
         tstate = _PyThreadState_Current;
                  ^
    ordereddict.c:744:14: note: each undeclared identifier is reported only once for each function it appears in
    ordereddict.c:745:33: error: PyThreadState has no member named curexc_type
         if (tstate != NULL && tstate->curexc_type != NULL) {
                                     ^
    ordereddict.c: In function PyOrderedDict_SetItem:
    ordereddict.c:786:39: error: PyStringObject has no member named ob_shash
             hash = ((PyStringObject *)key)->ob_shash;
                                           ^
    ordereddict.c: In function PyOrderedDict_InsertItem:
    ordereddict.c:848:39: error: PyStringObject has no member named ob_shash
             hash = ((PyStringObject *)key)->ob_shash;
                                           ^
    ordereddict.c: In function PyOrderedDict_DelItem:
    ordereddict.c:911:45: error: PyStringObject has no member named ob_shash
                 (hash = ((PyStringObject *) key)->ob_shash) == -1) {
                                                 ^
    ordereddict.c: In function ordereddict_print:
    ordereddict.c:1115:5: warning: implicit declaration of function Py_ReprEnter [-Wimplicit-function-declaration]
         status = Py_ReprEnter((PyObject*)mp);
         ^
    ordereddict.c:1136:13: warning: implicit declaration of function Py_ReprLeave [-Wimplicit-function-declaration]
                 Py_ReprLeave((PyObject*)mp);
                 ^
    ordereddict.c: In function dict_subscript:
    ordereddict.c:1269:45: error: PyStringObject has no member named ob_shash
                 (hash = ((PyStringObject *) key)->ob_shash) == -1) {
                                                 ^
    ordereddict.c: In function dict_fromkeys:
    ordereddict.c:1668:5: warning: implicit declaration of function PyAnySet_CheckExact [-Wimplicit-function-declaration]
         if ((PyOrderedDict_CheckExact(d) || PySortedDict_CheckExact(d)) && PyAnySet_CheckExact(seq)) {
         ^
    ordereddict.c:1677:9: warning: implicit declaration of function _PySet_NextEntry [-Wimplicit-function-declaration]
             while (_PySet_NextEntry(seq, &pos, &key, &hash)) {
             ^
    ordereddict.c: In function dict_contains:
    ordereddict.c:2277:45: error: PyStringObject has no member named ob_shash
                 (hash = ((PyStringObject *) key)->ob_shash) == -1) {
                                                 ^
    ordereddict.c: In function dict_get:
    ordereddict.c:2330:45: error: PyStringObject has no member named ob_shash
                 (hash = ((PyStringObject *) key)->ob_shash) == -1) {
                                                 ^
    ordereddict.c: In function dict_setdefault:
    ordereddict.c:2359:45: error: PyStringObject has no member named ob_shash
                 (hash = ((PyStringObject *) key)->ob_shash) == -1) {
                                                 ^
    ordereddict.c: In function dict_pop:
    ordereddict.c:2405:45: error: PyStringObject has no member named ob_shash
                 (hash = ((PyStringObject *) key)->ob_shash) == -1) {
                                                 ^
    ordereddict.c: In function dict_index:
    ordereddict.c:2543:45: error: PyStringObject has no member named ob_shash
                 (hash = ((PyStringObject *) key)->ob_shash) == -1) {
                                                 ^
    ordereddict.c: In function dict_setkeys:
    ordereddict.c:2669:49: error: PyStringObject has no member named ob_shash
                     (hash = ((PyStringObject *) key)->ob_shash) == -1) {
                                                     ^
    ordereddict.c: In function dict_rename:
    ordereddict.c:2786:48: error: PyStringObject has no member named ob_shash
                 (hash = ((PyStringObject *) oldkey)->ob_shash) == -1) {
                                                    ^
    ordereddict.c: In function PyOrderedDict_Contains:
    ordereddict.c:3030:45: error: PyStringObject has no member named ob_shash
                 (hash = ((PyStringObject *) key)->ob_shash) == -1) {
                                                 ^
    error: command 'cc' failed with exit status 1
    Complete output from command /home/asottile/workspace/pre-commit/venv/bin/pypy -c "import setuptools, tokenize;__file__='/home/asottile/workspace/pre-commit/venv/build/ruamel.ordereddict/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-_6qcMk-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/asottile/workspace/pre-commit/venv/include/site/python2.7:
    running install

running build

running build_py

creating build

creating build/lib.linux-x86_64-2.7

creating build/lib.linux-x86_64-2.7/ruamel

creating build/lib.linux-x86_64-2.7/ruamel/ordereddict

copying ./__init__.py -> build/lib.linux-x86_64-2.7/ruamel/ordereddict

copying ./setup.py -> build/lib.linux-x86_64-2.7/ruamel/ordereddict

running build_ext

building '_ordereddict' extension

creating build/temp.linux-x86_64-2.7

cc -O2 -fPIC -Wimplicit -I/home/asottile/workspace/pre-commit/venv/include -c ordereddict.c -o build/temp.linux-x86_64-2.7/ordereddict.o

ordereddict.c: In function PyOrderedDict_GetItem:

ordereddict.c:733:45: error: PyStringObject has no member named ob_shash

             (hash = ((PyStringObject *) key)->ob_shash) == -1) {

                                             ^

ordereddict.c:744:14: error: _PyThreadState_Current undeclared (first use in this function)

     tstate = _PyThreadState_Current;

              ^

ordereddict.c:744:14: note: each undeclared identifier is reported only once for each function it appears in

ordereddict.c:745:33: error: PyThreadState has no member named curexc_type

     if (tstate != NULL && tstate->curexc_type != NULL) {

                                 ^

ordereddict.c: In function PyOrderedDict_SetItem:

ordereddict.c:786:39: error: PyStringObject has no member named ob_shash

         hash = ((PyStringObject *)key)->ob_shash;

                                       ^

ordereddict.c: In function PyOrderedDict_InsertItem:

ordereddict.c:848:39: error: PyStringObject has no member named ob_shash

         hash = ((PyStringObject *)key)->ob_shash;

                                       ^

ordereddict.c: In function PyOrderedDict_DelItem:

ordereddict.c:911:45: error: PyStringObject has no member named ob_shash

             (hash = ((PyStringObject *) key)->ob_shash) == -1) {

                                             ^

ordereddict.c: In function ordereddict_print:

ordereddict.c:1115:5: warning: implicit declaration of function Py_ReprEnter [-Wimplicit-function-declaration]

     status = Py_ReprEnter((PyObject*)mp);

     ^

ordereddict.c:1136:13: warning: implicit declaration of function Py_ReprLeave [-Wimplicit-function-declaration]

             Py_ReprLeave((PyObject*)mp);

             ^

ordereddict.c: In function dict_subscript:

ordereddict.c:1269:45: error: PyStringObject has no member named ob_shash

             (hash = ((PyStringObject *) key)->ob_shash) == -1) {

                                             ^

ordereddict.c: In function dict_fromkeys:

ordereddict.c:1668:5: warning: implicit declaration of function PyAnySet_CheckExact [-Wimplicit-function-declaration]

     if ((PyOrderedDict_CheckExact(d) || PySortedDict_CheckExact(d)) && PyAnySet_CheckExact(seq)) {

     ^

ordereddict.c:1677:9: warning: implicit declaration of function _PySet_NextEntry [-Wimplicit-function-declaration]

         while (_PySet_NextEntry(seq, &pos, &key, &hash)) {

         ^

ordereddict.c: In function dict_contains:

ordereddict.c:2277:45: error: PyStringObject has no member named ob_shash

             (hash = ((PyStringObject *) key)->ob_shash) == -1) {

                                             ^

ordereddict.c: In function dict_get:

ordereddict.c:2330:45: error: PyStringObject has no member named ob_shash

             (hash = ((PyStringObject *) key)->ob_shash) == -1) {

                                             ^

ordereddict.c: In function dict_setdefault:

ordereddict.c:2359:45: error: PyStringObject has no member named ob_shash

             (hash = ((PyStringObject *) key)->ob_shash) == -1) {

                                             ^

ordereddict.c: In function dict_pop:

ordereddict.c:2405:45: error: PyStringObject has no member named ob_shash

             (hash = ((PyStringObject *) key)->ob_shash) == -1) {

                                             ^

ordereddict.c: In function dict_index:

ordereddict.c:2543:45: error: PyStringObject has no member named ob_shash

             (hash = ((PyStringObject *) key)->ob_shash) == -1) {

                                             ^

ordereddict.c: In function dict_setkeys:

ordereddict.c:2669:49: error: PyStringObject has no member named ob_shash

                 (hash = ((PyStringObject *) key)->ob_shash) == -1) {

                                                 ^

ordereddict.c: In function dict_rename:

ordereddict.c:2786:48: error: PyStringObject has no member named ob_shash

             (hash = ((PyStringObject *) oldkey)->ob_shash) == -1) {

                                                ^

ordereddict.c: In function PyOrderedDict_Contains:

ordereddict.c:3030:45: error: PyStringObject has no member named ob_shash

             (hash = ((PyStringObject *) key)->ob_shash) == -1) {

                                             ^

error: command 'cc' failed with exit status 1

----------------------------------------
Cleaning up...
Command /home/asottile/workspace/pre-commit/venv/bin/pypy -c "import setuptools, tokenize;__file__='/home/asottile/workspace/pre-commit/venv/build/ruamel.ordereddict/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-_6qcMk-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/asottile/workspace/pre-commit/venv/include/site/python2.7 failed with error code 1 in /home/asottile/workspace/pre-commit/venv/build/ruamel.ordereddict
Traceback (most recent call last):
  File "app_main.py", line 75, in run_toplevel
  File "/home/asottile/workspace/pre-commit/venv/bin/pip", line 11, in <module>
    sys.exit(main())
  File "/home/asottile/workspace/pre-commit/venv/site-packages/pip/__init__.py", line 185, in main
    return command.main(cmd_args)
  File "/home/asottile/workspace/pre-commit/venv/site-packages/pip/basecommand.py", line 161, in main
    text = '\n'.join(complete_log)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 31: ordinal not in range(128)

(originally posted on 2015-03-18 at 17:17:15 by Anthony Sottile <asottile@bitbucket>)

Discussion

  • Anthon van der Neut

    ruamel.ordereddict only compiles for the CPython 2.x series and possible Stackless 2.7. It is unlikely going to work under any other implementation. I will try and update the PyPI metadata to reflect that status with the next revision

    (originally posted on 2015-03-18 at 17:27:39)

     
  • Anthon van der Neut

    • status set to wontfix

    (originally posted on 2015-03-18 at 17:27:59)

     
  • Anthon van der Neut

    Can you provide a pure python implementation? Otherwise I can't use this package nor ruamel.yaml which I'd like to use for http://github.com/pre-commit/pre-commit

    (originally posted on 2015-03-18 at 17:40:12 by Anthony Sottile <asottile@bitbucket>)

     
  • Anthon van der Neut

    Actually this is a C implementation derived from Larosa-Foord's odict module. However you should be able to use the minimalistic OrderedDict from the standard collections module. In compat.py of ruamel.yaml it is tested if ruamel.ordereddict can be loaded (and falls back to OrderedDict if not).

    You would probably be more helped with me making ruamel.yaml only pull in ruamel.ordereddict if installing on Cpython, currently I only check if I am on a 2.X. Correct?

    (originally posted on 2015-03-18 at 18:17:07)

     
  • Anthon van der Neut

    I updated ruamel.yaml to version 0.6.1, its setup.py now tests for the platform "CPython" before extending the "install_requires" with ruamel.ordereddict. So on pypy dependency on ruamel.yaml should no longer try and pull in ruamel.ordereddict.

    (originally posted on 2015-03-18 at 18:36:58)

     

Log in to post a comment.

MongoDB Logo MongoDB