-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathsetup.py
executable file
·48 lines (44 loc) · 1.86 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
#!/usr/bin/env python
import os
from distutils.core import setup, Extension
try:
build_dir = os.environ['BITPUNCH_BUILD_DIR']
except KeyError:
build_dir = 'build'
model = Extension('bitpunch.model.model_ext',
sources = ['pythonlib/bitpunch/model/modelmodule.c'],
include_dirs = ['libbitpunch/include', '.'],
library_dirs = ['{}/lib'.format(build_dir)],
libraries = ['bitpunch'],
define_macros=[
('DEBUG', None),
('BUILD_DIR', build_dir),
('PATH_TO_PARSER_TAB_H',
'"{}/libbitpunch/tmp/core/parser.tab.h"'
.format(build_dir))
],
extra_compile_args=['-O0'])
setup (name = 'bitpunch',
version = '0.1.0',
author = 'Jonathan Gramain',
author_email = '[email protected]',
classifiers = [
'Development Status :: 3 - Alpha',
'Environment :: Console',
'License :: OSI Approved :: BSD License',
'Operating System :: POSIX :: Linux',
'Programming Language :: C',
'Programming Language :: Python',
'Topic :: Software Development :: Libraries :: Python Modules',
'Topic :: Software Development :: Interpreters',
'Topic :: System :: Recovery Tools',
],
description = 'BitPunch, a Swiss Army knife for structured binary files (Python library)',
package_dir = {'': 'pythonlib'},
package_data = {'': ['resources/__init__.py',
'resources/bp/*',
'resources/bp/*/*',
'resources/bp/*/*/*']},
packages = ['nestedcmd', 'bitpunch.model', 'bitpunch', 'bitpunch_cli'],
py_modules = [],
ext_modules = [model])