- Generate wheels for your distribution:
pip wheel .
this will result in some like TA_Lib-0.4.10-cp35-cp35m-linux_x86_64.whl
- Install
auditwheel
(https://pypi.python.org/pypi/auditwheel):
sudo apt-get install auditwheel
- Install
patchelf
(https://github.com/NixOS/patchelf):
wget http://nixos.org/releases/patchelf/patchelf-0.9/patchelf-0.9.tar.bz2
tar xf patchelf-0.9.tar.bz2
cd patchelf-0.9/
./configure --prefix="$HOME/.local"
make install
strip ~/.local/bin/patchelf
gzip -9 ~/.local/share/man/man1/patchelf.1
PATH = $HOME/.local/bin:$PATH
- Make sure auditwheel can find the linked libraries:
auditwheel show TA_Lib-0.4.10-cp35-cp35m-linux_x86_64.whl
- It so, patch the wheel file and get a manylinux wheel!:
auditwheel repair TA_Lib-0.4.10-cp35-cp35m-linux_x86_64.whl