-
Notifications
You must be signed in to change notification settings - Fork 1
/
setup.py
93 lines (81 loc) · 2.98 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Setuptools scripts."""
from setuptools import setup
import distutils.cmd
import distutils.log
import subprocess
import sys
class PyPrepTestsCommand(distutils.cmd.Command):
"""
A custom command to build test sets.
Requires ctypeslib2.
"""
description = 'Run tests and dumps memory'
user_options = []
def initialize_options(self):
"""Set default values for options."""
pass
def finalize_options(self):
"""Post-process options."""
pass
def run(self):
"""Run command."""
import os
import sys
os.getcwd()
# all dump files are in .tgz
makeCmd = ['make', '-d']
p = subprocess.Popen(makeCmd, stdout=sys.stdout, cwd='test/src/')
p.wait()
return p.returncode
setup(name="haystack-reverse",
version="0.42",
description="Reverse C Structures from a process' memory",
long_description=open("README.rst").read(),
url="http://packages.python.org/haystack-reverse/",
download_url="http://github.com/trolldbois/python-haystack-reverse/tree/master",
license="GPL",
classifiers=[
"Topic :: System :: Networking",
"Topic :: Security",
"Environment :: Console",
"Intended Audience :: Developers",
"License :: OSI Approved :: GNU General Public License (GPL)",
"Programming Language :: Python",
"Development Status :: 4 - Beta",
# "Development Status :: 5 - Production/Stable",
],
keywords=["memory", "analysis", "forensics", "record", "struct", "reverse", "heap"],
author="Loic Jaquemet",
author_email="loic.jaquemet+python@gmail.com",
packages=["haystack.reverse",
"haystack.reverse.heuristics",
],
package_data={"haystack.reverse.heuristics": ['data/words.100'],},
entry_points={
# TODO : transform scripts into haystack-reverse subparsers + entry points
'console_scripts': [
'haystack-reverse = haystack.reverse.cli:reverse',
'haystack-reverse-show = haystack.reverse.cli:reverse_show',
'haystack-reverse-parents = haystack.reverse.cli:reverse_parents',
'haystack-reverse-hex = haystack.reverse.cli:reverse_hex',
]
},
# reverse: numpy is a dependency for reverse.
# https://github.com/numpy/numpy/issues/2434
# numpy is already installed in travis-ci
# setup_requires=["numpy"],
# reverse: install requires networkx, numpy, Levenshtein for signatures
install_requires=["haystack>=0.42",
"numpy",
"networkx",
"python-Levenshtein"],
dependency_links=[
"https://github.com/trolldbois/python-haystack/tarball/development#egg=haystack",
],
test_suite="test.alltests",
cmdclass={
'preptests': PyPrepTestsCommand,
},
)