added libpcap-dev installation insted of libcap-dev

This commit is contained in:
navjot 2021-02-08 23:44:48 +05:30
parent a863b41863
commit b1d07214ac
No known key found for this signature in database
GPG Key ID: 9EE70AFD71357F1C
3 changed files with 30 additions and 6 deletions

View File

@ -5,7 +5,7 @@ addons:
apt:
packages:
- build-essential
- libcap-dev
- libpcap-dev
- python-qt4
- tor
- xvfb

View File

@ -10,6 +10,7 @@ Limitations:
EXTRAS_REQUIRE. This is fine because most developers do, too.
"""
print('line...........................13')
import os
import sys
from distutils.errors import CompileError
@ -44,9 +45,9 @@ EXTRAS_REQUIRE_DEPS = {
# The packages needed for this requirement, by OS
"OpenBSD": [""],
"FreeBSD": [""],
"Debian": ["libcap-dev python-prctl"],
"Ubuntu": ["libcap-dev python-prctl"],
"Ubuntu 12": ["libcap-dev python-prctl"],
"Debian": ["libpcap-dev python-prctl"],
"Ubuntu": ["libpcap-dev python-prctl"],
"Ubuntu 12": ["libpcap-dev python-prctl"],
"openSUSE": [""],
"Fedora": ["prctl"],
"Guix": [""],
@ -56,19 +57,26 @@ EXTRAS_REQUIRE_DEPS = {
def detectPrereqs(missing=True):
print('line...........................60')
available = []
for module in PACKAGES:
try:
# import pdb;pdb.set_trace()
print('nodule---------: ', module)
import_module(module)
print('pass.........................')
if not missing:
available.append(module)
except ImportError:
print('Fail.........................')
if missing:
available.append(module)
print('available------:', available)
return available
def prereqToPackages():
print('line...........................78')
if not detectPrereqs():
return
print("%s %s" % (
@ -77,6 +85,7 @@ def prereqToPackages():
def compilerToPackages():
print('line...........................87')
if not detectOS() in COMPILING:
return
print("%s %s" % (
@ -84,6 +93,7 @@ def compilerToPackages():
def testCompiler():
print('line...........................95')
if not HAVE_SETUPTOOLS:
# silent, we can't test without setuptools
return True
@ -109,21 +119,26 @@ def testCompiler():
return os.path.isfile(fullPath)
print('line...........................121')
prereqs = detectPrereqs()
compiler = testCompiler()
print('compiler-----------: ', compiler)
if (not compiler or prereqs) and detectOS() in PACKAGE_MANAGER:
print('line...........................126')
print(
"It looks like you're using %s. "
"It is highly recommended to use the package manager\n"
"to install the missing dependencies." % detectOS.result)
if not compiler:
print('line...........................133')
print(
"Building the bitmsghash module failed.\n"
"You may be missing a C++ compiler and/or the OpenSSL headers.")
if prereqs:
print('line...........................139')
mandatory = [x for x in prereqs if not PACKAGES[x].get("optional")]
optional = [x for x in prereqs if PACKAGES[x].get("optional")]
if mandatory:
@ -136,17 +151,25 @@ if prereqs:
# Install the system dependencies of optional extras_require components
OPSYS = detectOS()
CMD = PACKAGE_MANAGER[OPSYS] if OPSYS in PACKAGE_MANAGER else 'UNKNOWN_INSTALLER'
print('CMD---------------: ', CMD)
print('line...........................152')
for lhs, rhs in EXTRAS_REQUIRE.items():
if OPSYS is None:
break
print()
if rhs and any([
EXTRAS_REQUIRE_DEPS[x][OPSYS]
for x in rhs
if x in EXTRAS_REQUIRE_DEPS
]):
print('EXTRAS_REQUIRE_DEPS[x][OPSYS]: ', EXTRAS_REQUIRE_DEPS[rhs[0]][OPSYS])
try:
print('lhs---------: ', lhs, rhs)
import_module(lhs)
print('pass..................167')
# import pdb;pdb.set_trace()
except Exception as e:
print('fail-----------------169')
rhs_cmd = ''.join([
CMD,
' ',
@ -162,6 +185,7 @@ for lhs, rhs in EXTRAS_REQUIRE.items():
"Optional dependency `pip install .[{}]` would require `{}`"
" to be run as root".format(lhs, rhs_cmd))
print('line...........................179')
if (not compiler or prereqs) and OPSYS in PACKAGE_MANAGER:
print("You can install the missing dependencies by running, as root:")
if not compiler:

View File

@ -1,6 +1,6 @@
#python_prctl
python-prctl
psutil
pycrypto
#libssl-dev
#libcap-dev
python-prctl
#libcap-dev