Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
setuptools / setuptools / tests / py26compat.py
Size: Mime:
import sys
import tarfile
import contextlib


def _tarfile_open_ex(*args, **kwargs):
    """
    Extend result as a context manager.
    """
    return contextlib.closing(tarfile.open(*args, **kwargs))


if sys.version_info[:2] < (2, 7) or (3, 0) <= sys.version_info[:2] < (3, 2):
    tarfile_open = _tarfile_open_ex
else:
    tarfile_open = tarfile.open