#3 crash with python2 and python3
Opened 6 years ago by jibecfed. Modified 6 years ago

Hi, I think this Idea is great, but the script fails to compile :(

Here is the log for python2:

    Au plus haut niveau:
    SWIG/_m2crypto_wrap.c:4187:13: warning: « lock_count » défini mais pas utilisé [-Wunused-variable]
     static long lock_count[CRYPTO_NUM_LOCKS];
                 ^~~~~~~~~~
    SWIG/_m2crypto_wrap.c:4186:27: warning: « lock_cs » défini mais pas utilisé [-Wunused-variable]
     static PyThread_type_lock lock_cs[CRYPTO_NUM_LOCKS];
                               ^~~~~~~
    error: command 'gcc' failed with exit status 1

    ----------------------------------------
Command "/home/jean-baptiste/Projects/my-next-badge/bin/python2 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-PeLiDX/M2Crypto/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-8PE6PO-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/jean-baptiste/Projects/my-next-badge/include/site/python2.7/M2Crypto" failed with error code 1 in /tmp/pip-build-PeLiDX/M2Crypto/

Here is the log for python3:

Collecting fedbadges
  Using cached fedbadges-0.5.2.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-build-fk2pj_17/fedbadges/setup.py", line 16, in <module>
        long_description = file("README.rst").read().strip()
    NameError: name 'file' is not defined

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-fk2pj_17/fedbadges/

thanks for your help!


Good catch. I get the same error on F26 with Python 2. A workaround is to install m2crypto package with dnf, run virtualenv --system-site-packages my-next-badge and not install M2Crypto with pip.

For the Python 3 error it looks like fedbadges package does not really support that version. https://github.com/fedora-infra/fedbadges/pull/56 might fix it.

Login to comment on this ticket.

Metadata