From e758ef058774a8b369b640b636d30eccdb047ee1 Mon Sep 17 00:00:00 2001 From: Mincka Date: Sun, 9 Oct 2016 21:14:35 +0200 Subject: [PATCH] Fix MANIFEST.in to limit the included files in the package. Add Windows binary build compatibility and instructions. --- MANIFEST.in | 4 ++-- README.md | 11 +++++++++++ dmarchiver/__init__.py | 2 +- dmarchiver/cmdline.py | 7 +++++-- dmarchiver/core.py | 2 +- 5 files changed, 20 insertions(+), 6 deletions(-) diff --git a/MANIFEST.in b/MANIFEST.in index 27ce464..3d387c3 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,2 +1,2 @@ -include *.md -include *.txt \ No newline at end of file +include README.md +include requirements.txt \ No newline at end of file diff --git a/README.md b/README.md index 0b56835..99bd01e 100644 --- a/README.md +++ b/README.md @@ -75,8 +75,19 @@ $ pip install -r requirements.txt $ python setup.py install ``` +## Windows binary build +You can build it yourself with `pyinstaller` or just check out the project releases. + +``` +> pip install pyinstaller +> pyinstaller --onefile dmarchiver\cmdline.py -n dmarchiver.exe +> cd dist +> dmarchiver.exe +``` + ## Troubleshooting You may encounter building issues with the `lxml` library on Windows. The most simple and straightforward fix is to download and install a precompiled binary from [this site](http://www.lfd.uci.edu/~gohlke/pythonlibs/#lxml) and install the package locally: + `$ pip install lxml-3.6.4-cp35-cp35m-win_amd64.whl` ## License diff --git a/dmarchiver/__init__.py b/dmarchiver/__init__.py index c29dc42..83e951f 100644 --- a/dmarchiver/__init__.py +++ b/dmarchiver/__init__.py @@ -5,4 +5,4 @@ without having to deal with the API limitations. """ -__version__ = "0.0.2" +__version__ = "0.0.3" diff --git a/dmarchiver/cmdline.py b/dmarchiver/cmdline.py index 614a4a1..5bd9dd1 100644 --- a/dmarchiver/cmdline.py +++ b/dmarchiver/cmdline.py @@ -1,4 +1,4 @@ -# -*- coding: utf-8 -*- +# -*- coding: utf-8 -*- """ Direct Messages Archiver - Command Line @@ -32,4 +32,7 @@ def main(): args = parser.parse_args() crawler = Crawler(args.conversation_id[0], args.auth_token[0]) - crawler.crawl(args.download_images, args.download_gifs) \ No newline at end of file + crawler.crawl(args.download_images, args.download_gifs) + +if __name__ == "__main__": + main() \ No newline at end of file diff --git a/dmarchiver/core.py b/dmarchiver/core.py index 320279c..e6cd81e 100644 --- a/dmarchiver/core.py +++ b/dmarchiver/core.py @@ -1,4 +1,4 @@ -# -*- coding: utf-8 -*- +# -*- coding: utf-8 -*- """ Direct Messages Archiver