Skip to content

Commit

Permalink
Use virtualenv and switch to samplerate package
Browse files Browse the repository at this point in the history
  • Loading branch information
stackp committed Nov 1, 2017
1 parent 303947e commit e10221a
Show file tree
Hide file tree
Showing 17 changed files with 26 additions and 448 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Expand Up @@ -4,4 +4,5 @@
*~
*.c
*so
pyalsaaudio*
pyalsaaudio*
venv/
28 changes: 9 additions & 19 deletions build.sh
Expand Up @@ -6,33 +6,23 @@ log () {
echo -e "${ORANGE}${*}${NC}"
}

DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd $DIR

if [ ! -d pyalsaaudio-0.8.4/ ]; then
log "\n→ Downloading pyalsaaudio..."
wget https://pypi.python.org/packages/52/b6/44871791929d9d7e11325af0b7be711388dfeeab17147988f044a41a6d83/pyalsaaudio-0.8.4.tar.gz#md5=b46f69561bc85fc52e698b2440ca251e
tar xzf pyalsaaudio-0.8.4.tar.gz
fi

log "\n→ Building pyalsaaudio..."
pushd pyalsaaudio-0.8.4/
python2 setup.py build
cp build/lib.*/*.so ../gum/alsaaudio.so
rm -rf pyalsaaudio*
popd

log "\n→ Building scikits.samplerate..."
pushd gum/scikits/samplerate
make
popd
log "\n→ Creating virtualenv..."
rm -rf venv
virtualenv -p python2 --system-site-packages venv
source venv/bin/activate
pip install -r requirements.txt

log "\n→ Building fast waveform display..."
pushd gum/fast
make
make clean && make
popd

log "\n→ Building fast waveform display..."
pushd gum/fx
make
make clean && make
popd

log "\n✓ Build completed with success"
2 changes: 1 addition & 1 deletion gum/lib/edit.py
@@ -1,5 +1,5 @@
import numpy
from scikits import samplerate
import samplerate


def resample(frames, ratio):
Expand Down
5 changes: 0 additions & 5 deletions gum/scikits/__init__.py

This file was deleted.

13 changes: 0 additions & 13 deletions gum/scikits/samplerate/Makefile

This file was deleted.

17 changes: 0 additions & 17 deletions gum/scikits/samplerate/__init__.py

This file was deleted.

174 changes: 0 additions & 174 deletions gum/scikits/samplerate/_samplerate.pyx

This file was deleted.

13 changes: 0 additions & 13 deletions gum/scikits/samplerate/info.py

This file was deleted.

41 changes: 0 additions & 41 deletions gum/scikits/samplerate/samplerate.pxd

This file was deleted.

29 changes: 0 additions & 29 deletions gum/scikits/samplerate/setup.py

This file was deleted.

0 comments on commit e10221a

Please sign in to comment.