Source

shrinkwrap_pkgs_snoplus / xext.py

Full commit
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
import os
from setuptools import setup


version = '1.3.1'
source_url = 'http://xorg.freedesktop.org/releases/individual/lib/libXext-%s.tar.gz' % version


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

    xext_dir = 'libXext-' + version
    os.chdir(xext_dir)
    inst.shell('PKG_CONFIG_PATH=%s ./configure --prefix=%s ' % (os.path.join(inst.virtualenv,'lib','pkgconfig'), inst.virtualenv))
    inst.make(extra_opts=['install'])


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