-
Notifications
You must be signed in to change notification settings - Fork 214
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Python tests fail: No module named 'segyio._segyio' #511
Comments
Is the python extension built and made available? Try setup.py build_ext --inplace build and see if the problem persists. |
Not sure why does the test run |
The segyio_c tests specifically targets the C++ code in the extension, so it has to import it. Since loading it is expensive and makes (some) tests slightly harder to develop, it is not imported until it is requested. Starting fresh I'd not make the same mistake again, but this is expected behaviour as-of now. |
After But this command isn't run during the package build. Does this mean that some functionality is missing? |
No, not really, just that it's the more ergonomic approach. The problem is that setup.py build by default won't move the python extension (_segyio.so) into the source tree, and the build- and package scripts run the tests they do against the source tree. If you do setup.py install it will make sure to bring the _segyio.so file too, and the tests would pass again. By doing it this way, some things are still functional even without building (or moving) the .so, and there was not too much incentive to change it, since anyone coming across it is likely a developer (or packager) and would want to build with --inplace or pip install -e . anyway. |
Ok, thanks! |
No problem! |
setup.py test
fails:Python-3.8
FreeBSD 13
The text was updated successfully, but these errors were encountered: