A python wrapper of the C library 'Google CRC32C'
Project description
google-crc32c
Python / CFFI wrapper for
google/crc32c
Checking Out
Be sure to check out all submodules:
$ git clone --recursive https://github.com/googleapis/python-crc32c
Prerequisites
On Linux:
docker
python3.7
On OS X:
make
- Official
python.org
Python 2.7, 3.5, 3.6 and 3.7
On Windows:
cmake
- Official
python.org
Python 3.5, 3.6 and 3.7 - Visual Studio 15 2017 (just the compiler toolchain)
Unfortunately, libcrc32c
relies on many C++11 features, so
building a Python 2.7 extension with the
Visual C++ Compiler for Python 2.7 is infeasible.
Building Wheels
On Linux:
./scripts/manylinux/build.sh
On OS X:
./scripts/osx/build.sh
On Windows: see .appveyor.yml
.
Verify Wheels
On Linux (i.e. a host OS, not a docker
container):
$ ./scripts/manylinux/check-37.sh
...
+ venv/bin/python check_cffi_crc32c.py
_crc32c_cffi: <module 'crc32c._crc32c_cffi' from '.../py-crc32c/venv/lib/python3.7/site-packages/crc32c/_crc32c_cffi.abi3.so'>
_crc32c_cffi.lib: <Lib object for 'crc32c._crc32c_cffi'>
dir(_crc32c_cffi.lib): ['crc32c_extend', 'crc32c_value']
+ unzip -l wheels/google_crc32c-0.0.1-cp37-cp37m-manylinux1_x86_64.whl
Archive: wheels/google_crc32c-0.0.1-cp37-cp37m-manylinux1_x86_64.whl
Length Date Time Name
--------- ---------- ----- ----
26120 2018-10-25 00:09 crc32c/_crc32c_cffi.abi3.so
765 2018-10-24 23:57 crc32c/__init__.py
29552 2018-10-25 00:09 crc32c/.libs/libcrc32c-f865a225.so
109 2018-10-25 00:09 google_crc32c-0.0.1.dist-info/WHEEL
766 2018-10-25 00:09 google_crc32c-0.0.1.dist-info/METADATA
652 2018-10-25 00:09 google_crc32c-0.0.1.dist-info/RECORD
1 2018-10-25 00:09 google_crc32c-0.0.1.dist-info/zip-safe
7 2018-10-25 00:09 google_crc32c-0.0.1.dist-info/top_level.txt
--------- -------
57972 8 files
...
On OS X:
$ ./scripts/osx/check.sh
...
+ venv37/bin/python .../py-crc32c/check_cffi_crc32c.py
_crc32c_cffi: <module 'crc32c._crc32c_cffi' from '.../py-crc32c/venv37/lib/python3.7/site-packages/crc32c/_crc32c_cffi.abi3.so'>
_crc32c_cffi.lib: <Lib object for 'crc32c._crc32c_cffi'>
dir(_crc32c_cffi.lib): ['crc32c_extend', 'crc32c_value']
+ /Library/Frameworks/Python.framework/Versions/3.7/bin/delocate-listdeps --all --depending .../py-crc32c/wheels/google_crc32c-0.0.1-cp37-cp37m-macosx_10_6_intel.whl
/usr/lib/libSystem.B.dylib:
crc32c/_crc32c_cffi.abi3.so
crc32c/.dylibs/libcrc32c.dylib
/usr/lib/libc++.1.dylib:
crc32c/.dylibs/libcrc32c.dylib
@loader_path/.dylibs/libcrc32c.dylib:
crc32c/_crc32c_cffi.abi3.so
...
On Windows: TBD.
Installing locally for testing
Initialize the submodules and build the main libcrc32c.so
shared
library using cmake
/ make
:
$ cd py-crc32c
$ git submodule update --init --recursive
$ python -m virtualenv venv
$ venv/bin/pip install --upgrade setuptools pip wheel
$ venv/bin/pip install cmake
$ mkdir usr
$ export CRC32C_INSTALL_PREFIX=$(pwd)/usr
$ mkdir crc32c/build
$ cd crc32c/build
$ ../../venv/bin/cmake \
> -DCRC32C_BUILD_TESTS=no \
> -DCRC32C_BUILD_BENCHMARKS=no \
> -DBUILD_SHARED_LIBS=yes \
> -DCMAKE_INSTALL_PREFIX:PATH=${CRC32C_INSTALL_PREFIX} \
> ..
$ make all install
$ cd ../..
Now, run the tests:
$ venv/bin/pip install -e .[testing]
$ venv/bin/py.test tests/
============================= test session starts ==============================
platform linux -- Python 3.6.7, pytest-3.10.0, py-1.7.0, pluggy-0.8.0
rootdir: ..., inifile:
collected 9 items
tests/test___init__.py ......... [100%]
=========================== 9 passed in 0.03 seconds ===========================
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
File details
Details for the file google-crc32c-0.0.1.tar.gz
.
File metadata
- Download URL: google-crc32c-0.0.1.tar.gz
- Upload date:
- Size: 5.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 766052c85f2f9e888c5e9aaa271d4f0b0b157009a9314c992fd365dc650a9e66 |
|
MD5 | c6348a7652c9474b8274d105f3d05fc2 |
|
BLAKE2b-256 | 8c63216b20824ba51e291bad7c182edfe0c7dba78b047048e2f43043db23c685 |
File details
Details for the file google_crc32c-0.0.1-cp38-cp38-manylinux2010_x86_64.whl
.
File metadata
- Download URL: google_crc32c-0.0.1-cp38-cp38-manylinux2010_x86_64.whl
- Upload date:
- Size: 29.4 kB
- Tags: CPython 3.8, manylinux: glibc 2.12+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.0.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.8.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 90d28115ef65e9a1077f2cb0c0691d289ac989f5a86095fae79c5f1631e1e23b |
|
MD5 | 1b2728fbaf31f076ac183797c5ec0280 |
|
BLAKE2b-256 | cda399081c40d9014a3d82b24ebb5488d4b938ac4aa973ada72f4d653930f1ce |
File details
Details for the file google_crc32c-0.0.1-cp38-cp38-manylinux1_x86_64.whl
.
File metadata
- Download URL: google_crc32c-0.0.1-cp38-cp38-manylinux1_x86_64.whl
- Upload date:
- Size: 29.4 kB
- Tags: CPython 3.8
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.0.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.8.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6993ca306269954f24317dd9171d162a02cd602215a69effbb3037b5adfdfbff |
|
MD5 | 247cf451a3d151ec0b70e8ced1379074 |
|
BLAKE2b-256 | f38bd02be4dd567613b18fd94b0c76733e40a6150e120bd0c08b21ef252de4de |
File details
Details for the file google_crc32c-0.0.1-cp37-cp37m-win_amd64.whl
.
File metadata
- Download URL: google_crc32c-0.0.1-cp37-cp37m-win_amd64.whl
- Upload date:
- Size: 30.9 kB
- Tags: CPython 3.7m, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.0.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.7.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 47b06f8400923e54ea9d3d868bd735873eb63fa8cbd214e28d826abe49a2e24d |
|
MD5 | 46fa4f51db17c064b53e5c1a81d47221 |
|
BLAKE2b-256 | 07b08c90323d96ae0c64109ed6a18a1895899b53fd7c3914736aa66d0d3a9fd4 |
File details
Details for the file google_crc32c-0.0.1-cp37-cp37m-win32.whl
.
File metadata
- Download URL: google_crc32c-0.0.1-cp37-cp37m-win32.whl
- Upload date:
- Size: 26.0 kB
- Tags: CPython 3.7m, Windows x86
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.0.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.7.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e07b2d907788e1f30248d9db487089dd764f0ae2d819317b511c548474909d2b |
|
MD5 | 5189237d295753e1f453579f19746466 |
|
BLAKE2b-256 | 1b7a22f805d5efa00d6eeed8dfb1a2b16e0594ffa118abcce9e8dc84cfee2c00 |
File details
Details for the file google_crc32c-0.0.1-cp37-cp37m-manylinux2010_x86_64.whl
.
File metadata
- Download URL: google_crc32c-0.0.1-cp37-cp37m-manylinux2010_x86_64.whl
- Upload date:
- Size: 28.9 kB
- Tags: CPython 3.7m, manylinux: glibc 2.12+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.0.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.8.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8c2ff8141008e52f582c41ed83564c10b4edbcbfdad38eec4d58f2b5cb02e0f8 |
|
MD5 | 3634780934c28ae7a72d875cbca402ca |
|
BLAKE2b-256 | 9293085c479118a18550f30576e87efe21e4c1719f95d021808354926f929f3b |
File details
Details for the file google_crc32c-0.0.1-cp37-cp37m-manylinux1_x86_64.whl
.
File metadata
- Download URL: google_crc32c-0.0.1-cp37-cp37m-manylinux1_x86_64.whl
- Upload date:
- Size: 28.9 kB
- Tags: CPython 3.7m
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.0.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.8.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4b329d6be00efc3027410f7c09d74bc32fbbc57cb4e117aaac18cfd8af31f0b3 |
|
MD5 | 63197464977b311f53c59aa1c433b44c |
|
BLAKE2b-256 | c3c29d87477e1ea96ee701a30faa95ce01fbbf5e77c9cea4ff21af97dfbdc3a4 |
File details
Details for the file google_crc32c-0.0.1-cp37-cp37m-macosx_10_9_x86_64.whl
.
File metadata
- Download URL: google_crc32c-0.0.1-cp37-cp37m-macosx_10_9_x86_64.whl
- Upload date:
- Size: 19.1 kB
- Tags: CPython 3.7m, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 20123c2d33e78633a12c823ea843b408eb0305d01c091b680a8f9e819bd365e8 |
|
MD5 | 65072cd69e1470177e1536024681486d |
|
BLAKE2b-256 | d4795378a9faffa948515b3f124c0d851478a4137fa546702d790954a685e6ad |
File details
Details for the file google_crc32c-0.0.1-cp36-cp36m-win_amd64.whl
.
File metadata
- Download URL: google_crc32c-0.0.1-cp36-cp36m-win_amd64.whl
- Upload date:
- Size: 30.9 kB
- Tags: CPython 3.6m, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.0.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.7.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b93167c0411538b2380f13dba301fc791fd343248b787185a72f5729be740652 |
|
MD5 | 12d07164132b85c5145d6d2f21cf4cc6 |
|
BLAKE2b-256 | 9d43a3906d2923fe37c70d11668afc36773ab97b8b8c246b888f5a3a6a2edcd6 |
File details
Details for the file google_crc32c-0.0.1-cp36-cp36m-win32.whl
.
File metadata
- Download URL: google_crc32c-0.0.1-cp36-cp36m-win32.whl
- Upload date:
- Size: 26.0 kB
- Tags: CPython 3.6m, Windows x86
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.0.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.7.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cb052a903f8887003a6ffd8f008f805f49c95d877f9c9281dcf399672691fa25 |
|
MD5 | 06880280b9bc9270e837b3bf19569855 |
|
BLAKE2b-256 | 7f17e3bed0dd914b9ab1c3a3febcad48fa47b2067fbd03b067124a458676b41f |
File details
Details for the file google_crc32c-0.0.1-cp36-cp36m-manylinux2010_x86_64.whl
.
File metadata
- Download URL: google_crc32c-0.0.1-cp36-cp36m-manylinux2010_x86_64.whl
- Upload date:
- Size: 28.9 kB
- Tags: CPython 3.6m, manylinux: glibc 2.12+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.0.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.8.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3da7c63b4207bb15cebff41b0db0c218b9cc43809f97d5e31a0fbd2b982c1285 |
|
MD5 | 40c05a39959992ee8ce74d2611f8f137 |
|
BLAKE2b-256 | e9081508baa010d23362393c5bcb6f93d8c70adb67d64c45499e7b8078ef452b |
File details
Details for the file google_crc32c-0.0.1-cp36-cp36m-manylinux1_x86_64.whl
.
File metadata
- Download URL: google_crc32c-0.0.1-cp36-cp36m-manylinux1_x86_64.whl
- Upload date:
- Size: 28.9 kB
- Tags: CPython 3.6m
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.0.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.8.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 75bc8642d56e93d484ada0d2f1f3a007fd79996f4b35199ef545e06791fc6cb2 |
|
MD5 | 648f8a62bd791f3ad6a9388c14dbb9db |
|
BLAKE2b-256 | 17a63a3e96a9a9194afb8a3c618ea551ac08ef19b749072305448db18eedb21b |
File details
Details for the file google_crc32c-0.0.1-cp36-cp36m-macosx_10_9_x86_64.whl
.
File metadata
- Download URL: google_crc32c-0.0.1-cp36-cp36m-macosx_10_9_x86_64.whl
- Upload date:
- Size: 19.1 kB
- Tags: CPython 3.6m, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fe868ff4d5cd9f69fc2e6f4c6f2f43797e88a1346b2c6c997b2c6691f599669c |
|
MD5 | 0f313da0ecd1bf985529fda1233aac82 |
|
BLAKE2b-256 | 532c94c008894fb8fdd67a2e1ed418c6ee810afe6eab86be2d07fb86382fa595 |
File details
Details for the file google_crc32c-0.0.1-cp35-cp35m-win_amd64.whl
.
File metadata
- Download URL: google_crc32c-0.0.1-cp35-cp35m-win_amd64.whl
- Upload date:
- Size: 31.0 kB
- Tags: CPython 3.5m, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.0.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.7.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8ae31232631d97916f85e70da554592df7793ad51ecae6e857879cfbd43c83f6 |
|
MD5 | 0c1ba762a1df7693f6989790773928c8 |
|
BLAKE2b-256 | 7a2599cfc325f5199f91101bec3d03eecceef01e6bf4784505e12715242e69c9 |
File details
Details for the file google_crc32c-0.0.1-cp35-cp35m-win32.whl
.
File metadata
- Download URL: google_crc32c-0.0.1-cp35-cp35m-win32.whl
- Upload date:
- Size: 26.1 kB
- Tags: CPython 3.5m, Windows x86
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.0.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.7.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 080645dc2913eeff373045459a8a1aef5352fddaa53cd7190cbdebeb5a92b0c8 |
|
MD5 | 0a58b9c335eafdaacf6820ea9ea33f4e |
|
BLAKE2b-256 | 1c6916a14bd1ebf651d4c215818479fc55ea74fbefee48602960feeaca803552 |
File details
Details for the file google_crc32c-0.0.1-cp35-cp35m-manylinux2010_x86_64.whl
.
File metadata
- Download URL: google_crc32c-0.0.1-cp35-cp35m-manylinux2010_x86_64.whl
- Upload date:
- Size: 29.4 kB
- Tags: CPython 3.5m, manylinux: glibc 2.12+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.0.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.8.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ae57916698388afda9da1ef45a5a60ce858e75ef38d45b47638cf4dbc5e1d1fe |
|
MD5 | 10e2d6f9377a359490668f4c629dd8b3 |
|
BLAKE2b-256 | 67c33f76cafaf6ab7f4961a6a3aa9bf44b3b449b0cddf33696f73758418c2cd7 |
File details
Details for the file google_crc32c-0.0.1-cp35-cp35m-manylinux1_x86_64.whl
.
File metadata
- Download URL: google_crc32c-0.0.1-cp35-cp35m-manylinux1_x86_64.whl
- Upload date:
- Size: 29.4 kB
- Tags: CPython 3.5m
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.0.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.8.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6e2d34c9b7524db42bdabdb8496abbf445f66e865563b4cb9bdbe0b40840e5cc |
|
MD5 | 5ccdbca19d5aeabeeb1299939d0c30b0 |
|
BLAKE2b-256 | af58ee7adbcd52206235c096f2314801da9159b7dc91e6f7345d6bffd6c9cd2a |
File details
Details for the file google_crc32c-0.0.1-cp35-cp35m-macosx_10_6_intel.whl
.
File metadata
- Download URL: google_crc32c-0.0.1-cp35-cp35m-macosx_10_6_intel.whl
- Upload date:
- Size: 20.8 kB
- Tags: CPython 3.5m, macOS 10.6+ intel
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fddc0e2fc81b3d6a0b68cb55d1dd175fbe950046ef0a3a0e5b7124b18f9b83ad |
|
MD5 | 3be1d48d9f52d8dbb941991dfe4681d0 |
|
BLAKE2b-256 | 8843e28eabf2da5027902885459321c098baee931f617b13c384ac853e4a36a8 |