After building via maturin build and installing the wheel via pip, running python3 -c "import adblock" results in:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/home/florian/tmp/python-adblock/adblock/__init__.py", line 1, in <module>
from .adblock import __version__, Engine, FilterSet, BlockerResult, UrlSpecificResources
ModuleNotFoundError: No module named 'adblock.adblock'
This is because the adblock module gets imported, and due to from .adblock import, Python tries to import adblock.adblock.
When trying again outside of the git repository, the import works fine.
It looks like that adblock module is only required for type annotations? Is the __init__.py really required, and is the import even correct? Perhaps it could be moved to src/ somehow to not interfere with the native extension module?
After building via
maturin buildand installing the wheel via pip, runningpython3 -c "import adblock"results in:This is because the
adblockmodule gets imported, and due tofrom .adblockimport, Python tries to importadblock.adblock.When trying again outside of the git repository, the import works fine.
It looks like that
adblockmodule is only required for type annotations? Is the__init__.pyreally required, and is the import even correct? Perhaps it could be moved tosrc/somehow to not interfere with the native extension module?