From 88c7abc0e529f766eb223a79209ba9a00f37a93b Mon Sep 17 00:00:00 2001 From: Volker Mische Date: Mon, 29 Jan 2018 01:47:41 +0100 Subject: [PATCH 1/3] Run whipper without installation This commit makes it possible to run whipper directly with `python -m whipper` from wither within the source directory or with `PYTHONPATH` set to the source directory. --- whipper/__main__.py | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 whipper/__main__.py diff --git a/whipper/__main__.py b/whipper/__main__.py new file mode 100644 index 0000000..1713451 --- /dev/null +++ b/whipper/__main__.py @@ -0,0 +1,10 @@ +# -*- Mode: Python -*- +# vi:si:et:sw=4:sts=4:ts=4 + +import sys + +from whipper.command.main import main + + +if __name__ == '__main__': + sys.exit(main()) From 3f9ce435df246c783e55fa1f542f31e324854fd7 Mon Sep 17 00:00:00 2001 From: Volker Mische Date: Mon, 29 Jan 2018 03:34:59 +0100 Subject: [PATCH 2/3] Make accuraterip_checksum found If `accurate_checksum` was successfully built in `src` it will automatically be found if whipper is run via `python -m whipper`. --- whipper/__main__.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/whipper/__main__.py b/whipper/__main__.py index 1713451..6a8e40b 100644 --- a/whipper/__main__.py +++ b/whipper/__main__.py @@ -1,10 +1,14 @@ # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 +import os import sys from whipper.command.main import main if __name__ == '__main__': + # Make accuraterip_checksum be found automatically if it was built + local_arb = os.path.join(os.path.dirname(__file__), '..', 'src') + os.environ['PATH'] = ':'.join([os.getenv('PATH'), local_arb]) sys.exit(main()) From 9208c06a16d7e0150fdee2459165ad28185efe23 Mon Sep 17 00:00:00 2001 From: Volker Mische Date: Mon, 29 Jan 2018 03:40:43 +0100 Subject: [PATCH 3/3] whipper can now be run without build step --- README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/README.md b/README.md index a7302f0..505c4b3 100644 --- a/README.md +++ b/README.md @@ -232,8 +232,7 @@ To make it easier for developers, you can run whipper straight from the source checkout: ```bash -python2 setup.py develop --user -whipper -h +python2 -m whipper -h ``` ## Logger plugins