@@ -6,143 +6,40 @@ are distributed as well as source. If a wheel is not published for the python
66version and platform you are using, you will need to compile crc32c using a
77C toolchain.
88
9-
10- # Building
11-
12- ## Be sure to check out all submodules:
13-
14- ```
15- $ git clone --recursive https://github.com/googleapis/python-crc32c
16- ```
17-
18- ## Prerequisites
19-
20- On Linux:
21-
22- - ` docker `
23- - ` python3.7 `
24-
25- On OS X:
26-
27- - ` make `
28- - [ Official] [ 1 ] ` python.org ` Python 2.7, 3.5, 3.6 and 3.7
29-
30- On Windows:
31-
32- - ` cmake `
33- - [ Official] [ 1 ] ` python.org ` Python 3.5, 3.6 and 3.7
34- - Visual Studio 15 2017 (just the compiler toolchain)
35-
36- Unfortunately, ` libcrc32c ` relies on many C++11 features, so
37- building a Python 2.7 extension with the
38- [ Visual C++ Compiler for Python 2.7] [ 2 ] is infeasible.
39-
40-
41- ## Building Wheels
42-
43- On Linux:
44-
45- ```
46- ./scripts/manylinux/build.sh
47- ```
48-
49- On OS X:
50-
51- ```
52- ./scripts/osx/build.sh
53- ```
54-
55- On Windows: see ` .appveyor.yml ` .
56-
57- ## Testing/Verify Wheels
58-
59- On Linux (i.e. a host OS, not a ` docker ` container):
60-
61- ```
62- $ ./scripts/manylinux/check-37.sh
63- ...
64- + venv/bin/python check_cffi_crc32c.py
65- _crc32c_cffi: <module 'crc32c._crc32c_cffi' from '.../python-crc32c/venv/lib/python3.7/site-packages/crc32c/_crc32c_cffi.abi3.so'>
66- _crc32c_cffi.lib: <Lib object for 'crc32c._crc32c_cffi'>
67- dir(_crc32c_cffi.lib): ['crc32c_extend', 'crc32c_value']
68- + unzip -l wheels/google_crc32c-0.0.1-cp37-cp37m-manylinux1_x86_64.whl
69- Archive: wheels/google_crc32c-0.0.1-cp37-cp37m-manylinux1_x86_64.whl
70- Length Date Time Name
71- --------- ---------- ----- ----
72- 26120 2018-10-25 00:09 crc32c/_crc32c_cffi.abi3.so
73- 765 2018-10-24 23:57 crc32c/__init__.py
74- 29552 2018-10-25 00:09 crc32c/.libs/libcrc32c-f865a225.so
75- 109 2018-10-25 00:09 google_crc32c-0.0.1.dist-info/WHEEL
76- 766 2018-10-25 00:09 google_crc32c-0.0.1.dist-info/METADATA
77- 652 2018-10-25 00:09 google_crc32c-0.0.1.dist-info/RECORD
78- 1 2018-10-25 00:09 google_crc32c-0.0.1.dist-info/zip-safe
79- 7 2018-10-25 00:09 google_crc32c-0.0.1.dist-info/top_level.txt
80- --------- -------
81- 57972 8 files
82- ...
83- ```
84-
85- On OS X:
86-
87- ```
88- $ ./scripts/osx/check.sh
89- ...
90- + venv37/bin/python .../python-crc32c/check_cffi_crc32c.py
91- _crc32c_cffi: <module 'google_crc32c._crc32c_cffi' from '.../python-crc32c/venv37/lib/python3.7/site-packages/google_crc32c/_crc32c_cffi.abi3.so'>
92- _crc32c_cffi.lib: <Lib object for 'google_crc32c._crc32c_cffi'>
93- dir(_crc32c_cffi.lib): ['crc32c_extend', 'crc32c_value']
94- + /Library/Frameworks/Python.framework/Versions/3.7/bin/delocate-listdeps --all --depending .../python-crc32c/wheels/google_crc32c-0.0.1-cp37-cp37m-macosx_10_6_intel.whl
95- /usr/lib/libSystem.B.dylib:
96- google_crc32c/_crc32c_cffi.abi3.so
97- google_crc32c/.dylibs/libcrc32c.dylib
98- /usr/lib/libc++.1.dylib:
99- google_crc32c/.dylibs/libcrc32c.dylib
100- @loader_path/.dylibs/libcrc32c.dylib:
101- google_crc32c/_crc32c_cffi.abi3.so
102- ...
103- ```
104-
105- On Windows: TBD.
106-
107- [ 1 ] : https://www.python.org/downloads/
108- [ 2 ] : https://aka.ms/vcpython27
109-
110- ## Installing locally for testing
111-
112- Initialize the submodules and build the main ` libcrc32c.so ` shared
113- library using ` cmake ` / ` make ` :
114-
115- ``` bash
116- $ cd python-crc32c
117- $ git submodule update --init --recursive
118- $ python -m venv venv
119- $ venv/bin/pip install --upgrade setuptools pip wheel
120- $ venv/bin/pip install cmake
121- $ mkdir usr
122- $ export CRC32C_INSTALL_PREFIX=$( pwd) /usr
123- $ mkdir google_crc32c/build
124- $ cd google_crc32c/build
125- $ ../../venv/bin/cmake \
126- > -DCRC32C_BUILD_TESTS=no \
127- > -DCRC32C_BUILD_BENCHMARKS=no \
128- > -DBUILD_SHARED_LIBS=yes \
129- > -DCMAKE_INSTALL_PREFIX:PATH=${CRC32C_INSTALL_PREFIX} \
130- > ..
131- $ make all install
132- $ cd ../..
133- ```
134-
135- Now, run the tests:
136-
137- ``` bash
138- $ venv/bin/pip install -e .[testing]
139- $ venv/bin/py.test tests/
140- ============================= test session starts ==============================
141- platform linux -- Python 3.6.7, pytest-3.10.0, py-1.7.0, pluggy-0.8.0
142- rootdir: ..., inifile:
143- collected 9 items
144-
145- tests/test___init__.py ......... [100%]
146-
147- =========================== 9 passed in 0.03 seconds ===========================
148- ```
9+ # Currently Published Wheels
10+
11+ Wheels are currently published for Python 3.6, 3.7, 3.8, 3.9 for multiple
12+ architectures. For information on building your own, please view [ BUILDING.md] ( BUILDING.md ) .
13+
14+ ## Linux
15+ Wheels are published for ` manylinux1 ` and ` manylinux2010 ` for ` x86_64 ` architectures.
16+
17+ - google_crc32c-1.1.0-cp36-cp36m-manylinux1_x86_64.whl
18+ - google_crc32c-1.1.0-cp36-cp36m-manylinux2010_x86_64.whl
19+ - google_crc32c-1.1.0-cp37-cp37m-manylinux1_x86_64.whl
20+ - google_crc32c-1.1.0-cp37-cp37m-manylinux2010_x86_64.whl
21+ - google_crc32c-1.1.0-cp38-cp38-manylinux1_x86_64.whl
22+ - google_crc32c-1.1.0-cp38-cp38-manylinux2010_x86_64.whl
23+ - google_crc32c-1.1.0-cp39-cp39-manylinux1_x86_64.whl
24+ - google_crc32c-1.1.0-cp39-cp39-manylinux2010_x86_64.whl
25+
26+
27+ ## Mac OS
28+ Wheels are published for ` x86_64 ` architectures
29+
30+ - google_crc32c-1.1.0-cp36-cp36m-macosx_10_14_x86_64.whl
31+ - google_crc32c-1.1.0-cp37-cp37m-macosx_10_14_x86_64.whl
32+ - google_crc32c-1.1.0-cp38-cp38-macosx_10_14_x86_64.whl
33+ - google_crc32c-1.1.0-cp39-cp39-macosx_10_14_x86_64.whl
34+
35+ ## Windows
36+ Wheels are published for ` win32 ` and ` win_amd64 ` architectures.
37+
38+ - google_crc32c-1.1.0-cp36-cp36m-win32.whl
39+ - google_crc32c-1.1.0-cp36-cp36m-win_amd64.whl
40+ - google_crc32c-1.1.0-cp37-cp37m-win32.whl
41+ - google_crc32c-1.1.0-cp37-cp37m-win_amd64.whl
42+ - google_crc32c-1.1.0-cp38-cp38-win32.whl
43+ - google_crc32c-1.1.0-cp38-cp38-win_amd64.whl
44+ - google_crc32c-1.1.0-cp39-cp39-win32.whl
45+ - google_crc32c-1.1.0-cp39-cp39-win_amd64.whl
0 commit comments