Ejemplo n.º 1
0
def test_analyze_wheel_abi_pyfpe():
    winfo = analyze_wheel_abi(
        str(HERE / "fpewheel-0.0.0-cp35-cp35m-linux_x86_64.whl"))
    assert (winfo.sym_tag == "manylinux_2_5_x86_64"
            )  # for external symbols, it could get manylinux1
    assert (winfo.pyfpe_tag == "linux_x86_64"
            )  # but for having the pyfpe reference, it gets just linux
Ejemplo n.º 2
0
def execute(args, p):
    import os
    from distutils.spawn import find_executable
    from auditwheel.wheel_abi import analyze_wheel_abi

    if not isfile(args.WHEEL_FILE):
        p.error('cannot access %s. No such file' % args.WHEEL_FILE)
    if find_executable('patchelf') is None:
        p.error('cannot find the \'patchelf\' tool, which is required')

    print('Repairing %s' % basename(args.WHEEL_FILE))

    if not exists(args.WHEEL_DIR):
        os.makedirs(args.WHEEL_DIR)

    wheel_abi = analyze_wheel_abi(args.WHEEL_FILE)
    reqd_tag = get_priority_by_name(args.PLAT)

    if (reqd_tag > get_priority_by_name(wheel_abi.sym_tag)):
        msg = ('cannot repair "%s" to "%s" ABI because of the presence '
               'of too-recent versioned symbols. You\'ll need to compile '
               'the wheel on an older toolchain.' %
               (args.WHEEL_FILE, args.PLAT))
        p.error(msg)

    if (reqd_tag > get_priority_by_name(wheel_abi.ucs_tag)):
        msg = ('cannot repair "%s" to "%s" ABI because it was compiled '
               'against a UCS2 build of Python. You\'ll need to compile '
               'the wheel against a wide-unicode build of Python.' %
               (args.WHEEL_FILE, args.PLAT))
        p.error(msg)

    out_wheel = xacc_repair_wheel(args.WHEEL_FILE,
                             abi=args.PLAT,
                             lib_sdir=args.LIB_SDIR,
                             out_dir=args.WHEEL_DIR,
                             update_tags=args.UPDATE_TAGS)

    if out_wheel is not None:
        print('\nFixed-up wheel written to %s' % out_wheel)
Ejemplo n.º 3
0
def test_analyze_wheel_abi():
    winfo = analyze_wheel_abi(
        'tests/integration/cffi-1.5.0-cp27-none-linux_x86_64.whl')
    external_libs = winfo.external_refs['manylinux1_x86_64']['libs']
    assert len(external_libs) > 0
    assert set(external_libs) == {'libffi.so.5'}
Ejemplo n.º 4
0
def test_analyze_wheel_abi():
    winfo = analyze_wheel_abi(
        'tests/integration/fpewheel-0.0.0-cp35-cp35m-linux_x86_64.whl')
    assert winfo.sym_tag == 'manylinux1_x86_64'  # for external symbols, it could get manylinux1
    assert winfo.pyfpe_tag == 'linux_x86_64'  # but for having the pyfpe reference, it gets just linux
def test_analyze_wheel_abi_pypy_cffi():
    winfo = analyze_wheel_abi(
        "tests/python_snappy-0.5.2-pp260-pypy_41-linux_x86_64.whl")
    external_libs = winfo.external_refs["manylinux1_x86_64"]["libs"]
    assert len(external_libs) > 0
    assert set(external_libs) == {"libsnappy.so.1"}
def test_analyze_wheel_abi_pypy_cffi():
    winfo = analyze_wheel_abi(
        'tests/python_snappy-0.5.2-pp260-pypy_41-linux_x86_64.whl')
    external_libs = winfo.external_refs['manylinux1_x86_64']['libs']
    assert len(external_libs) > 0
    assert set(external_libs) == {'libsnappy.so.1'}
Ejemplo n.º 7
0
def test_analyze_wheel_abi():
    winfo = analyze_wheel_abi('tests/cffi-1.5.0-cp27-none-linux_x86_64.whl')
    external_libs = winfo.external_refs['manylinux1_x86_64']['libs']
    assert len(external_libs) > 0
    assert set(external_libs) == {'libffi.so.5'}
Ejemplo n.º 8
0
def test_analyze_wheel_abi():
    winfo = analyze_wheel_abi('tests/fpewheel-0.0.0-cp35-cp35m-linux_x86_64.whl')
    assert winfo.sym_tag == 'manylinux1_x86_64'  # for external symbols, it could get manylinux1
    assert winfo.pyfpe_tag == 'linux_x86_64'     # but for having the pyfpe reference, it gets just linux
def test_analyze_wheel_abi(file, external_libs):
    winfo = analyze_wheel_abi(str(HERE / file))
    assert set(
        winfo.external_refs['manylinux_2_5_x86_64']['libs']) == external_libs
Ejemplo n.º 10
0
def test_analyze_wheel_abi():
    winfo = analyze_wheel_abi("tests/cffi-1.5.0-cp27-none-linux_x86_64.whl")
    external_libs = winfo.external_refs["manylinux1_x86_64"]["libs"]
    assert len(external_libs) > 0
    assert set(external_libs) == {"libffi.so.5"}