Package Details: python2-wheel 0.37.1-3

Git Clone URL: https://aur.archlinux.org/python2-wheel.git (read-only, click to copy)
Package Base: python2-wheel
Description: A built-package format for Python, version for Python 2.7
Upstream URL: https://github.com/pypa/wheel
Licenses: MIT
Submitter: hexd
Maintainer: hexd
Last Packager: hexd
Votes: 3
Popularity: 1.21
First Submitted: 2022-06-07 08:58 (UTC)
Last Updated: 2022-06-18 04:09 (UTC)

Latest Comments

dreieck commented on 2023-01-09 14:33 (UTC)

check() fails for me, too/still:

==> Starting check()...
==================================================================== test session starts =====================================================================
platform linux2 -- Python 2.7.18, pytest-4.6.11, py-1.11.0, pluggy-0.13.1
rootdir: /home/[...]/.cache/yay/python2-wheel/src/wheel-0.37.1, inifile: setup.cfg, testpaths: tests
plugins: cov-2.12.1
collected 63 items                                                                                                                                           

tests/test_bdist_wheel.py .s.....s....                                                                                                                 [ 19%]
tests/test_macosx_libfile.py ...........                                                                                                               [ 36%]
tests/test_metadata.py .                                                                                                                               [ 38%]
tests/test_pkginfo.py .                                                                                                                                [ 39%]
tests/test_tagopt.py s............                                                                                                                     [ 60%]
tests/test_wheelfile.py ...............F..                                                                                                             [ 88%]
tests/cli/test_convert.py ..                                                                                                                           [ 92%]
tests/cli/test_pack.py FFFF                                                                                                                            [ 98%]
tests/cli/test_unpack.py .                                                                                                                             [100%]

========================================================================== FAILURES ==========================================================================
_______________________________________________________________________ test_write_str _______________________________________________________________________

wheel_path = '/tmp/pytest-of-[...]/pytest-1/test_write_str0/test-1.0-py2.py3-none-any.whl'

    def test_write_str(wheel_path):
        with WheelFile(wheel_path, 'w') as wf:
            wf.writestr(native('hello/héllö.py'), as_bytes('print("Héllö, world!")\n'))
            wf.writestr(native('hello/h,ll,.py'), as_bytes('print("Héllö, world!")\n'))

        with ZipFile(wheel_path, 'r') as zf:
            infolist = zf.infolist()
            assert len(infolist) == 3
            assert infolist[0].filename == native('hello/héllö.py')
            assert infolist[0].file_size == 25
            assert infolist[1].filename == native('hello/h,ll,.py')
            assert infolist[1].file_size == 25
            assert infolist[2].filename == 'test-1.0.dist-info/RECORD'

            record = zf.read('test-1.0.dist-info/RECORD')
>           assert record == as_bytes(
                'hello/héllö.py,sha256=bv-QV3RciQC2v3zL8Uvhd_arp40J5A9xmyubN34OVwo,25\n'
                '"hello/h,ll,.py",sha256=bv-QV3RciQC2v3zL8Uvhd_arp40J5A9xmyubN34OVwo,25\n'
                'test-1.0.dist-info/RECORD,,\n')
E           assert 'hello/h\xc3\...fo/RECORD,,\n' == 'hello/h\xc3\x...fo/RECORD,,\n'
E             Skipping 70 identical trailing characters in diff, use -v to show
E             - hello/h\xc3\xa9ll\xc3\xb6.py,SHA256=bv-QV3RciQC2v3zL8Uvhd_arp40J5A9xmyubN34OVwo,25
E             ?                              ^^^
E             + hello/h\xc3\xa9ll\xc3\xb6.py,sha256=bv-QV3RciQC2v3zL8Uvhd_arp40J5A9xmyubN34OVwo,25
E             ?                              ^^^
E             - "hello/h,ll,.py",SHA256=bv-QV
E             ?                  ^^^...
E             
E             ...Full output truncated (3 lines hidden), use '-vv' to show

tests/test_wheelfile.py:126: AssertionError
___________________________________________________________________ test_pack[nobuildnum] ____________________________________________________________________

tmpdir_factory = TempdirFactory(_tmppath_factory=TempPathFactory(_given_basetemp=None, _trace=<...ect at 0x7ff6b47e0fd0>, _basetemp=PosixPath('/tmp/pytest-of-[...]/pytest-1')))
tmpdir = local('/tmp/pytest-of-[...]/pytest-1/test_pack_nobuildnum_0'), build_tag_arg = None, existing_build_tag = None
filename = 'test-1.0-py2.py3-none-any.whl'

    @pytest.mark.filterwarnings('error:Duplicate name')
    @pytest.mark.parametrize('build_tag_arg, existing_build_tag, filename', [
        (None, None, 'test-1.0-py2.py3-none-any.whl'),
        ('2b', None, 'test-1.0-2b-py2.py3-none-any.whl'),
        (None, '3', 'test-1.0-3-py2.py3-none-any.whl'),
        ('', '3', 'test-1.0-py2.py3-none-any.whl'),
    ], ids=['nobuildnum', 'newbuildarg', 'oldbuildnum', 'erasebuildnum'])
    def test_pack(tmpdir_factory, tmpdir, build_tag_arg, existing_build_tag, filename):
        unpack_dir = tmpdir_factory.mktemp('wheeldir')
        with ZipFile(TESTWHEEL_PATH) as zf:
            old_record = zf.read('test-1.0.dist-info/RECORD')
            old_record_lines = sorted(line.rstrip() for line in old_record.split(b'\n')
                                      if line and not line.startswith(b'test-1.0.dist-info/WHEEL,'))
            zf.extractall(str(unpack_dir))

        if existing_build_tag:
            # Add the build number to WHEEL
            wheel_file_path = unpack_dir.join('test-1.0.dist-info').join('WHEEL')
            wheel_file_content = wheel_file_path.read_binary()
            assert b'Build' not in wheel_file_content
            wheel_file_content += b'Build: 3\r\n'
            wheel_file_path.write_binary(wheel_file_content)

        pack(str(unpack_dir), str(tmpdir), build_tag_arg)
        new_wheel_path = tmpdir.join(filename)
        assert new_wheel_path.isfile()

        with ZipFile(str(new_wheel_path)) as zf:
            new_record = zf.read('test-1.0.dist-info/RECORD')
            new_record_lines = sorted(line.rstrip() for line in new_record.split(b'\n')
                                      if line and not line.startswith(b'test-1.0.dist-info/WHEEL,'))

            new_wheel_file_content = zf.read('test-1.0.dist-info/WHEEL')

>       assert new_record_lines == old_record_lines
E       AssertionError: assert ['hello.pyd,S...dixg,30', ...] == ['hello.pyd,sh...dixg,30', ...]
E         At index 0 diff: 'hello.pyd,SHA256=XqQwx6xxZkH6REuFbd4BYIqy8xlZTlOJmhuObrFAXbs,6656' != 'hello.pyd,sha256=XqQwx6xxZkH6REuFbd4BYIqy8xlZTlOJmhuObrFAXbs,6656'
E         Use -v to get the full diff

tests/cli/test_pack.py:48: AssertionError
-------------------------------------------------------------------- Captured stdout call --------------------------------------------------------------------
Repacking wheel as /tmp/pytest-of-[...]/pytest-1/test_pack_nobuildnum_0/test-1.0-py2.py3-none-any.whl...OK
___________________________________________________________________ test_pack[newbuildarg] ___________________________________________________________________

tmpdir_factory = TempdirFactory(_tmppath_factory=TempPathFactory(_given_basetemp=None, _trace=<...ect at 0x7ff6b47e0fd0>, _basetemp=PosixPath('/tmp/pytest-of-[...]/pytest-1')))
tmpdir = local('/tmp/pytest-of-[...]/pytest-1/test_pack_newbuildarg_0'), build_tag_arg = '2b', existing_build_tag = None
filename = 'test-1.0-2b-py2.py3-none-any.whl'

    @pytest.mark.filterwarnings('error:Duplicate name')
    @pytest.mark.parametrize('build_tag_arg, existing_build_tag, filename', [
        (None, None, 'test-1.0-py2.py3-none-any.whl'),
        ('2b', None, 'test-1.0-2b-py2.py3-none-any.whl'),
        (None, '3', 'test-1.0-3-py2.py3-none-any.whl'),
        ('', '3', 'test-1.0-py2.py3-none-any.whl'),
    ], ids=['nobuildnum', 'newbuildarg', 'oldbuildnum', 'erasebuildnum'])
    def test_pack(tmpdir_factory, tmpdir, build_tag_arg, existing_build_tag, filename):
        unpack_dir = tmpdir_factory.mktemp('wheeldir')
        with ZipFile(TESTWHEEL_PATH) as zf:
            old_record = zf.read('test-1.0.dist-info/RECORD')
            old_record_lines = sorted(line.rstrip() for line in old_record.split(b'\n')
                                      if line and not line.startswith(b'test-1.0.dist-info/WHEEL,'))
            zf.extractall(str(unpack_dir))

        if existing_build_tag:
            # Add the build number to WHEEL
            wheel_file_path = unpack_dir.join('test-1.0.dist-info').join('WHEEL')
            wheel_file_content = wheel_file_path.read_binary()
            assert b'Build' not in wheel_file_content
            wheel_file_content += b'Build: 3\r\n'
            wheel_file_path.write_binary(wheel_file_content)

        pack(str(unpack_dir), str(tmpdir), build_tag_arg)
        new_wheel_path = tmpdir.join(filename)
        assert new_wheel_path.isfile()

        with ZipFile(str(new_wheel_path)) as zf:
            new_record = zf.read('test-1.0.dist-info/RECORD')
            new_record_lines = sorted(line.rstrip() for line in new_record.split(b'\n')
                                      if line and not line.startswith(b'test-1.0.dist-info/WHEEL,'))

            new_wheel_file_content = zf.read('test-1.0.dist-info/WHEEL')

>       assert new_record_lines == old_record_lines
E       AssertionError: assert ['hello.pyd,S...dixg,30', ...] == ['hello.pyd,sh...dixg,30', ...]
E         At index 0 diff: 'hello.pyd,SHA256=XqQwx6xxZkH6REuFbd4BYIqy8xlZTlOJmhuObrFAXbs,6656' != 'hello.pyd,sha256=XqQwx6xxZkH6REuFbd4BYIqy8xlZTlOJmhuObrFAXbs,6656'
E         Use -v to get the full diff

tests/cli/test_pack.py:48: AssertionError
-------------------------------------------------------------------- Captured stdout call --------------------------------------------------------------------
Repacking wheel as /tmp/pytest-of-[...]/pytest-1/test_pack_newbuildarg_0/test-1.0-2b-py2.py3-none-any.whl...OK
___________________________________________________________________ test_pack[oldbuildnum] ___________________________________________________________________

tmpdir_factory = TempdirFactory(_tmppath_factory=TempPathFactory(_given_basetemp=None, _trace=<...ect at 0x7ff6b47e0fd0>, _basetemp=PosixPath('/tmp/pytest-of-[...]/pytest-1')))
tmpdir = local('/tmp/pytest-of-[...]/pytest-1/test_pack_oldbuildnum_0'), build_tag_arg = None, existing_build_tag = '3'
filename = 'test-1.0-3-py2.py3-none-any.whl'

    @pytest.mark.filterwarnings('error:Duplicate name')
    @pytest.mark.parametrize('build_tag_arg, existing_build_tag, filename', [
        (None, None, 'test-1.0-py2.py3-none-any.whl'),
        ('2b', None, 'test-1.0-2b-py2.py3-none-any.whl'),
        (None, '3', 'test-1.0-3-py2.py3-none-any.whl'),
        ('', '3', 'test-1.0-py2.py3-none-any.whl'),
    ], ids=['nobuildnum', 'newbuildarg', 'oldbuildnum', 'erasebuildnum'])
    def test_pack(tmpdir_factory, tmpdir, build_tag_arg, existing_build_tag, filename):
        unpack_dir = tmpdir_factory.mktemp('wheeldir')
        with ZipFile(TESTWHEEL_PATH) as zf:
            old_record = zf.read('test-1.0.dist-info/RECORD')
            old_record_lines = sorted(line.rstrip() for line in old_record.split(b'\n')
                                      if line and not line.startswith(b'test-1.0.dist-info/WHEEL,'))
            zf.extractall(str(unpack_dir))

        if existing_build_tag:
            # Add the build number to WHEEL
            wheel_file_path = unpack_dir.join('test-1.0.dist-info').join('WHEEL')
            wheel_file_content = wheel_file_path.read_binary()
            assert b'Build' not in wheel_file_content
            wheel_file_content += b'Build: 3\r\n'
            wheel_file_path.write_binary(wheel_file_content)

        pack(str(unpack_dir), str(tmpdir), build_tag_arg)
        new_wheel_path = tmpdir.join(filename)
        assert new_wheel_path.isfile()

        with ZipFile(str(new_wheel_path)) as zf:
            new_record = zf.read('test-1.0.dist-info/RECORD')
            new_record_lines = sorted(line.rstrip() for line in new_record.split(b'\n')
                                      if line and not line.startswith(b'test-1.0.dist-info/WHEEL,'))

            new_wheel_file_content = zf.read('test-1.0.dist-info/WHEEL')

>       assert new_record_lines == old_record_lines
E       AssertionError: assert ['hello.pyd,S...dixg,30', ...] == ['hello.pyd,sh...dixg,30', ...]
E         At index 0 diff: 'hello.pyd,SHA256=XqQwx6xxZkH6REuFbd4BYIqy8xlZTlOJmhuObrFAXbs,6656' != 'hello.pyd,sha256=XqQwx6xxZkH6REuFbd4BYIqy8xlZTlOJmhuObrFAXbs,6656'
E         Use -v to get the full diff

tests/cli/test_pack.py:48: AssertionError
-------------------------------------------------------------------- Captured stdout call --------------------------------------------------------------------
Repacking wheel as /tmp/pytest-of-[...]/pytest-1/test_pack_oldbuildnum_0/test-1.0-3-py2.py3-none-any.whl...OK
__________________________________________________________________ test_pack[erasebuildnum] __________________________________________________________________

tmpdir_factory = TempdirFactory(_tmppath_factory=TempPathFactory(_given_basetemp=None, _trace=<...ect at 0x7ff6b47e0fd0>, _basetemp=PosixPath('/tmp/pytest-of-[...]/pytest-1')))
tmpdir = local('/tmp/pytest-of-[...]/pytest-1/test_pack_erasebuildnum_0'), build_tag_arg = '', existing_build_tag = '3'
filename = 'test-1.0-py2.py3-none-any.whl'

    @pytest.mark.filterwarnings('error:Duplicate name')
    @pytest.mark.parametrize('build_tag_arg, existing_build_tag, filename', [
        (None, None, 'test-1.0-py2.py3-none-any.whl'),
        ('2b', None, 'test-1.0-2b-py2.py3-none-any.whl'),
        (None, '3', 'test-1.0-3-py2.py3-none-any.whl'),
        ('', '3', 'test-1.0-py2.py3-none-any.whl'),
    ], ids=['nobuildnum', 'newbuildarg', 'oldbuildnum', 'erasebuildnum'])
    def test_pack(tmpdir_factory, tmpdir, build_tag_arg, existing_build_tag, filename):
        unpack_dir = tmpdir_factory.mktemp('wheeldir')
        with ZipFile(TESTWHEEL_PATH) as zf:
            old_record = zf.read('test-1.0.dist-info/RECORD')
            old_record_lines = sorted(line.rstrip() for line in old_record.split(b'\n')
                                      if line and not line.startswith(b'test-1.0.dist-info/WHEEL,'))
            zf.extractall(str(unpack_dir))

        if existing_build_tag:
            # Add the build number to WHEEL
            wheel_file_path = unpack_dir.join('test-1.0.dist-info').join('WHEEL')
            wheel_file_content = wheel_file_path.read_binary()
            assert b'Build' not in wheel_file_content
            wheel_file_content += b'Build: 3\r\n'
            wheel_file_path.write_binary(wheel_file_content)

        pack(str(unpack_dir), str(tmpdir), build_tag_arg)
        new_wheel_path = tmpdir.join(filename)
        assert new_wheel_path.isfile()

        with ZipFile(str(new_wheel_path)) as zf:
            new_record = zf.read('test-1.0.dist-info/RECORD')
            new_record_lines = sorted(line.rstrip() for line in new_record.split(b'\n')
                                      if line and not line.startswith(b'test-1.0.dist-info/WHEEL,'))

            new_wheel_file_content = zf.read('test-1.0.dist-info/WHEEL')

>       assert new_record_lines == old_record_lines
E       AssertionError: assert ['hello.pyd,S...dixg,30', ...] == ['hello.pyd,sh...dixg,30', ...]
E         At index 0 diff: 'hello.pyd,SHA256=XqQwx6xxZkH6REuFbd4BYIqy8xlZTlOJmhuObrFAXbs,6656' != 'hello.pyd,sha256=XqQwx6xxZkH6REuFbd4BYIqy8xlZTlOJmhuObrFAXbs,6656'
E         Use -v to get the full diff

tests/cli/test_pack.py:48: AssertionError
-------------------------------------------------------------------- Captured stdout call --------------------------------------------------------------------
Repacking wheel as /tmp/pytest-of-[...]/pytest-1/test_pack_erasebuildnum_0/test-1.0-py2.py3-none-any.whl...OK

---------- coverage: platform linux2, python 2.7.18-final-0 ----------
Name                          Stmts   Miss  Cover   Missing
-----------------------------------------------------------
src/wheel/__init__.py             1      0   100%
src/wheel/__main__.py            10     10     0%   5-19
src/wheel/bdist_wheel.py        276     43    84%   35, 64-67, 83, 98-107, 120-122, 207-208, 219, 231, 260, 263, 279-280, 326-327, 342, 379, 404-407, 453-461, 465-467
src/wheel/cli/__init__.py        56     41    27%   15-16, 24-25, 29-30, 34-35, 39-40, 44-73, 77-88
src/wheel/cli/convert.py        157     96    39%   34, 41, 51-56, 124-159, 163-249, 261, 264-265, 269
src/wheel/cli/pack.py            51      3    94%   27, 29, 47
src/wheel/cli/unpack.py          12      0   100%
src/wheel/macosx_libfile.py     152      9    94%   236, 268-269, 289-290, 295, 300-302, 410
src/wheel/metadata.py            76     12    84%   33, 96-105, 117-118, 129
src/wheel/pkginfo.py             29     15    48%   9-10, 16, 27-43
src/wheel/util.py                29      7    76%   16-23, 40
src/wheel/wheelfile.py          120      5    96%   18-21, 96-97
-----------------------------------------------------------
TOTAL                           969    241    75%

====================================================== 5 failed, 55 passed, 3 skipped in 31.99 seconds =======================================================
==> ERROR: A failure occurred in check().

hexd commented on 2022-06-18 04:10 (UTC)

Oops, sorry! It seems the "check" was using the installed package, not the just built one. Fixed!

MarsSeed commented on 2022-06-17 22:29 (UTC)

I got the same result as @drws, with the following warnings preceding the test report:

==> Starting check()...
============================= test session starts ==============================
platform linux2 -- Python 2.7.18, pytest-4.6.11, py-1.11.0, pluggy-0.13.1
rootdir: /home/user/.cache/yay/python2-wheel/src/wheel-0.37.1, inifile: setup.cfg, testpaths: tests
plugins: cov-2.12.1
collected 13 items / 8 errors / 5 selected
Coverage.py warning: Module wheel was never imported. (module-not-imported)
Coverage.py warning: No data was collected. (no-data-collected)
WARNING: Failed to generate report: No data to report.

/usr/lib/python2.7/site-packages/pytest_cov/plugin.py:271: PytestWarning: Failed to generate report: No data to report.

  self.cov_controller.finish()

drws commented on 2022-06-16 17:55 (UTC)

Unfortunately, during check()...

tests/test_bdist_wheel.py:11: ImportError: No module named wheel.bdist_wheel
tests/test_macosx_libfile.py:5: ImportError: No module named wheel.macosx_libfile
tests/test_metadata.py:1: ImportError: No module named wheel.metadata
tests/test_pkginfo.py:3: ImportError: No module named wheel.pkginfo
tests/test_wheelfile.py:9: ImportError: No module named wheel.cli
tests/cli/test_convert.py:4: ImportError: No module named wheel.cli.convert
tests/cli/test_pack.py:7: ImportError: No module named wheel.cli.pack
tests/cli/test_unpack.py:1: ImportError: No module named wheel.cli.unpack