mbevilacqua / appcompatprocessor

"Evolving AppCompat/AmCache data analysis beyond grep"
Apache License 2.0
197 stars 25 forks source link

Please make this installable via pip #7

Closed ekristen closed 7 years ago

ekristen commented 7 years ago

We'd like to add this to the SIFT VM (reference: https://github.com/sans-dfir/sift/issues/186), can you please add a setup.py file to the repository so that this tool is install-able via traditional python methods?

mbevilacqua commented 7 years ago

Hi ekristen that's great news! Can you check if 52e54fe on the dev branch works for you? Had a few issues with it as Levenshtein requires python-dev to be installed in order to compile, hopefully it will work just fine else let me know.

Once you confirm I'll merge it along with pending updates to master.

ekristen commented 7 years ago

The setup.py needs a little tweaking still ...

https://github.com/mbevilacqua/appcompatprocessor/commit/52e54fe377d5d8d4762d390ba710f783891615c0#commitcomment-24933657

mbevilacqua commented 7 years ago

So those modules were migrated there from the requirements file. ACP does need all of those to properly execute and run all of its moules (except for termcolor potentially)

ekristen commented 7 years ago

I could be wrong, but scripts in the setup.py indicate the files that are the CLI scripts you call directly. You can still include other files that are needed in the tree and in the requirements section of the setup.py to get installed.

IMHO any file that is just an import is a library, not a script, a script is the thing you execute.

See https://docs.python.org/2/distutils/setupscript.html for more details.

ekristen commented 7 years ago

The problem as it currently stands is that it could cause some conflicts. Since you are including ShimCacheParser.py that could override the one we install and since that file isn't yours, it should be treated more as a library then as a script installed by the package. Does that make sense?

mbevilacqua commented 7 years ago

I get your concern with ShimCacheParser. I don't think library does that though, doc only mentions them in relation to linking them in during the build. I'll test it out and see if they are indeed included in the sdist. On any case I'll also rename the modified version of ShimCacheParser to avoid conflicts when installed through setuptools.

mbevilacqua commented 7 years ago

Ok renamed the tweaked version of ShimCacheParser, dropped scripts and moved that to py_modules, moved the supporting non-python files to data_files and added support to host those in /etc/AppCompatProcessor when deployed through setuptools. Let me know if that works on your end.

mbevilacqua commented 7 years ago

Did you get a chance to confirm this is working for you?

mbevilacqua commented 7 years ago

Closed down due to inactivity. Please feel free to reopen if this is still an issue.