shrinkwrap_pkgs_dc / boost.py

try:
    from shrinkwrap.install import ShrinkwrapInstall
except ImportError:
    import subprocess; subprocess.check_call('pip install -b $VIRTUAL_ENV/build/build-shrinkwrap shrinkwrap', shell=True)
    from shrinkwrap.install import ShrinkwrapInstall
from setuptools import setup
import os

version = '1.51.0'
version_alt = version.replace('.', '_')
source_url = 'http://sourceforge.net/projects/boost/files/boost/%s/boost_%s.tar.bz2' % (version, version_alt)

def installer(inst):
    inst.download_and_unpack_tarball(source_url)
    # Remove .tar and .gz
    basename, ext = os.path.splitext(os.path.basename(source_url))
    basename, ext = os.path.splitext(basename)
    inst.build_dir = basename

    os.chdir(inst.build_dir)
    inst.shell('./bootstrap.sh --prefix=' + inst.virtualenv)
    inst.shell('./b2 install')

setup(
    name='boost',
    version=version,
    author='Stan Seibert',
    author_email='stan@mtrr.org',
    shrinkwrap_installer=installer,
    cmdclass={'install': ShrinkwrapInstall},
)
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.