-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
25 lines (20 loc) · 743 Bytes
/
setup.py
File metadata and controls
25 lines (20 loc) · 743 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
"""Build configuration for the native arpscanner C extension."""
import os
import sysconfig
from setuptools import setup, Extension # pylint: disable=import-error
# For macOS, we need to explicitly include libpcap
extra_compile_args = []
extra_link_args = []
if os.uname().sysname == 'Darwin': # macOS
extra_compile_args = ['-I/opt/homebrew/include']
extra_link_args = ['-L/opt/homebrew/lib', '-lpcap']
module = Extension('arpscanner',
sources=['arpscanner.c'],
include_dirs=[sysconfig.get_path('include')],
extra_compile_args=extra_compile_args,
extra_link_args=extra_link_args)
setup(
name='ArpScanner',
version='1.0',
ext_modules=[module]
)