wheel2deb
wheel2deb copied to clipboard
Debian 11 raise an error
During execution convert WHL package on Debian package raises an next error:
Traceback (most recent call last):
File "~/log_functions/.venv/bin/wheel2deb", line 5, in <module>
from wheel2deb import main
File "~/log_functions/.venv/lib/python3.9/site-packages/wheel2deb.py", line 12, in <module>
from _wheel2deb.debian import SourcePackage
File "~/log_functions/.venv/lib/python3.9/site-packages/_wheel2deb/debian.py", line 10, in <module>
from .depends import suggest_name, search_python_deps, normalize_package_version
File "~/log_functions/.venv/lib/python3.9/site-packages/_wheel2deb/depends.py", line 5, in <module>
from .apt import search_packages
File "~/log_functions/.venv/lib/python3.9/site-packages/_wheel2deb/apt.py", line 2, in <module>
import apt
ModuleNotFoundError: No module named 'apt'
I check python3-apt is installed but outside an virtual environment. How to avoid to use apt package module?
When initiating your virtual enviroment use --system-site-packages. This makes the system packages available inside the Virtual enviroment. Thats how i fixed this error. see also https://stackoverflow.com/questions/12079607/make-virtualenv-inherit-specific-packages-from-your-global-site-packages
Building Debian packages is only possible on a Debain compatible distribution?
In general, of course, this is not such a big problem, but perhaps not using apt
module could allow more distributions to be supported?
And why is the apt
module needed in principle, so I understand that dpkg-deb
is enough to create the Debain package?
I'm not a developer of wheel2deb or associated with its maintainers, just someone who had the same problem with virtual environments last week or so ;)
With a quick look over the code base, i think the apt module is used to search for valid package names. The deb generation itself only needs dpkg-deb.
Make sure you are running the latest release. python3-apt is no longer a dependency.