Ejemplo n.º 1
0
def file_states_deps(request, file_content):
    h = sha256()
    h.update(file_content)
    return [
        FileState('foo-0.1-cp34-cp34m-linux_armv7l.whl', len(file_content),
                  h.hexdigest().lower(), 'foo', '0.1', 'cp34', 'cp34m',
                  'linux_armv7l', {'apt': ['libc', 'libfoo4']}),
        FileState('foo-0.1-cp35-cp35m-linux_armv7l.whl', len(file_content),
                  h.hexdigest().lower(), 'foo', '0.1', 'cp35', 'cp35m',
                  'linux_armv7l', {'apt': ['libc', 'libfoo5']}),
    ]
Ejemplo n.º 2
0
def file_state_hacked(request, file_content):
    h = sha256()
    h.update(file_content)
    return FileState('foo-0.1-cp34-cp34m-linux_armv6l.whl',
                     len(file_content),
                     h.hexdigest().lower(),
                     'foo',
                     '0.1',
                     'cp34',
                     'cp34m',
                     'linux_armv6l', {'apt': ['libc6']},
                     transferred=True)
Ejemplo n.º 3
0
def file_state_universal(request, file_content):
    h = sha256()
    h.update(file_content)
    return FileState('foo-0.1-py2.py3-none-any.whl', len(file_content),
                     h.hexdigest().lower(), 'foo', '0.1', 'py2.py3', 'none',
                     'any', {})
Ejemplo n.º 4
0
def file_state(request, file_content):
    h = sha256()
    h.update(file_content)
    return FileState('foo-0.1-cp34-cp34m-linux_armv7l.whl', len(file_content),
                     h.hexdigest().lower(), 'foo', '0.1', 'cp34', 'cp34m',
                     'linux_armv7l', '>=3', {'apt': ['libc6']})