Open rpdelaney opened 9 years ago
Are you suggesting that we add automatic detection of OS to choose the correct package manager? Module check does warn that apt-get will be used to install the dependency.
All we need to do is remove the module checker and add a requirements.txt. I wrote this tool prior to learning about pip's requirements.txt. Should be an easy fix, I'll get to it sometime this week.
On Wed, Dec 24, 2014 at 8:39 AM, David Dworken notifications@github.com wrote:
Are you suggesting that we add automatic detection of OS to choose the correct package manager? Module check does warn that apt-get will be used to install the dependency.
— Reply to this email directly or view it on GitHub https://github.com/DanMcInerney/LANs.py/issues/50#issuecomment-68059221.
That should also fix the issue of the new nfqueue package not being backwards compatible although I haven't officially verified that myself yet. But either way we can set requirements.txt to specify the right version.
On Wed, Dec 24, 2014 at 9:03 AM, Dan McInerney dan.h.mcinerney@gmail.com wrote:
All we need to do is remove the module checker and add a requirements.txt. I wrote this tool prior to learning about pip's requirements.txt. Should be an easy fix, I'll get to it sometime this week.
On Wed, Dec 24, 2014 at 8:39 AM, David Dworken notifications@github.com wrote:
Are you suggesting that we add automatic detection of OS to choose the correct package manager? Module check does warn that apt-get will be used to install the dependency.
— Reply to this email directly or view it on GitHub https://github.com/DanMcInerney/LANs.py/issues/50#issuecomment-68059221 .
Yep, pip
is the way to go. In other cases, the type
built-in is useful for checking if a package is installed before attempting to execute it.
I added a requirements.txt but nfqueue is still a little weird. So apparently pip sees that package as NetfilterQueue rather than nfqueue. It also struggles to install some dependencies of that python library like libnetfilter-queue* throwing some very ambiguous errors. Installing system-wide with apt-get or yum doesn't seem to have this problem. So I have all the normal libraries pip can install in requirements but I still have the hacky module_check() in there just for nfqueue. Sometime later I'll figure out how to make that nicer.
In
module_check()
you present the user with an opportunity to install missing modules viaapt-get
. However, there is no confirmation thatapt-get
is installed.