Fix beem tests by installing beem in the system instead of as a user
Beem tests were recently broken, after installing beem via python3 setup.py install --user
, import beem
failed as below:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/beem/beem/__init__.py", line 2, in <module>
from .hive import Hive
File "/beem/beem/hive.py", line 25, in <module>
from .storage import configStorage as config
File "/beem/beem/storage.py", line 13, in <module>
from .aes import AESCipher
File "/beem/beem/aes.py", line 12, in <module>
from Cryptodome.Cipher import AES
File "/root/.local/lib/python3.6/site-packages/pycryptodomex-3.9.8-py3.6-linux-x86_64.egg/Cryptodome/Cipher/__init__.py", line 27, in <module>
from Cryptodome.Cipher._mode_ecb import _create_ecb_cipher
File "/root/.local/lib/python3.6/site-packages/pycryptodomex-3.9.8-py3.6-linux-x86_64.egg/Cryptodome/Cipher/_mode_ecb.py", line 29, in <module>
from Cryptodome.Util._raw_api import (load_pycryptodome_raw_lib,
File "/root/.local/lib/python3.6/site-packages/pycryptodomex-3.9.8-py3.6-linux-x86_64.egg/Cryptodome/Util/_raw_api.py", line 86, in <module>
ffi = FFI()
File "/usr/local/lib/python3.6/dist-packages/cffi/api.py", line 56, in __init__
backend.__version__, backend.__file__))
Exception: Version mismatch: this is the 'cffi' package version 1.14.0, located in '/usr/local/lib/python3.6/dist-packages/cffi/api.py'. When we import the top-level '_cffi_backend' extension module, we get version 1.11.5, located in '/usr/lib/python3/dist-packages/_cffi_backend.cpython-36m-x86_64-linux-gnu.so'. The two versions should be equal; check your installation.
I don't fully understand why, but I suspect we were getting a different version of cffi installed for the user vs the one installed in the system; when we imported cffi, it loaded the python code from the user but the shared library from the system. Just a guess, but this fixes it.