Skip to content

Commit

Permalink
Scapy missing required dependencies on OSX
Browse files Browse the repository at this point in the history
- scapy misses to declare dnet and pcapy as required deps. At least
on OSX, not sure about other platforms
  • Loading branch information
alexmgr committed Jul 19, 2015
1 parent 8c9be76 commit 4d92a78
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from __future__ import with_statement
import fileinput
import os
import platform
import sys
from setuptools import setup
from setuptools.command.install import install as _install
Expand Down Expand Up @@ -101,6 +102,12 @@ def _post_install(dir_):
else:
print(line, end="")

def os_install_requires():
dependencies = ["scapy", "pycrypto"]
# Scapy on OSX requires dnet and pcapy, but fails to declare them as dependencies
if platform.system() == "Darwin":
dependencies.extend(("dnet", "pcapy"))
return dependencies

def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
Expand All @@ -119,7 +126,7 @@ def read(fname):
download_url="https://github.com/tintinweb/scapy-ssl_tls/tarball/v1.2",
# generate rst from .md: pandoc --from=markdown --to=rst README.md -o README.rst (fix diff section and footer)
long_description=read("README.rst") if os.path.isfile("README.rst") else read("README.md"),
install_requires=["scapy", "pycrypto"],
install_requires=os_install_requires(),
test_suite="nose.collector",
tests_require=["nose", "scapy", "pycrypto"],
# Change once virtualenv bug is fixed
Expand Down

0 comments on commit 4d92a78

Please sign in to comment.