Source

shrinkwrap_pkgs_snoplus / curl-check.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
from distutils.version import LooseVersion

version = '7.27.0'

def skip(inst):
    try:
        output = inst.cmd_output('curl-config --version')
        name, version_str = output.split()
        system_version = LooseVersion(version_str)
        min_version = LooseVersion('7.26.0')
        if system_version > min_version:
            return True # Don't install
        else:
            return False # Version too old
    except:
        return False # install package if anything went wrong

setup(
    name='curl-check',
    version=version,
    author='Stan Seibert',
    author_email='stan@mtrr.org',
    shrinkwrap_installer='autoconf',
    shrinkwrap_skip=skip,
    shrinkwrap_source_url='http://curl.haxx.se/download/curl-%s.tar.bz2' % version,
    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.