1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23 """Installation and deployment script."""
24 __author__ = "Michael Cohen <scudette@gmail.com>"
25 import os
26 import subprocess
27 import setuptools
28
29 from setuptools import find_packages, setup, Command
30
31 rekall_description = "Rekall Memory Forensic Framework"
32
33 current_directory = os.path.dirname(__file__)
34
35 ENV = {"__file__": __file__}
36 exec open("rekall/_version.py").read() in ENV
37 VERSION = ENV["get_versions"]()
38
39
41 result = []
42 for directory, _, files in os.walk(source):
43 files = [os.path.join(directory, x) for x in files]
44 result.append((directory, files))
45
46 return result
47
48
49
50
51
52
53 install_requires = [
54 "artifacts == 20160114",
55 "pyaff4 >= 0.24, < 0.30",
56 "PyYAML == 3.11",
57 "acora == 2.0",
58 "arrow == 0.7.0",
59 "rekall-efilter == 1.5.2",
60 "intervaltree == 2.1.0",
61 "pycrypto == 2.6.1",
62 "pyelftools == 0.24",
63 "pyparsing==2.1.5",
64 "pytz == 2016.4",
65 "psutil >= 5.0, < 6.0",
66 "rekall-capstone == 3.0.4.post2",
67 "rekall-yara == 3.4.0.1",
68 "pytsk3 == 20160721",
69 "ipaddr==2.1.11",
70
71
72
73 "python-dateutil == 2.5.3",
74
75 "rekall-lib >= 1.7.0rc1, < 1.8",
76 ]
77
78 if "VIRTUAL_ENV" not in os.environ:
79 print "*****************************************************"
80 print " WARNING: You are not installing Rekall in a virtual"
81 print " environment. This configuration is not supported!!!"
82 print " Expect breakage."
83 print "*****************************************************"
84
85 if int(setuptools.__version__.split(".")[0]) < 8:
86 raise RuntimeError("Rekall requires at least setuptool version 8.0. "
87 "Please upgrade with 'pip install --upgrade setuptools'")
88
89
91 description = "Upgrade all the dependencies in the current virtualenv."
92 user_options = []
93
96
99
101 required = [x.split()[0] for x in install_requires]
102 output = subprocess.check_output(
103 ["pip", "install", "--upgrade"] + required)
104
105
106 output = subprocess.check_output(
107 ["pip", "freeze"])
108
109 result = []
110 for package in required:
111 try:
112 result.append(
113 [x for x in output.splitlines()
114 if package in x][0])
115 except IndexError:
116 pass
117
118 print "\n".join(sorted(result))
119
120
122 description = ("custom clean command that forcefully removes "
123 "dist/build directories")
124 user_options = []
125
128
130 self.cwd = os.getcwd()
131
133 if os.getcwd() != self.cwd:
134 raise RuntimeError('Must be in package root: %s' % self.cwd)
135
136 os.system('rm -rf ./build ./dist')
137
138
139 commands = {}
140 commands["pip_upgrade"] = PIPUpgrade
141 commands["clean"] = CleanCommand
142
143 setup(
144 name="rekall-core",
145 version=VERSION["pep440"],
146 cmdclass=commands,
147 description=rekall_description,
148 long_description=open(os.path.join(current_directory, "README.rst")).read(),
149 license="GPL",
150 url="https://www.rekall-forensic.com/",
151 author="The Rekall team",
152 author_email="rekall-discuss@googlegroups.com",
153 classifiers=[
154 "Development Status :: 4 - Beta",
155 "Environment :: Console",
156 "Operating System :: OS Independent",
157 "Programming Language :: Python",
158 ],
159 scripts=["rekall/rekal.py"],
160 package_dir={'rekall': 'rekall'},
161 packages=find_packages('.'),
162 data_files=find_data_files("resources"),
163
164 entry_points="""
165 [rekall.plugins]
166 plugins=rekall.plugins
167
168 [console_scripts]
169 rekal = rekall.rekal:main
170 rekall = rekall.rekal:main
171 """,
172 install_requires=install_requires,
173 extras_require={
174
175 ':sys_platform=="win32"': [
176 "pypiwin32==219",
177 ],
178 }
179 )
180