cchecksum 0.3.8__tar.gz → 0.3.8.dev0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. cchecksum-0.3.8.dev0/.github/workflows/black.yaml +45 -0
  2. cchecksum-0.3.8.dev0/.github/workflows/compile.yaml +59 -0
  3. cchecksum-0.3.8.dev0/.github/workflows/deploy-docs.yaml +73 -0
  4. cchecksum-0.3.8.dev0/.github/workflows/pytest.yaml +50 -0
  5. cchecksum-0.3.8.dev0/.github/workflows/release.yaml +194 -0
  6. cchecksum-0.3.8.dev0/.gitignore +9 -0
  7. cchecksum-0.3.8.dev0/Makefile +11 -0
  8. {cchecksum-0.3.8 → cchecksum-0.3.8.dev0}/PKG-INFO +1 -1
  9. {cchecksum-0.3.8 → cchecksum-0.3.8.dev0}/cchecksum/_checksum.c +169 -194
  10. cchecksum-0.3.8.dev0/cchecksum/_checksum.pyx +437 -0
  11. {cchecksum-0.3.8 → cchecksum-0.3.8.dev0}/cchecksum.egg-info/PKG-INFO +1 -1
  12. cchecksum-0.3.8.dev0/cchecksum.egg-info/SOURCES.txt +44 -0
  13. cchecksum-0.3.8.dev0/docs/Makefile +20 -0
  14. cchecksum-0.3.8.dev0/docs/_build/html/_static/alabaster.css +703 -0
  15. cchecksum-0.3.8.dev0/docs/_build/html/_static/basic.css +921 -0
  16. cchecksum-0.3.8.dev0/docs/_build/html/_static/custom.css +1 -0
  17. cchecksum-0.3.8.dev0/docs/_build/html/_static/doctools.js +156 -0
  18. cchecksum-0.3.8.dev0/docs/_build/html/_static/documentation_options.js +14 -0
  19. cchecksum-0.3.8.dev0/docs/_build/html/_static/file.png +0 -0
  20. cchecksum-0.3.8.dev0/docs/_build/html/_static/language_data.js +199 -0
  21. cchecksum-0.3.8.dev0/docs/_build/html/_static/minus.png +0 -0
  22. cchecksum-0.3.8.dev0/docs/_build/html/_static/plus.png +0 -0
  23. cchecksum-0.3.8.dev0/docs/_build/html/_static/pygments.css +83 -0
  24. cchecksum-0.3.8.dev0/docs/_build/html/_static/searchtools.js +566 -0
  25. cchecksum-0.3.8.dev0/docs/_build/html/_static/sphinx_highlight.js +144 -0
  26. cchecksum-0.3.8.dev0/docs/conf.py +61 -0
  27. cchecksum-0.3.8.dev0/docs/index.rst +20 -0
  28. cchecksum-0.3.8.dev0/docs/make.bat +35 -0
  29. {cchecksum-0.3.8 → cchecksum-0.3.8.dev0}/pyproject.toml +1 -1
  30. cchecksum-0.3.8.dev0/renovate.json +6 -0
  31. cchecksum-0.3.8.dev0/requirements-dev.txt +3 -0
  32. cchecksum-0.3.8.dev0/requirements.txt +4 -0
  33. {cchecksum-0.3.8 → cchecksum-0.3.8.dev0}/setup.py +10 -2
  34. cchecksum-0.3.8/cchecksum.egg-info/SOURCES.txt +0 -17
  35. {cchecksum-0.3.8 → cchecksum-0.3.8.dev0}/LICENSE +0 -0
  36. {cchecksum-0.3.8 → cchecksum-0.3.8.dev0}/README.md +0 -0
  37. {cchecksum-0.3.8 → cchecksum-0.3.8.dev0}/cchecksum/__init__.py +0 -0
  38. {cchecksum-0.3.8 → cchecksum-0.3.8.dev0}/cchecksum/_checksum.pyi +0 -0
  39. {cchecksum-0.3.8 → cchecksum-0.3.8.dev0}/cchecksum/monkey_patch.py +0 -0
  40. {cchecksum-0.3.8 → cchecksum-0.3.8.dev0}/cchecksum/py.typed +0 -0
  41. {cchecksum-0.3.8 → cchecksum-0.3.8.dev0}/cchecksum.egg-info/dependency_links.txt +0 -0
  42. {cchecksum-0.3.8 → cchecksum-0.3.8.dev0}/cchecksum.egg-info/not-zip-safe +0 -0
  43. {cchecksum-0.3.8 → cchecksum-0.3.8.dev0}/cchecksum.egg-info/requires.txt +0 -0
  44. {cchecksum-0.3.8 → cchecksum-0.3.8.dev0}/cchecksum.egg-info/top_level.txt +0 -0
  45. {cchecksum-0.3.8 → cchecksum-0.3.8.dev0}/setup.cfg +0 -0
  46. {cchecksum-0.3.8 → cchecksum-0.3.8.dev0}/tests/test_checksum.py +0 -0
  47. {cchecksum-0.3.8 → cchecksum-0.3.8.dev0}/tests/test_monkey_patch.py +0 -0
@@ -0,0 +1,45 @@
1
+ name: Black Formatter
2
+
3
+ on:
4
+ pull_request:
5
+ branches:
6
+ - master
7
+
8
+ jobs:
9
+ format:
10
+ runs-on: ubuntu-latest
11
+
12
+ steps:
13
+ - name: Checkout code
14
+ uses: actions/checkout@v6
15
+ with:
16
+ ref: ${{ github.head_ref }} # Check out the PR branch
17
+
18
+ - name: Set up Python
19
+ uses: actions/setup-python@v6
20
+ with:
21
+ python-version: '3.14'
22
+
23
+ - name: Install Black
24
+ run: pip install black
25
+
26
+ - name: Run Black
27
+ run: black .
28
+
29
+ - name: Check for changes
30
+ id: changes
31
+ run: |
32
+ if [[ -n $(git status --porcelain) ]]; then
33
+ echo "changes_detected=true" >> $GITHUB_ENV
34
+ else
35
+ echo "changes_detected=false" >> $GITHUB_ENV
36
+ fi
37
+
38
+ - name: Commit changes
39
+ if: env.changes_detected == 'true'
40
+ run: |
41
+ git config --local user.name "github-actions[bot]"
42
+ git config --local user.email "github-actions[bot]@users.noreply.github.com"
43
+ git add .
44
+ git commit -m "chore: \`black .\`"
45
+ git push
@@ -0,0 +1,59 @@
1
+ name: Compile
2
+
3
+ on:
4
+ pull_request:
5
+ branches: [master]
6
+
7
+ permissions:
8
+ contents: write
9
+ pull-requests: write
10
+
11
+ jobs:
12
+ build-ubuntu:
13
+ runs-on: ubuntu-latest
14
+ steps:
15
+ - uses: actions/checkout@v6
16
+ with:
17
+ ref: ${{ github.head_ref }}
18
+
19
+ - name: Set up Python
20
+ uses: actions/setup-python@v6
21
+ with:
22
+ python-version: "3.14"
23
+
24
+ - name: Install dependencies
25
+ run: pip install -r requirements.txt cython==3.2.0 setuptools
26
+
27
+ - name: Build Cython extensions
28
+ run: make cython
29
+
30
+ - name: Check for changes
31
+ id: check_changes
32
+ run: |
33
+ git add .
34
+ if git diff --cached --quiet; then
35
+ echo "changed=false" >> $GITHUB_OUTPUT
36
+ else
37
+ echo "changed=true" >> $GITHUB_OUTPUT
38
+ fi
39
+
40
+ - name: Commit and push changes (if possible)
41
+ if: steps.check_changes.outputs.changed == 'true' && github.event_name == 'push'
42
+ run: |
43
+ git config --local user.name "github-actions[bot]"
44
+ git config --local user.email "github-actions[bot]@users.noreply.github.com"
45
+ git commit -m "chore: compile C files for source control"
46
+ git push
47
+
48
+ - name: Create Pull Request
49
+ if: steps.check_changes.outputs.changed == 'true' && github.event_name != 'push'
50
+ uses: peter-evans/create-pull-request@v7
51
+ with:
52
+ branch: auto/update-cython-cfiles
53
+ base: ${{ github.head_ref || github.ref_name }}
54
+ title: "chore: compile C files for source control"
55
+ body: |
56
+ This PR updates generated C files in /build based on the latest implementation. Generated by GitHub Actions.
57
+ Triggered by #${{ github.event.pull_request.number }}
58
+ commit-message: "chore: compile C files for source control"
59
+ delete-branch: true
@@ -0,0 +1,73 @@
1
+ name: Deploy Documentation
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - master
7
+
8
+ concurrency:
9
+ group: ${{ github.workflow }}-${{ github.ref }}
10
+ cancel-in-progress: true
11
+
12
+ # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
13
+ permissions:
14
+ contents: write
15
+ id-token: write
16
+ pages: write
17
+
18
+
19
+ jobs:
20
+ build-and-deploy:
21
+ runs-on: ubuntu-latest
22
+
23
+ steps:
24
+ - name: Check out code
25
+ uses: actions/checkout@v6
26
+ with:
27
+ persist-credentials: false
28
+
29
+ - name: Set up Python
30
+ uses: actions/setup-python@v6
31
+ with:
32
+ python-version: '3.14'
33
+
34
+ - name: Install dependencies
35
+ run: |
36
+ pip install wheel
37
+ pip install -r requirements.txt
38
+ pip install sphinx sphinx-rtd-theme
39
+
40
+ - name: Build documentation config
41
+ run: |
42
+ pip install .
43
+ make docs
44
+
45
+ - name: Build documentation
46
+ run: |
47
+ cd docs
48
+ make html
49
+
50
+ - name: Deploy to GitHub Pages
51
+ uses: peaceiris/actions-gh-pages@v4
52
+ with:
53
+ github_token: ${{ secrets.GITHUB_TOKEN }}
54
+ publish_dir: ./docs/_build/html
55
+
56
+ - name: Checkout
57
+ uses: actions/checkout@v6
58
+ with:
59
+ ref: gh-pages
60
+ persist-credentials: false
61
+
62
+ - name: Setup Pages
63
+ uses: actions/configure-pages@v5
64
+
65
+ - name: Upload artifact
66
+ uses: actions/upload-pages-artifact@v4
67
+ with:
68
+ # Upload entire repository
69
+ path: '.'
70
+
71
+ - name: Deploy to GitHub Pages
72
+ id: deployment
73
+ uses: actions/deploy-pages@v4
@@ -0,0 +1,50 @@
1
+
2
+ name: PyTest
3
+
4
+ on:
5
+ pull_request:
6
+ # The branches below must be a subset of the branches above
7
+ branches: [ master, dev ]
8
+ paths:
9
+ - '**.py'
10
+ - '**.pyx'
11
+ - '**/pytest.yaml'
12
+ - '!**/docs/conf.py'
13
+ - 'requirements.txt'
14
+ - 'requirements-dev.txt'
15
+ - '.github/workflows/pytest.yaml'
16
+ - 'pyproject.toml'
17
+
18
+ concurrency:
19
+ group: ${{ github.workflow }}-${{ github.ref }}
20
+ cancel-in-progress: true
21
+
22
+ jobs:
23
+ test:
24
+ runs-on: ${{ matrix.os }}
25
+ strategy:
26
+ fail-fast: false
27
+ matrix:
28
+ os: [ ubuntu-latest, macos-latest, windows-latest ]
29
+ pyversion: [ "3.8", "3.9", "3.10", "3.11", "3.12", "3.13" ]
30
+ exclude:
31
+ # gh runner throws "Error: Version ${{ matrix.pyversion }} with arch arm64 not found"
32
+ - os: macos-latest
33
+ pyversion: "3.8"
34
+ - os: macos-latest
35
+ pyversion: "3.9"
36
+
37
+ steps:
38
+ - name: Check out repository code
39
+ uses: actions/checkout@v6
40
+
41
+ - name: Setup Python (faster than using Python container)
42
+ uses: actions/setup-python@v6
43
+ with:
44
+ python-version: ${{ matrix.pyversion }}
45
+
46
+ - name: Install cchecksum and test deps
47
+ run: pip install . -r requirements-dev.txt
48
+
49
+ - name: Run test suite
50
+ run: pytest -s -v
@@ -0,0 +1,194 @@
1
+ name: Build and Publish Wheels
2
+
3
+ on:
4
+ release:
5
+ branches:
6
+ - master
7
+ types: [published]
8
+
9
+ jobs:
10
+ build_wheels:
11
+ name: Build wheels using cibuildwheel
12
+ runs-on: ${{ matrix.os }}
13
+ strategy:
14
+ fail-fast: false
15
+ matrix:
16
+ include:
17
+ # ----------------------------------------------------
18
+ # manylinux 64-bit
19
+ # ----------------------------------------------------
20
+ - os: ubuntu-latest
21
+ build_type: manylinux-x64
22
+ cibw_build: "*manylinux*"
23
+ cibw_archs_linux: x86_64
24
+ artifact_name: "wheels-ubuntu-latest-manylinux-x64"
25
+
26
+ # ----------------------------------------------------
27
+ # manylinux 32-bit
28
+ # ----------------------------------------------------
29
+ - os: ubuntu-latest
30
+ build_type: manylinux-x86
31
+ cibw_build: "*manylinux*"
32
+ cibw_archs_linux: i686
33
+ artifact_name: "wheels-ubuntu-latest-manylinux-x86"
34
+
35
+ # ----------------------------------------------------
36
+ # musllinux 64-bit
37
+ # ----------------------------------------------------
38
+ - os: ubuntu-latest
39
+ build_type: musllinux-x64
40
+ cibw_build: "*musllinux*"
41
+ cibw_archs_linux: x86_64
42
+ artifact_name: "wheels-ubuntu-latest-musllinux-x64"
43
+
44
+ # ----------------------------------------------------
45
+ # musllinux 32-bit
46
+ # ----------------------------------------------------
47
+ - os: ubuntu-latest
48
+ build_type: musllinux-x86
49
+ cibw_build: "*musllinux*"
50
+ cibw_archs_linux: i686
51
+ artifact_name: "wheels-ubuntu-latest-musllinux-x86"
52
+
53
+ # ----------------------------------------------------
54
+ # macOS (64-bit only)
55
+ # ----------------------------------------------------
56
+ - os: macos-latest
57
+ build_type: macos
58
+ cibw_build: ""
59
+ cibw_archs_linux: ""
60
+ artifact_name: "wheels-macos-latest"
61
+
62
+ # ----------------------------------------------------
63
+ # Windows 64-bit
64
+ # ----------------------------------------------------
65
+ - os: windows-latest
66
+ build_type: winx64
67
+ cibw_build: ""
68
+ cibw_archs_windows: AMD64
69
+ artifact_name: "wheels-windows-latest-x64"
70
+
71
+ # ----------------------------------------------------
72
+ # Windows 32-bit
73
+ # ----------------------------------------------------
74
+ - os: windows-latest
75
+ build_type: winx86
76
+ cibw_build: ""
77
+ cibw_archs_windows: x86
78
+ artifact_name: "wheels-windows-latest-x86"
79
+
80
+ steps:
81
+ - name: Check out code
82
+ uses: actions/checkout@v6
83
+ with:
84
+ fetch-depth: 0
85
+
86
+ - name: Set up Python
87
+ uses: actions/setup-python@v6
88
+ with:
89
+ python-version: "3.14"
90
+
91
+ - name: Install cibuildwheel
92
+ run: python -m pip install --upgrade pip setuptools wheel cibuildwheel
93
+
94
+ - name: Build wheels
95
+ env:
96
+ # On Linux: manylinux / musllinux arches
97
+ CIBW_ARCHS_LINUX: ${{ matrix.cibw_archs_linux || '' }}
98
+ # On Windows: AMD64 / x86
99
+ CIBW_ARCHS_WINDOWS: ${{ matrix.cibw_archs_windows || '' }}
100
+ # Which wheels to build for Linux (manylinux vs. musllinux)
101
+ CIBW_BUILD: ${{ matrix.cibw_build || '' }}
102
+ run: python -m cibuildwheel --output-dir wheelhouse
103
+
104
+ - name: Upload wheels
105
+ uses: actions/upload-artifact@v5
106
+ with:
107
+ name: ${{ matrix.artifact_name }}
108
+ path: wheelhouse/*.whl
109
+
110
+ publish_sdist_and_wheels:
111
+ name: Publish wheels to PyPI
112
+ needs: build_wheels
113
+ runs-on: ubuntu-latest
114
+ steps:
115
+ - name: Check out code
116
+ uses: actions/checkout@v6
117
+ with:
118
+ fetch-depth: 0
119
+
120
+ - name: Set up Python
121
+ uses: actions/setup-python@v6
122
+ with:
123
+ python-version: "3.14"
124
+
125
+ - name: Install dependencies
126
+ run: |
127
+ python -m pip install --upgrade pip
128
+ pip install setuptools wheel twine cython
129
+
130
+ - name: Build sdist
131
+ run: python setup.py sdist
132
+
133
+ # ----------------------------------------------------
134
+ # Download wheels built on each runner
135
+ # ----------------------------------------------------
136
+ - name: Download manylinux 64-bit wheels
137
+ uses: actions/download-artifact@v6
138
+ with:
139
+ name: "wheels-ubuntu-latest-manylinux-x64"
140
+ path: wheelhouse/linux-many-x64
141
+
142
+ - name: Download manylinux 32-bit wheels
143
+ uses: actions/download-artifact@v6
144
+ with:
145
+ name: "wheels-ubuntu-latest-manylinux-x86"
146
+ path: wheelhouse/linux-many-x86
147
+
148
+ - name: Download musllinux 64-bit wheels
149
+ uses: actions/download-artifact@v6
150
+ with:
151
+ name: "wheels-ubuntu-latest-musllinux-x64"
152
+ path: wheelhouse/linux-musl-x64
153
+
154
+ - name: Download musllinux 32-bit wheels
155
+ uses: actions/download-artifact@v6
156
+ with:
157
+ name: "wheels-ubuntu-latest-musllinux-x86"
158
+ path: wheelhouse/linux-musl-x86
159
+
160
+ - name: Download macOS wheels
161
+ uses: actions/download-artifact@v6
162
+ with:
163
+ name: "wheels-macos-latest"
164
+ path: wheelhouse/macos
165
+
166
+ - name: Download Windows 64-bit wheels
167
+ uses: actions/download-artifact@v6
168
+ with:
169
+ name: "wheels-windows-latest-x64"
170
+ path: wheelhouse/windows-x64
171
+
172
+ - name: Download Windows 32-bit wheels
173
+ uses: actions/download-artifact@v6
174
+ with:
175
+ name: "wheels-windows-latest-x86"
176
+ path: wheelhouse/windows-x86
177
+
178
+ # ----------------------------------------------------
179
+ # Publish all built artifacts to PyPI
180
+ # ----------------------------------------------------
181
+ - name: Publish sdist and wheels to PyPI
182
+ env:
183
+ TWINE_USERNAME: __token__
184
+ TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
185
+ run: |
186
+ twine upload \
187
+ dist/* \
188
+ wheelhouse/linux-many-x64/*.whl \
189
+ wheelhouse/linux-many-x86/*.whl \
190
+ wheelhouse/linux-musl-x64/*.whl \
191
+ wheelhouse/linux-musl-x86/*.whl \
192
+ wheelhouse/macos/*.whl \
193
+ wheelhouse/windows-x64/*.whl \
194
+ wheelhouse/windows-x86/*.whl
@@ -0,0 +1,9 @@
1
+ __pycache__/
2
+ .eggs/
3
+ .hypothesis/
4
+ .pytest_cache/
5
+ build/
6
+ cchecksum.egg-info/
7
+ dist/
8
+ env/
9
+ *.so
@@ -0,0 +1,11 @@
1
+
2
+ .PHONY: docs
3
+
4
+ docs:
5
+ rm -r ./docs/source -f
6
+ rm -r ./docs/_templates -f
7
+ rm -r ./docs/_build -f
8
+ sphinx-apidoc -o ./docs/source ./cchecksum
9
+
10
+ cython:
11
+ python setup.py build_ext --inplace
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cchecksum
3
- Version: 0.3.8
3
+ Version: 0.3.8.dev0
4
4
  Summary: A ~8x faster drop-in replacement for eth_utils.to_checksum_address. Raises the exact same Exceptions. Implemented in C.
5
5
  Home-page: https://github.com/BobTheBuidler/cchecksum
6
6
  Author: BobTheBuidler