Exemplo n.º 1
0
def get_versions():
    """
    Returns list of used versions.
    """
    result = []

    result.append(("Python", "http://www.python.org/", sys.version.split()[0], "2.7"))

    name = "Django"
    url = "https://www.djangoproject.com/"
    mod = get_version_module("django", name, url)
    result.append((name, url, mod.get_version(), "1.7"))

    name = "six"
    url = "https://pypi.python.org/pypi/six"
    mod = get_version_module("six", name, url)
    result.append((name, url, mod.__version__, "1.7.0"))

    name = "python-social-auth"
    url = "http://psa.matiasaguirre.net/"
    mod = get_version_module("social", name, url)
    result.append((name, url, mod.__version__, "0.2.0"))

    name = "Translate Toolkit"
    url = "http://toolkit.translatehouse.org/"
    mod = get_version_module("translate.__version__", name, url)
    result.append((name, url, mod.sver, "1.10.0"))

    name = "Whoosh"
    url = "http://bitbucket.org/mchaput/whoosh/"
    mod = get_version_module("whoosh", name, url)
    result.append((name, url, mod.versionstring(), "2.5"))

    try:
        result.append(("Git", "http://git-scm.com/", GitRepository.get_version(), "1.6"))
    except OSError:
        raise Exception("Failed to run git, please install it.")

    name = "Pillow (PIL)"
    url = "http://python-imaging.github.io/"
    mod = get_version_module("PIL.Image", name, url)
    result.append((name, url, mod.VERSION, "1.1.6"))

    name = "dateutil"
    url = "http://labix.org/python-dateutil"
    mod = get_version_module("dateutil", name, url)
    result.append((name, url, mod.__version__, "1.0"))

    name = "lxml"
    url = "http://lxml.de/"
    mod = get_version_module("lxml.etree", name, url)
    result.append((name, url, mod.__version__, "3.1.0"))

    name = "django-crispy-forms"
    url = "http://django-crispy-forms.readthedocs.org/"
    mod = get_version_module("crispy_forms", name, url)
    result.append((name, url, mod.__version__, "1.4.0"))

    name = "compressor"
    url = "https://github.com/django-compressor/django-compressor"
    mod = get_version_module("compressor", name, url)
    result.append((name, url, mod.__version__, "1.5"))

    return result
Exemplo n.º 2
0
def get_versions():
    '''
    Returns list of used versions.
    '''
    result = []

    result.append((
        'Python',
        'http://www.python.org/',
        sys.version.split()[0],
        '2.7',
    ))

    result.append(
        get_single('Django', 'https://www.djangoproject.com/', 'django',
                   '1.10', 'get_version'))

    result.append(
        get_single(
            'six',
            'https://pypi.python.org/pypi/six',
            'six',
            '1.7.0',
        ))

    result.append(
        get_single(
            'social-auth-core',
            'http://python-social-auth.readthedocs.io/',
            'social_core',
            '1.2.0',
        ))

    result.append(
        get_single(
            'social-auth-app-django',
            'http://python-social-auth.readthedocs.io/',
            'social_django',
            '1.1.0',
        ))

    result.append(
        get_single('django-appconf',
                   'https://github.com/django-compressor/django-appconf',
                   'appconf', '1.0'))

    result.append(
        get_single(
            'Translate Toolkit',
            'http://toolkit.translatehouse.org/',
            'translate.__version__',
            '2.0.0',
            'sver',
        ))

    result.append(
        get_single(
            'Whoosh',
            'http://bitbucket.org/mchaput/whoosh/',
            'whoosh',
            '2.7',
            'versionstring',
        ))

    result.append(
        get_single(
            'defusedxml',
            'https://bitbucket.org/tiran/defusedxml',
            'defusedxml',
            '0.4',
        ))

    try:
        result.append((
            'Git',
            'https://git-scm.com/',
            GitRepository.get_version(),
            '1.6',
        ))
    except OSError:
        raise Exception('Failed to run git, please install it.')

    result.append(
        get_single(
            'Pillow (PIL)',
            'http://python-pillow.org/',
            'PIL.Image',
            '1.1.6',
            'VERSION',
        ))

    result.append(
        get_single('dateutil', 'http://labix.org/python-dateutil', 'dateutil',
                   '1.0'))

    result.append(
        get_single(
            'lxml',
            'http://lxml.de/',
            'lxml.etree',
            '3.1.0',
        ))

    result.append(
        get_single(
            'django-crispy-forms',
            'http://django-crispy-forms.readthedocs.io/',
            'crispy_forms',
            '1.6.1',
        ))

    result.append(
        get_single(
            'compressor',
            'https://github.com/django-compressor/django-compressor',
            'compressor',
            '2.1',
        ))

    result.append(
        get_single(
            'djangorestframework',
            'http://www.django-rest-framework.org/',
            'rest_framework',
            '3.4',
        ))

    return result
Exemplo n.º 3
0
def get_versions():
    '''
    Returns list of used versions.
    '''
    result = []

    result.append((
        'Python',
        'http://www.python.org/',
        sys.version.split()[0],
        '2.7',
    ))

    result.append(get_single(
        'Django',
        'https://www.djangoproject.com/',
        'django',
        '1.9',
        'get_version'
    ))

    result.append(get_single(
        'six',
        'https://pypi.python.org/pypi/six',
        'six',
        '1.7.0',
    ))

    result.append(get_single(
        'python-social-auth',
        'http://psa.matiasaguirre.net/',
        'social',
        '0.2.0',
    ))

    result.append(get_single(
        'Translate Toolkit',
        'http://toolkit.translatehouse.org/',
        'translate.__version__',
        '1.14.0-rc1',
        'sver',
    ))

    result.append(get_single(
        'Whoosh',
        'http://bitbucket.org/mchaput/whoosh/',
        'whoosh',
        '2.5',
        'versionstring',
    ))

    result.append(get_single(
        'defusedxml',
        'https://bitbucket.org/tiran/defusedxml',
        'defusedxml',
        '0.4',
    ))

    try:
        result.append((
            'Git',
            'http://git-scm.com/',
            GitRepository.get_version(),
            '1.6',
        ))
    except OSError:
        raise Exception('Failed to run git, please install it.')

    result.append(get_single(
        'Pillow (PIL)',
        'http://python-imaging.github.io/',
        'PIL.Image',
        '1.1.6',
        'VERSION',
    ))

    result.append(get_single(
        'dateutil',
        'http://labix.org/python-dateutil',
        'dateutil',
        '1.0'
    ))

    result.append(get_single(
        'lxml',
        'http://lxml.de/',
        'lxml.etree',
        '3.1.0',
    ))

    result.append(get_single(
        'django-crispy-forms',
        'http://django-crispy-forms.readthedocs.org/',
        'crispy_forms',
        '1.4.0',
    ))

    result.append(get_single(
        'compressor',
        'https://github.com/django-compressor/django-compressor',
        'compressor',
        '1.5',
    ))

    result.append(get_single(
        'djangorestframework',
        'http://www.django-rest-framework.org/',
        'rest_framework',
        '3.3',
    ))

    return result
Exemplo n.º 4
0
def get_versions():
    '''
    Returns list of used versions.
    '''
    result = []

    result.append((
        'Python',
        'http://www.python.org/',
        sys.version.split()[0],
        '2.7',
    ))

    name = 'Django'
    url = 'https://www.djangoproject.com/'
    mod = get_version_module('django', name, url)
    result.append((
        name,
        url,
        mod.get_version(),
        '1.6',
    ))

    name = 'python-social-auth'
    url = 'http://psa.matiasaguirre.net/'
    mod = get_version_module('social', name, url)
    result.append((
        name,
        url,
        mod.__version__,
        '0.2.0',
    ))

    name = 'Translate Toolkit'
    url = 'http://toolkit.translatehouse.org/'
    mod = get_version_module('translate.__version__', name, url)
    result.append((
        name,
        url,
        mod.sver,
        '1.9.0',
    ))

    name = 'Whoosh'
    url = 'http://bitbucket.org/mchaput/whoosh/'
    mod = get_version_module('whoosh', name, url)
    result.append((
        name,
        url,
        mod.versionstring(),
        '2.5',
    ))

    try:
        result.append((
            'Git',
            'http://git-scm.com/',
            GitRepository.get_version(),
            '1.6',
        ))
    except OSError:
        raise Exception('Failed to run git, please install it.')

    name = 'South'
    url = 'http://south.aeracode.org/'
    if django.VERSION < (1, 7, 0):
        mod = get_version_module('south', name, url)
        result.append((
            name,
            url,
            mod.__version__,
            '1.0',
        ))

    name = 'Pillow (PIL)'
    url = 'http://python-imaging.github.io/'
    mod = get_version_module('PIL.Image', name, url)
    result.append((
        name,
        url,
        mod.VERSION,
        '1.1.6',
    ))

    name = 'dateutil'
    url = 'http://labix.org/python-dateutil'
    mod = get_version_module('dateutil', name, url)
    result.append((
        name,
        url,
        mod.__version__,
        '1.0'
    ))

    name = 'lxml'
    url = 'http://lxml.de/'
    mod = get_version_module('lxml.etree', name, url)
    result.append((
        name,
        url,
        mod.__version__,
        '3.1.0',
    ))

    name = 'django-crispy-forms'
    url = 'http://django-crispy-forms.readthedocs.org/'
    mod = get_version_module('crispy_forms', name, url)
    result.append((
        name,
        url,
        mod.__version__,
        '1.4.0',
    ))

    return result
Exemplo n.º 5
0
def get_versions():
    '''
    Returns list of used versions.
    '''
    result = []

    result.append((
        'Python',
        'http://www.python.org/',
        sys.version.split()[0],
        '2.7',
    ))

    name = 'Django'
    url = 'https://www.djangoproject.com/'
    mod = get_version_module('django', name, url)
    result.append((
        name,
        url,
        mod.get_version(),
        '1.8',
    ))

    name = 'six'
    url = 'https://pypi.python.org/pypi/six'
    mod = get_version_module('six', name, url)
    result.append((
        name,
        url,
        mod.__version__,
        '1.7.0',
    ))

    name = 'python-social-auth'
    url = 'http://psa.matiasaguirre.net/'
    mod = get_version_module('social', name, url)
    result.append((
        name,
        url,
        mod.__version__,
        '0.2.0',
    ))

    name = 'Translate Toolkit'
    url = 'http://toolkit.translatehouse.org/'
    mod = get_version_module('translate.__version__', name, url)
    result.append((
        name,
        url,
        mod.sver,
        '1.10.0',
    ))

    name = 'Whoosh'
    url = 'http://bitbucket.org/mchaput/whoosh/'
    mod = get_version_module('whoosh', name, url)
    result.append((
        name,
        url,
        mod.versionstring(),
        '2.5',
    ))

    try:
        result.append((
            'Git',
            'http://git-scm.com/',
            GitRepository.get_version(),
            '1.6',
        ))
    except OSError:
        raise Exception('Failed to run git, please install it.')

    name = 'Pillow (PIL)'
    url = 'http://python-imaging.github.io/'
    mod = get_version_module('PIL.Image', name, url)
    result.append((
        name,
        url,
        mod.VERSION,
        '1.1.6',
    ))

    name = 'dateutil'
    url = 'http://labix.org/python-dateutil'
    mod = get_version_module('dateutil', name, url)
    result.append((
        name,
        url,
        mod.__version__,
        '1.0'
    ))

    name = 'lxml'
    url = 'http://lxml.de/'
    mod = get_version_module('lxml.etree', name, url)
    result.append((
        name,
        url,
        mod.__version__,
        '3.1.0',
    ))

    name = 'django-crispy-forms'
    url = 'http://django-crispy-forms.readthedocs.org/'
    mod = get_version_module('crispy_forms', name, url)
    result.append((
        name,
        url,
        mod.__version__,
        '1.4.0',
    ))

    name = 'compressor'
    url = 'https://github.com/django-compressor/django-compressor'
    mod = get_version_module('compressor', name, url)
    result.append((
        name,
        url,
        mod.__version__,
        '1.5',
    ))

    return result
Exemplo n.º 6
0
 def test_get_version(self):
     self.assertTrue(GitRepository.get_version() != '')