From 29146dda448ed02f1457fb4ee883e9dba8ec3991 Mon Sep 17 00:00:00 2001 From: Dirk Loss <mail@dirk-loss.de> Date: Sun, 18 Oct 2009 14:36:33 +0200 Subject: [PATCH] Added batch files to start Scapy and UTScapy on Windows --- bin/UTscapy.bat | 2 ++ bin/scapy.bat | 2 ++ setup.py | 6 +++++- 3 files changed, 9 insertions(+), 1 deletion(-) create mode 100755 bin/UTscapy.bat create mode 100755 bin/scapy.bat diff --git a/bin/UTscapy.bat b/bin/UTscapy.bat new file mode 100755 index 00000000..53321454 --- /dev/null +++ b/bin/UTscapy.bat @@ -0,0 +1,2 @@ +REM Use Python to run the UTscapy script from the current directory, passing all parameters +@python %~dp0\UTscapy %* \ No newline at end of file diff --git a/bin/scapy.bat b/bin/scapy.bat new file mode 100755 index 00000000..b6d56a96 --- /dev/null +++ b/bin/scapy.bat @@ -0,0 +1,2 @@ +REM Use Python to run the Scapy script from the current directory, passing all parameters +@python %~dp0\scapy %* \ No newline at end of file diff --git a/setup.py b/setup.py index 2fffd0f9..477e26d2 100755 --- a/setup.py +++ b/setup.py @@ -34,12 +34,16 @@ def make_ezipfile(base_name, base_dir, verbose=0, dry_run=0): archive_util.ARCHIVE_FORMATS["ezip"] = (make_ezipfile,[],'Executable ZIP file') +SCRIPTS = ['bin/scapy','bin/UTscapy'] +# On Windows we also need additional batch files to run the above scripts +if os.name == "nt": + SCRIPTS += ['bin/scapy.bat','bin/UTscapy.bat'] setup( name = 'scapy', version = '2.0.1-dev', packages=['scapy','scapy/arch', 'scapy/arch/windows', 'scapy/layers','scapy/asn1','scapy/tools','scapy/modules'], - scripts = ['bin/scapy','bin/UTscapy'], + scripts = SCRIPTS, data_files = [('share/man/man1', ["doc/scapy.1.gz"])], # Metadata -- GitLab