Source

shrinkwrap_pkgs_snoplus / bzip2.py

Full commit
try:
    from shrinkwrap.install import ShrinkwrapInstall
except ImportError:
    import subprocess; subprocess.check_call('pip install shrinkwrap', shell=True)
    from shrinkwrap.install import ShrinkwrapInstall
import os
from setuptools import setup


version = '1.0.6'
source_url = 'http://www.bzip.org/%(version)s/bzip2-%(version)s.tar.gz' % {'version': version}


def installer(inst):
    inst.download_and_unpack_tarball(source_url)

    bzip2_dir = 'bzip2-' + version
    os.chdir(bzip2_dir)
    inst.make(extra_opts=['install', 'PREFIX=%s CFLAGS="-Wall -Winline -O2 -g -D_FILE_OFFSET_BITS=64 -fPIC"' % inst.virtualenv])

setup(
    name='bzip2',
    version=version,
    author='Andy Mastbaum',
    author_email='mastbaum@hep.upenn.edu',
    shrinkwrap_installer=installer,
    cmdclass={'install': ShrinkwrapInstall},
)