From: Paul Brossier Date: Fri, 8 Mar 2013 14:30:45 +0000 (-0500) Subject: python/: move generator.py to lib, improve README, remove env_ files, update MANIFEST.in X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=92c83ccc46e127c20a4fbedde8c1ba02e6815251;p=aubio.git python/: move generator.py to lib, improve README, remove env_ files, update MANIFEST.in --- 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: