Package Details: python-google-crc32c 1.5.0-2

Git Clone URL: https://aur.archlinux.org/python-google-crc32c.git (read-only, click to copy)
Package Base: python-google-crc32c
Description: Wraps Google's crc32c library into a Python wrapper
Upstream URL: https://github.com/googleapis/python-crc32c
Licenses: Apache-2.0
Submitter: zhangkaizhao
Maintainer: a821
Last Packager: a821
Votes: 0
Popularity: 0.000000
First Submitted: 2020-09-24 09:27 (UTC)
Last Updated: 2024-06-11 05:39 (UTC)

Latest Comments

amstan commented on 2022-10-24 22:44 (UTC)

@Wupwup: If i were you I would just skip checks with makepkg --nocheck. Still no idea what triggers this failure (given that it uses the standard pip way to implement check()), but it's something silly (you can run the tests manually from pkg/ and they'll work just fine) and does not represent the stability of the resulting package.

Wupwup commented on 2022-10-22 15:46 (UTC)

This package is failing checks on my end and will not install

tests/test___init__.py ...........E

============================================================================= ERRORS =============================================================================
____________________________________________________ ERROR at setup of TestChecksum.test_ctor_defaults[cext] _____________________________________________________

request = <SubRequest '_crc32c' for <Function test_ctor_defaults[cext]>>

    @pytest.fixture
    def _crc32c(request):
        if request.param == "python":
            from google_crc32c import python
            return python
        elif request.param == "cext":
>           from google_crc32c import cext

tests/test___init__.py:207: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

    # Copyright 2020 Google LLC
    #
    # Licensed under the Apache License, Version 2.0 (the "License");
    # you may not use this file except in compliance with the License.
    # You may obtain a copy of the License at
    #
    #     https://www.apache.org/licenses/LICENSE-2.0
    #
    # Unless required by applicable law or agreed to in writing, software
    # distributed under the License is distributed on an "AS IS" BASIS,
    # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    # See the License for the specific language governing permissions and
    # limitations under the License.

    import struct

    # NOTE: ``__config__`` **must** be the first import because it (may)
    #       modify the search path used to locate shared libraries.
    import google_crc32c.__config__  # type: ignore
>   from google_crc32c._crc32c import extend  # type: ignore
E   ImportError: libcrc32c.so.1: cannot open shared object file: No such file or directory

build/lib.linux-x86_64-cpython-310/google_crc32c/cext.py:20: ImportError

amstan commented on 2022-07-28 05:39 (UTC)

To close the loop. TLDR: Please ignore me, nothing to see here.

I guess this is just something that happens to most arch python packages on archlinuxarm.

I tried manually compiling pyalpm too (which is a normal binary package from the main repos). I took its PKGBUILD and ran it with makepkg (note that it's also got an x86 only arch=(), and it uses the same $CARCH invocation in its check()), and I got a similar error there.

My conclusion (unverified) is that archlinuxarm packages are just compiled with --nocheck, otherwise you frequently get the error I described.

amstan commented on 2022-07-27 18:13 (UTC) (edited on 2022-07-27 18:14 (UTC) by amstan)

Aha!

For some context, I'm trying to run this on armv7.

copying build/lib.linux-armv7l-3.10/google_crc32c/__pycache__/__config__.cpython-310.pyc -> build/bdist.linux-armv7l/wheel/google_crc32c/__pycache__
copying build/lib.linux-armv7l-3.10/google_crc32c/__pycache__/_checksum.cpython-310.pyc -> build/bdist.linux-armv7l/wheel/google_crc32c/__pycache__
...
Successfully built google_crc32c-1.3.0-cp310-cp310-linux_armv7l.whl
==> Starting check()...
$CARCH=armv7h < log line added by me
...
_________________________________________________________________________________________________ ERROR collecting tests/test___init__.py __________________________________________________________________________________________________
ImportError while importing test module '/home/amstan/.cache/pikaur/build/python-google-crc32c/src/python-crc32c-1.3.0/tests/test___init__.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.10/importlib/__init__.py:126: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/test___init__.py:20: in <module>
    import google_crc32c
E   ModuleNotFoundError: No module named 'google_crc32c'

Looks like the problem is that $CARCH=armv7h, whereas the python building names things armv7l.

https://wiki.archlinux.org/title/Python_package_guidelines#:~:text=CARCH seems like the way to do it, but I'm wondering where the corner case is.

amstan commented on 2022-07-27 04:14 (UTC)

Is it just me or does the check() fail when it's being compiled in a clean setup.

I think it works if the package is already installed (eg: at upgrade time).

Maybe line 26 is not very hermetic and tries to use the system libraries instead.