mirror of
https://github.com/geohot/qira
synced 2025-03-12 10:03:40 +03:00
qiradb is no longer a module
This commit is contained in:
parent
553a291af3
commit
dfb1a4a166
@ -10,7 +10,6 @@ WORKDIR /qira
|
||||
|
||||
# install python packages, build qemu, and link qira
|
||||
RUN pip install --upgrade -r requirements.txt
|
||||
RUN pip install --upgrade ./qiradb
|
||||
RUN cd tracers && ./qemu_build.sh
|
||||
RUN ln -sf /qira/middleware/qira.py /usr/local/bin/qira
|
||||
|
||||
|
@ -65,7 +65,6 @@ fi
|
||||
$VIRTUALENV venv
|
||||
source venv/bin/activate
|
||||
$PIP install --upgrade -r requirements.txt
|
||||
$PIP install --upgrade ./qiradb
|
||||
|
||||
echo "making symlink"
|
||||
sudo ln -sf $(pwd)/qira /usr/local/bin/qira
|
||||
|
@ -1 +1,2 @@
|
||||
qiradb.cpp
|
||||
*.pyxbldc
|
8
middleware/qiradb/__init__.py
Normal file
8
middleware/qiradb/__init__.py
Normal file
@ -0,0 +1,8 @@
|
||||
import sys
|
||||
|
||||
# only pyximport this
|
||||
import pyximport
|
||||
py_importer, pyx_importer = pyximport.install()
|
||||
from .qiradb import PyTrace
|
||||
sys.meta_path.remove(pyx_importer)
|
||||
|
@ -1,5 +1,3 @@
|
||||
# distutils: language = c++
|
||||
|
||||
from Trace.Trace cimport Trace
|
||||
|
||||
# copied from Trace.h
|
9
middleware/qiradb/qiradb.pyxbld
Normal file
9
middleware/qiradb/qiradb.pyxbld
Normal file
@ -0,0 +1,9 @@
|
||||
import os
|
||||
def make_ext(modname, pyxfilename):
|
||||
from distutils.extension import Extension
|
||||
include_dir = os.path.join(os.path.dirname(pyxfilename), 'Trace')
|
||||
return Extension(name=modname,
|
||||
include_dirs=[include_dir],
|
||||
sources=[pyxfilename],
|
||||
language='c++')
|
||||
|
@ -1,4 +0,0 @@
|
||||
include qiradb/*
|
||||
include setup.py
|
||||
include VERSION
|
||||
|
@ -1 +0,0 @@
|
||||
1.4
|
@ -1 +0,0 @@
|
||||
from .qiradb import PyTrace
|
@ -1,24 +0,0 @@
|
||||
#!/usr/bin/env python2.7
|
||||
import os
|
||||
from version import __version__
|
||||
from distutils.core import setup, Extension
|
||||
import distutils.sysconfig
|
||||
from Cython.Build import cythonize
|
||||
|
||||
cfg_vars = distutils.sysconfig.get_config_vars()
|
||||
for key, value in cfg_vars.items():
|
||||
if type(value) == str:
|
||||
cfg_vars[key] = value.replace("-Wstrict-prototypes", "")
|
||||
|
||||
# the c++ extension module
|
||||
os.environ["CC"] = "g++"
|
||||
os.environ["CXX"] = "g++"
|
||||
#extension_mod = Extension("qiradb._qiradb", sources=["qiradb/Trace.cpp", "qiradb/_qiradb.cpp"], language="c++")
|
||||
extension_mod = cythonize("qiradb/qiradb.pyx")
|
||||
|
||||
url="https://github.com/BinaryAnalysisPlatform"
|
||||
description="QEMU Interactive Runtime Analyser, QIRADB Tracer package."
|
||||
|
||||
# specify the package
|
||||
setup(name='qiradb', version=__version__, url=url, description=description, ext_modules=extension_mod, packages=['qiradb'])
|
||||
|
@ -1,10 +0,0 @@
|
||||
#!/usr/bin/env python2.7
|
||||
import os
|
||||
import subprocess
|
||||
|
||||
# should be a symlink to the root
|
||||
# could also add the git rev to this?
|
||||
version_file = open(os.path.join('.', 'VERSION'))
|
||||
version_number = version_file.read().strip()
|
||||
|
||||
__version__ = version_number
|
Loading…
x
Reference in New Issue
Block a user