forked from moxie0/knockknock
-
Notifications
You must be signed in to change notification settings - Fork 1
/
setup.py
41 lines (34 loc) · 1.48 KB
/
setup.py
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
import sys, os, shutil
from distutils.core import setup, Extension
shutil.copyfile("knockknock-daemon.py", "knockknock/knockknock-daemon")
shutil.copyfile("knockknock-genprofile.py", "knockknock/knockknock-genprofile")
shutil.copyfile("knockknock-proxy.py", "knockknock/knockknock-proxy")
shutil.copyfile("knockknock.py", "knockknock/knockknock")
setup (name = 'knockknock',
version = '0.6',
description = 'A cryptographic single-packet port-knocker.',
author = 'Moxie Marlinspike',
author_email = 'moxie@thoughtcrime.org',
url = 'http://www.thoughtcrime.org/software/knockknock/',
license = 'GPL',
packages = ["knockknock", "knockknock.proxy"],
# package_dir = {'knockknock' : 'knockknock/'},
scripts = ['knockknock/knockknock-daemon',
'knockknock/knockknock-genprofile',
'knockknock/knockknock-proxy',
'knockknock/knockknock'],
data_files = [('share/knockknock', ['README', 'INSTALL', 'COPYING']),
('/etc/knockknock.d/', ['config'])]
)
print "Cleaning up..."
if os.path.exists("build/"):
shutil.rmtree("build/")
try:
os.remove("knockknock/knockknock-proxy")
os.remove("knockknock/knockknock-daemon")
os.remove("knockknock/knockknock-genprofile")
os.remove("knockknock/knockknock")
except:
pass
def capture(cmd):
return os.popen(cmd).read().strip()