Source

shrinkwrap_pkgs_snoplus / sfml.py

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

version = '2.0-rc'
source_url = 'https://github.com/LaurentGomila/SFML.git'

def installer(inst):
    inst.shell('git clone ' + source_url)

    os.chdir('SFML')
    inst.shell('git checkout 2.0-rc')

    config_cmd = 'cmake -DCMAKE_INSTALL_PREFIX=%s' % (inst.virtualenv)
    inst.shell(config_cmd)

    inst.make(extra_opts=['install'])

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