From 92c83ccc46e127c20a4fbedde8c1ba02e6815251 Mon Sep 17 00:00:00 2001 From: Paul Brossier Date: Fri, 8 Mar 2013 09:30:45 -0500 Subject: [PATCH] python/: move generator.py to lib, improve README, remove env_ files, update MANIFEST.in --- python/MANIFEST.in | 7 +++---- python/README | 23 ++++++++++++++++++++--- python/env_linux | 4 ---- python/env_osx | 4 ---- python/lib/__init__.py | 0 python/{ => lib}/gen_pyobject.py | 0 python/{ => lib}/generator.py | 0 python/setup.py | 2 +- 8 files changed, 24 insertions(+), 16 deletions(-) delete mode 100755 python/env_linux delete mode 100755 python/env_osx create mode 100644 python/lib/__init__.py rename python/{ => lib}/gen_pyobject.py (100%) rename python/{ => lib}/generator.py (100%) diff --git a/python/MANIFEST.in b/python/MANIFEST.in index 93ba3974..cffccebf 100644 --- a/python/MANIFEST.in +++ b/python/MANIFEST.in @@ -1,9 +1,8 @@ include README COPYING VERSION include ext/*.h +include lib/generator.py +include lib/gen_pyobject.py include gen/aubio-generated.h -include generator.py -include gen_pyobject.py -include aubio/*.py -include demos/*.py include tests/run_all_tests include tests/*.py +include demos/*.py diff --git a/python/README b/python/README index 4103c8bc..537f4848 100644 --- a/python/README +++ b/python/README @@ -12,10 +12,27 @@ Compiling python aubio You should be able to build the aubio python module out of the box: - $ ./build_osx + $ python setup.py build -This should work on linux based systems as well as recent versions of OS X -(10.8.x). Let me know if you have issues on your platforms. +To use the python module without installing it, set PYTHONPATH: + + $ export PYTHONPATH=$PYTHONPATH:$PWD/`ls -rtd build/lib.* | head -1`:$PWD/tests + +And LD_LIBRARY_PATH: + + $ export LD_LIBRARY_PATH=$PWD/../build/src + +Or on macosx systems: + + $ export DYLD_LIBRARY_PATH=$PWD/../build/src + +The you should be able to run the tests: + + $ ./tests/run_all_tests + +And to try out the demos: + + $ ./demos/demo_source.wav ~/test.wav Additional tools ---------------- diff --git a/python/env_linux b/python/env_linux deleted file mode 100755 index adffa76d..00000000 --- a/python/env_linux +++ /dev/null @@ -1,4 +0,0 @@ -#! /bin/sh - -export PYTHONPATH=$PWD/`ls -rtd build/lib.* | head -1`:$PWD/tests:$PYTHONPATH -export LD_LIBRARY_PATH=$PWD/../build/src diff --git a/python/env_osx b/python/env_osx deleted file mode 100755 index aa27f7e3..00000000 --- a/python/env_osx +++ /dev/null @@ -1,4 +0,0 @@ -#! /bin/sh - -export PYTHONPATH=$PWD/`ls -rtd build/lib.* | head -1`:$PWD/tests:$PYTHONPATH -export DYLD_LIBRARY_PATH=$PWD/../build/src diff --git a/python/lib/__init__.py b/python/lib/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/python/gen_pyobject.py b/python/lib/gen_pyobject.py similarity index 100% rename from python/gen_pyobject.py rename to python/lib/gen_pyobject.py diff --git a/python/generator.py b/python/lib/generator.py similarity index 100% rename from python/generator.py rename to python/lib/generator.py diff --git a/python/setup.py b/python/setup.py index c7cef374..23a4f4a2 100755 --- a/python/setup.py +++ b/python/setup.py @@ -28,7 +28,7 @@ output_path = 'gen' generated_object_files = [] if not os.path.isdir(output_path): - from generator import generate_object_files + from lib.generator import generate_object_files generated_object_files = generate_object_files(output_path) # define include dirs else: -- 2.26.2