Closed lburg closed 9 years ago
Mh, the build broke because _smbus_cffi.so
is not in the same directory as smbus.py
, but when smbus-cffi
is installed through pip, both files are in the same directory.
I guess that's a change to reproduce in the Travis configuration?
@lburg Thanks for the report, the issue should be fixed in HEAD. Let me know if any issues remain. I'll push an update to pypi soon
Thanks for your quick response! However, I tried installing smbus-cffi from git to get the latest version like so:
pip install git+https://github.com/bivab/smbus-cffi.git
And I still have an error:
ImportError: No module named 'smbus._smbus_cffi'
Here is what smbus looks like in my venv:
/home/lburg/.virtualenvs/project/lib/python3.4/site-packages/smbus/
├── __about__.py
├── __init__.py
├── __pycache__
│ ├── __about__.cpython-34.pyc
│ ├── __init__.cpython-34.pyc
│ ├── smbus.cpython-34.pyc
│ └── util.cpython-34.pyc
├── smbus
│ └── _smbus_cffi.cpython-34m.so
├── smbus.py
└── util.py
As you can see, a smbus/
folder is created which contains _smbus_cffi.cpython-34m.so
. So now doing from ._smbus_cffi import ffi
is incorrect... So I guess keeping the module name as _smbus_cffi
is correct for a pypi release, but breaks Travis?
Thanks again for the report. Now everything should work for correctly in testing and installed with pip
Yep, it works. Thanks!
Hi! I use smbus-cffi in one of my python project and since upgrading to 0.5.0, my tests broke because
smbus
was not able to import_smbus_cffi
. I had the following error under python3.4:Here's a small PR that fixes this error, let me know if I missed anything.