cc-downloader 1.0.0__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.
- cc_downloader-1.0.0/.github/ISSUE_TEMPLATE/bug_report.md +38 -0
- cc_downloader-1.0.0/.github/ISSUE_TEMPLATE/feature_request.md +20 -0
- cc_downloader-1.0.0/.github/pull_request_template.md +11 -0
- cc_downloader-1.0.0/.github/workflows/python.yml +151 -0
- cc_downloader-1.0.0/.github/workflows/release.yml +216 -0
- cc_downloader-1.0.0/.github/workflows/rust.yml +25 -0
- cc_downloader-1.0.0/.gitignore +60 -0
- cc_downloader-1.0.0/CODE_OF_CONDUCT.md +128 -0
- cc_downloader-1.0.0/CONTRIBUTING.md +80 -0
- cc_downloader-1.0.0/Cargo.lock +2373 -0
- cc_downloader-1.0.0/Cargo.toml +34 -0
- cc_downloader-1.0.0/LICENSE-APACHE +201 -0
- cc_downloader-1.0.0/LICENSE-MIT +21 -0
- cc_downloader-1.0.0/PKG-INFO +168 -0
- cc_downloader-1.0.0/README.md +325 -0
- cc_downloader-1.0.0/SECURITY.md +15 -0
- cc_downloader-1.0.0/cc_downloader/__init__.py +64 -0
- cc_downloader-1.0.0/pyproject.toml +20 -0
- cc_downloader-1.0.0/python/.python-version +1 -0
- cc_downloader-1.0.0/python/Cargo.toml +14 -0
- cc_downloader-1.0.0/python/README.md +159 -0
- cc_downloader-1.0.0/python/main.py +32 -0
- cc_downloader-1.0.0/python/src/lib.rs +142 -0
- cc_downloader-1.0.0/python/uv.lock +38 -0
- cc_downloader-1.0.0/src/cli.rs +157 -0
- cc_downloader-1.0.0/src/download.rs +753 -0
- cc_downloader-1.0.0/src/errors.rs +104 -0
- cc_downloader-1.0.0/src/lib.rs +80 -0
- cc_downloader-1.0.0/src/main.rs +76 -0
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Bug report
|
|
3
|
+
about: Create a report to help us improve
|
|
4
|
+
title: ''
|
|
5
|
+
labels: ''
|
|
6
|
+
assignees: ''
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
**Describe the bug**
|
|
11
|
+
A clear and concise description of what the bug is.
|
|
12
|
+
|
|
13
|
+
**To Reproduce**
|
|
14
|
+
Steps to reproduce the behavior:
|
|
15
|
+
1. Go to '...'
|
|
16
|
+
2. Click on '....'
|
|
17
|
+
3. Scroll down to '....'
|
|
18
|
+
4. See error
|
|
19
|
+
|
|
20
|
+
**Expected behavior**
|
|
21
|
+
A clear and concise description of what you expected to happen.
|
|
22
|
+
|
|
23
|
+
**Screenshots**
|
|
24
|
+
If applicable, add screenshots to help explain your problem.
|
|
25
|
+
|
|
26
|
+
**Desktop (please complete the following information):**
|
|
27
|
+
- OS: [e.g. iOS]
|
|
28
|
+
- Browser [e.g. chrome, safari]
|
|
29
|
+
- Version [e.g. 22]
|
|
30
|
+
|
|
31
|
+
**Smartphone (please complete the following information):**
|
|
32
|
+
- Device: [e.g. iPhone6]
|
|
33
|
+
- OS: [e.g. iOS8.1]
|
|
34
|
+
- Browser [e.g. stock browser, safari]
|
|
35
|
+
- Version [e.g. 22]
|
|
36
|
+
|
|
37
|
+
**Additional context**
|
|
38
|
+
Add any other context about the problem here.
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Feature request
|
|
3
|
+
about: Suggest an idea for this project
|
|
4
|
+
title: ''
|
|
5
|
+
labels: ''
|
|
6
|
+
assignees: ''
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
**Is your feature request related to a problem? Please describe.**
|
|
11
|
+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
|
12
|
+
|
|
13
|
+
**Describe the solution you'd like**
|
|
14
|
+
A clear and concise description of what you want to happen.
|
|
15
|
+
|
|
16
|
+
**Describe alternatives you've considered**
|
|
17
|
+
A clear and concise description of any alternative solutions or features you've considered.
|
|
18
|
+
|
|
19
|
+
**Additional context**
|
|
20
|
+
Add any other context or screenshots about the feature request here.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
## Description
|
|
2
|
+
|
|
3
|
+
<!-- A summary of what this pull request achieves and a rough list of changes. Please also refence any related issue here -->
|
|
4
|
+
|
|
5
|
+
## Breaking Changes
|
|
6
|
+
|
|
7
|
+
<!-- Optional, if there are any breaking changes document them, including how to migrate older code. -->
|
|
8
|
+
|
|
9
|
+
## Notes & open questions
|
|
10
|
+
|
|
11
|
+
<!-- Any notes, remarks or open questions you have to make about the PR. -->
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
name: Python bindings
|
|
2
|
+
|
|
3
|
+
# Build (and smoke-test) the maturin/PyO3 wheels on every push and PR so that
|
|
4
|
+
# breakage is caught long before a release tag is cut. Publishing lives in
|
|
5
|
+
# release.yml; this workflow only validates that the wheels build everywhere.
|
|
6
|
+
|
|
7
|
+
on:
|
|
8
|
+
push:
|
|
9
|
+
branches: [ "main", "dev" ]
|
|
10
|
+
pull_request:
|
|
11
|
+
branches: [ "main", "dev" ]
|
|
12
|
+
workflow_dispatch:
|
|
13
|
+
|
|
14
|
+
permissions:
|
|
15
|
+
contents: read
|
|
16
|
+
|
|
17
|
+
# The maturin project lives in python/ (its own pyproject.toml + Cargo.toml),
|
|
18
|
+
# and the abi3-py312 feature means a single stable-ABI wheel per platform covers
|
|
19
|
+
# all Python >= 3.12 — so no per-Python-version matrix and no --find-interpreter.
|
|
20
|
+
defaults:
|
|
21
|
+
run:
|
|
22
|
+
working-directory: python
|
|
23
|
+
|
|
24
|
+
jobs:
|
|
25
|
+
linux:
|
|
26
|
+
runs-on: ubuntu-latest
|
|
27
|
+
strategy:
|
|
28
|
+
fail-fast: false
|
|
29
|
+
matrix:
|
|
30
|
+
target: [ x86_64, aarch64 ]
|
|
31
|
+
steps:
|
|
32
|
+
- uses: actions/checkout@v4
|
|
33
|
+
- uses: actions/setup-python@v5
|
|
34
|
+
with:
|
|
35
|
+
python-version: '3.12'
|
|
36
|
+
- name: Build wheels
|
|
37
|
+
uses: PyO3/maturin-action@v1
|
|
38
|
+
with:
|
|
39
|
+
working-directory: python
|
|
40
|
+
target: ${{ matrix.target }}
|
|
41
|
+
args: --release --out dist
|
|
42
|
+
sccache: 'true'
|
|
43
|
+
# manylinux2014 (the `auto` default) ships a CentOS 7-era cross GCC that
|
|
44
|
+
# can't compile aws-lc-sys's ARMv8 crypto for the aarch64 wheel. 2_28
|
|
45
|
+
# (AlmaLinux 8 / GCC 12) can — at the cost of requiring glibc >= 2.28.
|
|
46
|
+
manylinux: 2_28
|
|
47
|
+
- name: Smoke-test the wheel
|
|
48
|
+
# Only the native (x86_64) wheel can be imported on the x86_64 runner;
|
|
49
|
+
# the cross-compiled aarch64 wheel cannot run here.
|
|
50
|
+
if: matrix.target == 'x86_64'
|
|
51
|
+
run: |
|
|
52
|
+
pip install --find-links "$PWD/dist" --force-reinstall cc-downloader
|
|
53
|
+
# Import from a neutral dir: the python/ working dir contains the
|
|
54
|
+
# cc_downloader source package, which would shadow the installed wheel.
|
|
55
|
+
cd "$RUNNER_TEMP"
|
|
56
|
+
python -c "import cc_downloader; print(cc_downloader.__all__)"
|
|
57
|
+
- name: Upload wheels
|
|
58
|
+
uses: actions/upload-artifact@v4
|
|
59
|
+
with:
|
|
60
|
+
name: wheels-linux-${{ matrix.target }}
|
|
61
|
+
path: python/dist
|
|
62
|
+
|
|
63
|
+
musllinux:
|
|
64
|
+
runs-on: ubuntu-latest
|
|
65
|
+
strategy:
|
|
66
|
+
fail-fast: false
|
|
67
|
+
matrix:
|
|
68
|
+
target: [ x86_64 ]
|
|
69
|
+
steps:
|
|
70
|
+
- uses: actions/checkout@v4
|
|
71
|
+
- uses: actions/setup-python@v5
|
|
72
|
+
with:
|
|
73
|
+
python-version: '3.12'
|
|
74
|
+
- name: Build wheels
|
|
75
|
+
uses: PyO3/maturin-action@v1
|
|
76
|
+
with:
|
|
77
|
+
working-directory: python
|
|
78
|
+
target: ${{ matrix.target }}
|
|
79
|
+
args: --release --out dist
|
|
80
|
+
sccache: 'true'
|
|
81
|
+
manylinux: musllinux_1_2
|
|
82
|
+
- name: Upload wheels
|
|
83
|
+
uses: actions/upload-artifact@v4
|
|
84
|
+
with:
|
|
85
|
+
name: wheels-musllinux-${{ matrix.target }}
|
|
86
|
+
path: python/dist
|
|
87
|
+
|
|
88
|
+
windows:
|
|
89
|
+
runs-on: windows-latest
|
|
90
|
+
strategy:
|
|
91
|
+
fail-fast: false
|
|
92
|
+
matrix:
|
|
93
|
+
target: [ x64 ]
|
|
94
|
+
steps:
|
|
95
|
+
- uses: actions/checkout@v4
|
|
96
|
+
- uses: actions/setup-python@v5
|
|
97
|
+
with:
|
|
98
|
+
python-version: '3.12'
|
|
99
|
+
architecture: ${{ matrix.target }}
|
|
100
|
+
- name: Build wheels
|
|
101
|
+
uses: PyO3/maturin-action@v1
|
|
102
|
+
with:
|
|
103
|
+
working-directory: python
|
|
104
|
+
target: ${{ matrix.target }}
|
|
105
|
+
args: --release --out dist
|
|
106
|
+
sccache: 'true'
|
|
107
|
+
- name: Upload wheels
|
|
108
|
+
uses: actions/upload-artifact@v4
|
|
109
|
+
with:
|
|
110
|
+
name: wheels-windows-${{ matrix.target }}
|
|
111
|
+
path: python/dist
|
|
112
|
+
|
|
113
|
+
macos:
|
|
114
|
+
runs-on: macos-latest
|
|
115
|
+
strategy:
|
|
116
|
+
fail-fast: false
|
|
117
|
+
matrix:
|
|
118
|
+
target: [ x86_64, aarch64 ]
|
|
119
|
+
steps:
|
|
120
|
+
- uses: actions/checkout@v4
|
|
121
|
+
- uses: actions/setup-python@v5
|
|
122
|
+
with:
|
|
123
|
+
python-version: '3.12'
|
|
124
|
+
- name: Build wheels
|
|
125
|
+
uses: PyO3/maturin-action@v1
|
|
126
|
+
with:
|
|
127
|
+
working-directory: python
|
|
128
|
+
target: ${{ matrix.target }}
|
|
129
|
+
args: --release --out dist
|
|
130
|
+
sccache: 'true'
|
|
131
|
+
- name: Upload wheels
|
|
132
|
+
uses: actions/upload-artifact@v4
|
|
133
|
+
with:
|
|
134
|
+
name: wheels-macos-${{ matrix.target }}
|
|
135
|
+
path: python/dist
|
|
136
|
+
|
|
137
|
+
sdist:
|
|
138
|
+
runs-on: ubuntu-latest
|
|
139
|
+
steps:
|
|
140
|
+
- uses: actions/checkout@v4
|
|
141
|
+
- name: Build sdist
|
|
142
|
+
uses: PyO3/maturin-action@v1
|
|
143
|
+
with:
|
|
144
|
+
working-directory: python
|
|
145
|
+
command: sdist
|
|
146
|
+
args: --out dist
|
|
147
|
+
- name: Upload sdist
|
|
148
|
+
uses: actions/upload-artifact@v4
|
|
149
|
+
with:
|
|
150
|
+
name: wheels-sdist
|
|
151
|
+
path: python/dist
|
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
|
|
3
|
+
permissions:
|
|
4
|
+
contents: write
|
|
5
|
+
|
|
6
|
+
on:
|
|
7
|
+
push:
|
|
8
|
+
tags:
|
|
9
|
+
# Final releases (v0.6.1) -> PyPI + GitHub Release with Rust binaries.
|
|
10
|
+
# SemVer pre-release tags (v0.6.1-alpha.1, v0.6.1-beta.1, v0.6.1-rc.1) ->
|
|
11
|
+
# TestPyPI only, no GitHub Release and no Rust binaries. maturin converts
|
|
12
|
+
# the SemVer version to PEP 440 for the wheel (-alpha.1 -> a1, -rc.1 ->
|
|
13
|
+
# rc1). Routing is decided by `detect`.
|
|
14
|
+
- v[0-9]+.*
|
|
15
|
+
|
|
16
|
+
jobs:
|
|
17
|
+
# Classify the tag once so every downstream job can branch on it. A tag whose
|
|
18
|
+
# version carries a SemVer pre-release segment (anything after a `-`, e.g.
|
|
19
|
+
# -alpha.1 / -beta.1 / -rc.1) is a "prerelease": it goes to TestPyPI and skips
|
|
20
|
+
# the Rust release entirely.
|
|
21
|
+
detect:
|
|
22
|
+
runs-on: ubuntu-latest
|
|
23
|
+
outputs:
|
|
24
|
+
prerelease: ${{ steps.check.outputs.prerelease }}
|
|
25
|
+
steps:
|
|
26
|
+
- id: check
|
|
27
|
+
shell: bash
|
|
28
|
+
env:
|
|
29
|
+
TAG: ${{ github.ref_name }}
|
|
30
|
+
run: |
|
|
31
|
+
version="${TAG#v}"
|
|
32
|
+
if [[ ! "$version" =~ ^[0-9]+(\.[0-9]+)*(-[0-9A-Za-z.]+)?(\+[0-9A-Za-z.]+)?$ ]]; then
|
|
33
|
+
echo "::error::Tag '$TAG' is not a valid version"; exit 1
|
|
34
|
+
fi
|
|
35
|
+
if [[ "$version" == *-* ]]; then
|
|
36
|
+
echo "Tag '$TAG' is a pre-release -> TestPyPI, no Rust release"
|
|
37
|
+
echo "prerelease=true" >> "$GITHUB_OUTPUT"
|
|
38
|
+
else
|
|
39
|
+
echo "Tag '$TAG' is a final release -> PyPI + Rust release"
|
|
40
|
+
echo "prerelease=false" >> "$GITHUB_OUTPUT"
|
|
41
|
+
fi
|
|
42
|
+
|
|
43
|
+
create-release:
|
|
44
|
+
needs: detect
|
|
45
|
+
if: needs.detect.outputs.prerelease == 'false'
|
|
46
|
+
runs-on: ubuntu-latest
|
|
47
|
+
steps:
|
|
48
|
+
- uses: actions/checkout@v4
|
|
49
|
+
- uses: taiki-e/create-gh-release-action@v1
|
|
50
|
+
with:
|
|
51
|
+
# (required) GitHub token for creating GitHub Releases.
|
|
52
|
+
token: ${{ secrets.GITHUB_TOKEN }}
|
|
53
|
+
|
|
54
|
+
upload-assets:
|
|
55
|
+
needs: [ detect, create-release ]
|
|
56
|
+
if: needs.detect.outputs.prerelease == 'false'
|
|
57
|
+
strategy:
|
|
58
|
+
matrix:
|
|
59
|
+
include:
|
|
60
|
+
- target: aarch64-unknown-linux-gnu
|
|
61
|
+
os: ubuntu-latest
|
|
62
|
+
- target: x86_64-unknown-linux-gnu
|
|
63
|
+
os: ubuntu-latest
|
|
64
|
+
- target: x86_64-apple-darwin
|
|
65
|
+
os: macos-latest
|
|
66
|
+
- target: aarch64-apple-darwin
|
|
67
|
+
os: macos-latest
|
|
68
|
+
- target: x86_64-pc-windows-msvc
|
|
69
|
+
os: windows-latest
|
|
70
|
+
runs-on: ${{ matrix.os }}
|
|
71
|
+
steps:
|
|
72
|
+
- uses: actions/checkout@v4
|
|
73
|
+
- uses: taiki-e/upload-rust-binary-action@v1
|
|
74
|
+
with:
|
|
75
|
+
# (required) Comma-separated list of binary names (non-extension portion of filename) to build and upload.
|
|
76
|
+
# Note that glob pattern is not supported yet.
|
|
77
|
+
bin: cc-downloader
|
|
78
|
+
# (optional) Target triple, default is host triple.
|
|
79
|
+
# This is optional but it is recommended that this always be set to
|
|
80
|
+
# clarify which target you are building for if macOS is included in
|
|
81
|
+
# the matrix because GitHub Actions changed the default architecture
|
|
82
|
+
# of macos-latest since macos-14.
|
|
83
|
+
target: ${{ matrix.target }}
|
|
84
|
+
# (optional) Archive name (non-extension portion of filename) to be uploaded.
|
|
85
|
+
# [default value: $bin-$target]
|
|
86
|
+
# [possible values: the following variables and any string]
|
|
87
|
+
# variables:
|
|
88
|
+
# - $bin - Binary name (non-extension portion of filename).
|
|
89
|
+
# - $target - Target triple.
|
|
90
|
+
# - $tag - Tag of this release.
|
|
91
|
+
# When multiple binary names are specified, default archive name or $bin variable cannot be used.
|
|
92
|
+
archive: $bin-$tag-$target
|
|
93
|
+
# (optional) On which platform to distribute the `.tar.gz` file.
|
|
94
|
+
# [default value: unix]
|
|
95
|
+
# [possible values: all, unix, windows, none]
|
|
96
|
+
tar: unix
|
|
97
|
+
# (optional) On which platform to distribute the `.zip` file.
|
|
98
|
+
# [default value: windows]
|
|
99
|
+
# [possible values: all, unix, windows, none]
|
|
100
|
+
zip: windows
|
|
101
|
+
# (optional) Comma-separated list of additional files to be included to archive.
|
|
102
|
+
# Note that glob pattern is not supported yet.
|
|
103
|
+
include: LICENSE-APACHE,LICENSE-MIT,README.md
|
|
104
|
+
# (optional) Checksums to release with the asset.
|
|
105
|
+
checksum: sha512
|
|
106
|
+
# (required) GitHub token for uploading assets to GitHub Releases.
|
|
107
|
+
token: ${{ secrets.GITHUB_TOKEN }}
|
|
108
|
+
|
|
109
|
+
# --- Python bindings: build the maturin/PyO3 wheels, then publish to PyPI ---
|
|
110
|
+
# The bindings live in python/ and use abi3-py312, so one stable-ABI wheel per
|
|
111
|
+
# platform covers all Python >= 3.12. This mirrors the Rust binary targets above.
|
|
112
|
+
build-wheels:
|
|
113
|
+
needs: detect
|
|
114
|
+
runs-on: ${{ matrix.os }}
|
|
115
|
+
strategy:
|
|
116
|
+
fail-fast: false
|
|
117
|
+
matrix:
|
|
118
|
+
include:
|
|
119
|
+
# manylinux_2_28 (not the `auto`/manylinux2014 default): its GCC 12
|
|
120
|
+
# toolchain can cross-compile aws-lc-sys's ARMv8 crypto for the aarch64
|
|
121
|
+
# wheel. Trade-off: the wheels require glibc >= 2.28.
|
|
122
|
+
- target: aarch64-unknown-linux-gnu
|
|
123
|
+
os: ubuntu-latest
|
|
124
|
+
manylinux: 2_28
|
|
125
|
+
- target: x86_64-unknown-linux-gnu
|
|
126
|
+
os: ubuntu-latest
|
|
127
|
+
manylinux: 2_28
|
|
128
|
+
- target: x86_64-apple-darwin
|
|
129
|
+
os: macos-latest
|
|
130
|
+
- target: aarch64-apple-darwin
|
|
131
|
+
os: macos-latest
|
|
132
|
+
- target: x86_64-pc-windows-msvc
|
|
133
|
+
os: windows-latest
|
|
134
|
+
steps:
|
|
135
|
+
- uses: actions/checkout@v4
|
|
136
|
+
- uses: actions/setup-python@v5
|
|
137
|
+
with:
|
|
138
|
+
python-version: '3.12'
|
|
139
|
+
- name: Set wheel version from tag
|
|
140
|
+
shell: bash
|
|
141
|
+
env:
|
|
142
|
+
TAG: ${{ github.ref_name }}
|
|
143
|
+
run: |
|
|
144
|
+
version="${TAG#v}"
|
|
145
|
+
if [[ ! "$version" =~ ^[0-9]+(\.[0-9]+)*(-[0-9A-Za-z.]+)?(\+[0-9A-Za-z.]+)?$ ]]; then
|
|
146
|
+
echo "::error::Tag '$TAG' is not a valid version"; exit 1
|
|
147
|
+
fi
|
|
148
|
+
echo "Setting cc-downloader-python version to $version"
|
|
149
|
+
python -c "import re,sys,pathlib; p=pathlib.Path('python/Cargo.toml'); t,n=re.subn(r'(?m)^(\s*version\s*=\s*)\"[^\"]*\"', r'\1\"'+sys.argv[1]+'\"', p.read_text(), count=1); assert n==1, 'version line not found'; p.write_text(t)" "$version"
|
|
150
|
+
- name: Build wheels
|
|
151
|
+
uses: PyO3/maturin-action@v1
|
|
152
|
+
with:
|
|
153
|
+
working-directory: python
|
|
154
|
+
target: ${{ matrix.target }}
|
|
155
|
+
args: --release --out dist
|
|
156
|
+
sccache: 'true'
|
|
157
|
+
manylinux: ${{ matrix.manylinux }}
|
|
158
|
+
- name: Upload wheels
|
|
159
|
+
uses: actions/upload-artifact@v4
|
|
160
|
+
with:
|
|
161
|
+
name: wheels-${{ matrix.target }}
|
|
162
|
+
path: python/dist
|
|
163
|
+
|
|
164
|
+
build-sdist:
|
|
165
|
+
needs: detect
|
|
166
|
+
runs-on: ubuntu-latest
|
|
167
|
+
steps:
|
|
168
|
+
- uses: actions/checkout@v4
|
|
169
|
+
- uses: actions/setup-python@v5
|
|
170
|
+
with:
|
|
171
|
+
python-version: '3.12'
|
|
172
|
+
- name: Set sdist version from tag
|
|
173
|
+
shell: bash
|
|
174
|
+
env:
|
|
175
|
+
TAG: ${{ github.ref_name }}
|
|
176
|
+
run: |
|
|
177
|
+
version="${TAG#v}"
|
|
178
|
+
if [[ ! "$version" =~ ^[0-9]+(\.[0-9]+)*(-[0-9A-Za-z.]+)?(\+[0-9A-Za-z.]+)?$ ]]; then
|
|
179
|
+
echo "::error::Tag '$TAG' is not a valid version"; exit 1
|
|
180
|
+
fi
|
|
181
|
+
echo "Setting cc-downloader-python version to $version"
|
|
182
|
+
python -c "import re,sys,pathlib; p=pathlib.Path('python/Cargo.toml'); t,n=re.subn(r'(?m)^(\s*version\s*=\s*)\"[^\"]*\"', r'\1\"'+sys.argv[1]+'\"', p.read_text(), count=1); assert n==1, 'version line not found'; p.write_text(t)" "$version"
|
|
183
|
+
- name: Build sdist
|
|
184
|
+
uses: PyO3/maturin-action@v1
|
|
185
|
+
with:
|
|
186
|
+
working-directory: python
|
|
187
|
+
command: sdist
|
|
188
|
+
args: --out dist
|
|
189
|
+
- name: Upload sdist
|
|
190
|
+
uses: actions/upload-artifact@v4
|
|
191
|
+
with:
|
|
192
|
+
name: wheels-sdist
|
|
193
|
+
path: python/dist
|
|
194
|
+
|
|
195
|
+
publish-pypi:
|
|
196
|
+
needs: [ detect, build-wheels, build-sdist ]
|
|
197
|
+
runs-on: ubuntu-latest
|
|
198
|
+
# Trusted Publishing (OIDC) — no API token. Requires a one-time "trusted
|
|
199
|
+
# publisher" entry for this repo + workflow on BOTH indexes: pypi.org (final
|
|
200
|
+
# releases) and test.pypi.org (pre-release / dev tags).
|
|
201
|
+
permissions:
|
|
202
|
+
id-token: write
|
|
203
|
+
steps:
|
|
204
|
+
- name: Download all distributions
|
|
205
|
+
uses: actions/download-artifact@v4
|
|
206
|
+
with:
|
|
207
|
+
pattern: wheels-*
|
|
208
|
+
path: dist
|
|
209
|
+
merge-multiple: true
|
|
210
|
+
# Pre-release / dev tags publish to TestPyPI; final releases to PyPI.
|
|
211
|
+
- name: Publish
|
|
212
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
213
|
+
with:
|
|
214
|
+
repository-url: ${{ needs.detect.outputs.prerelease == 'true' && 'https://test.pypi.org/legacy/' || 'https://upload.pypi.org/legacy/' }}
|
|
215
|
+
skip-existing: true
|
|
216
|
+
packages-dir: dist
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
name: Rust
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [ "main", "dev" ]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [ "main", "dev" ]
|
|
8
|
+
|
|
9
|
+
env:
|
|
10
|
+
CARGO_TERM_COLOR: always
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
build:
|
|
14
|
+
|
|
15
|
+
runs-on: ubuntu-latest
|
|
16
|
+
|
|
17
|
+
steps:
|
|
18
|
+
- uses: actions/checkout@v4
|
|
19
|
+
- name: Build
|
|
20
|
+
run: cargo build --verbose
|
|
21
|
+
- name: Run tests
|
|
22
|
+
run: cargo test --verbose
|
|
23
|
+
- name: Run clippy
|
|
24
|
+
run: cargo clippy --verbose
|
|
25
|
+
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# General
|
|
2
|
+
.DS_Store
|
|
3
|
+
.AppleDouble
|
|
4
|
+
.LSOverride
|
|
5
|
+
|
|
6
|
+
# Icon must end with two \r
|
|
7
|
+
Icon
|
|
8
|
+
|
|
9
|
+
# Thumbnails
|
|
10
|
+
._*
|
|
11
|
+
|
|
12
|
+
# Files that might appear in the root of a volume
|
|
13
|
+
.DocumentRevisions-V100
|
|
14
|
+
.fseventsd
|
|
15
|
+
.Spotlight-V100
|
|
16
|
+
.TemporaryItems
|
|
17
|
+
.Trashes
|
|
18
|
+
.VolumeIcon.icns
|
|
19
|
+
.com.apple.timemachine.donotpresent
|
|
20
|
+
|
|
21
|
+
# Directories potentially created on remote AFP share
|
|
22
|
+
.AppleDB
|
|
23
|
+
.AppleDesktop
|
|
24
|
+
Network Trash Folder
|
|
25
|
+
Temporary Items
|
|
26
|
+
.apdisk
|
|
27
|
+
|
|
28
|
+
# Generated by Cargo
|
|
29
|
+
# will have compiled files and executables
|
|
30
|
+
debug/
|
|
31
|
+
target/
|
|
32
|
+
|
|
33
|
+
# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries
|
|
34
|
+
# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html
|
|
35
|
+
# Cargo.lock
|
|
36
|
+
|
|
37
|
+
# These are backup files generated by rustfmt
|
|
38
|
+
**/*.rs.bk
|
|
39
|
+
|
|
40
|
+
# MSVC Windows builds of rustc generate these, which store debugging information
|
|
41
|
+
*.pdb
|
|
42
|
+
|
|
43
|
+
# Project specific files
|
|
44
|
+
test-download
|
|
45
|
+
|
|
46
|
+
# IDE
|
|
47
|
+
.vscode/
|
|
48
|
+
|
|
49
|
+
# Python
|
|
50
|
+
.venv/
|
|
51
|
+
__pycache__/
|
|
52
|
+
*.py[cod]
|
|
53
|
+
*.so
|
|
54
|
+
*.pyd
|
|
55
|
+
*.egg-info/
|
|
56
|
+
dist/
|
|
57
|
+
.mypy_cache/
|
|
58
|
+
.ruff_cache/
|
|
59
|
+
|
|
60
|
+
.idea
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
# Contributor Covenant Code of Conduct
|
|
2
|
+
|
|
3
|
+
## Our Pledge
|
|
4
|
+
|
|
5
|
+
We as members, contributors, and leaders pledge to make participation in our
|
|
6
|
+
community a harassment-free experience for everyone, regardless of age, body
|
|
7
|
+
size, visible or invisible disability, ethnicity, sex characteristics, gender
|
|
8
|
+
identity and expression, level of experience, education, socio-economic status,
|
|
9
|
+
nationality, personal appearance, race, religion, or sexual identity
|
|
10
|
+
and orientation.
|
|
11
|
+
|
|
12
|
+
We pledge to act and interact in ways that contribute to an open, welcoming,
|
|
13
|
+
diverse, inclusive, and healthy community.
|
|
14
|
+
|
|
15
|
+
## Our Standards
|
|
16
|
+
|
|
17
|
+
Examples of behavior that contributes to a positive environment for our
|
|
18
|
+
community include:
|
|
19
|
+
|
|
20
|
+
* Demonstrating empathy and kindness toward other people
|
|
21
|
+
* Being respectful of differing opinions, viewpoints, and experiences
|
|
22
|
+
* Giving and gracefully accepting constructive feedback
|
|
23
|
+
* Accepting responsibility and apologizing to those affected by our mistakes,
|
|
24
|
+
and learning from the experience
|
|
25
|
+
* Focusing on what is best not just for us as individuals, but for the
|
|
26
|
+
overall community
|
|
27
|
+
|
|
28
|
+
Examples of unacceptable behavior include:
|
|
29
|
+
|
|
30
|
+
* The use of sexualized language or imagery, and sexual attention or
|
|
31
|
+
advances of any kind
|
|
32
|
+
* Trolling, insulting or derogatory comments, and personal or political attacks
|
|
33
|
+
* Public or private harassment
|
|
34
|
+
* Publishing others' private information, such as a physical or email
|
|
35
|
+
address, without their explicit permission
|
|
36
|
+
* Other conduct which could reasonably be considered inappropriate in a
|
|
37
|
+
professional setting
|
|
38
|
+
|
|
39
|
+
## Enforcement Responsibilities
|
|
40
|
+
|
|
41
|
+
Community leaders are responsible for clarifying and enforcing our standards of
|
|
42
|
+
acceptable behavior and will take appropriate and fair corrective action in
|
|
43
|
+
response to any behavior that they deem inappropriate, threatening, offensive,
|
|
44
|
+
or harmful.
|
|
45
|
+
|
|
46
|
+
Community leaders have the right and responsibility to remove, edit, or reject
|
|
47
|
+
comments, commits, code, wiki edits, issues, and other contributions that are
|
|
48
|
+
not aligned to this Code of Conduct, and will communicate reasons for moderation
|
|
49
|
+
decisions when appropriate.
|
|
50
|
+
|
|
51
|
+
## Scope
|
|
52
|
+
|
|
53
|
+
This Code of Conduct applies within all community spaces, and also applies when
|
|
54
|
+
an individual is officially representing the community in public spaces.
|
|
55
|
+
Examples of representing our community include using an official e-mail address,
|
|
56
|
+
posting via an official social media account, or acting as an appointed
|
|
57
|
+
representative at an online or offline event.
|
|
58
|
+
|
|
59
|
+
## Enforcement
|
|
60
|
+
|
|
61
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
|
62
|
+
reported to the community leaders responsible for enforcement at
|
|
63
|
+
pedro@commoncrawl.org.
|
|
64
|
+
All complaints will be reviewed and investigated promptly and fairly.
|
|
65
|
+
|
|
66
|
+
All community leaders are obligated to respect the privacy and security of the
|
|
67
|
+
reporter of any incident.
|
|
68
|
+
|
|
69
|
+
## Enforcement Guidelines
|
|
70
|
+
|
|
71
|
+
Community leaders will follow these Community Impact Guidelines in determining
|
|
72
|
+
the consequences for any action they deem in violation of this Code of Conduct:
|
|
73
|
+
|
|
74
|
+
### 1. Correction
|
|
75
|
+
|
|
76
|
+
**Community Impact**: Use of inappropriate language or other behavior deemed
|
|
77
|
+
unprofessional or unwelcome in the community.
|
|
78
|
+
|
|
79
|
+
**Consequence**: A private, written warning from community leaders, providing
|
|
80
|
+
clarity around the nature of the violation and an explanation of why the
|
|
81
|
+
behavior was inappropriate. A public apology may be requested.
|
|
82
|
+
|
|
83
|
+
### 2. Warning
|
|
84
|
+
|
|
85
|
+
**Community Impact**: A violation through a single incident or series
|
|
86
|
+
of actions.
|
|
87
|
+
|
|
88
|
+
**Consequence**: A warning with consequences for continued behavior. No
|
|
89
|
+
interaction with the people involved, including unsolicited interaction with
|
|
90
|
+
those enforcing the Code of Conduct, for a specified period of time. This
|
|
91
|
+
includes avoiding interactions in community spaces as well as external channels
|
|
92
|
+
like social media. Violating these terms may lead to a temporary or
|
|
93
|
+
permanent ban.
|
|
94
|
+
|
|
95
|
+
### 3. Temporary Ban
|
|
96
|
+
|
|
97
|
+
**Community Impact**: A serious violation of community standards, including
|
|
98
|
+
sustained inappropriate behavior.
|
|
99
|
+
|
|
100
|
+
**Consequence**: A temporary ban from any sort of interaction or public
|
|
101
|
+
communication with the community for a specified period of time. No public or
|
|
102
|
+
private interaction with the people involved, including unsolicited interaction
|
|
103
|
+
with those enforcing the Code of Conduct, is allowed during this period.
|
|
104
|
+
Violating these terms may lead to a permanent ban.
|
|
105
|
+
|
|
106
|
+
### 4. Permanent Ban
|
|
107
|
+
|
|
108
|
+
**Community Impact**: Demonstrating a pattern of violation of community
|
|
109
|
+
standards, including sustained inappropriate behavior, harassment of an
|
|
110
|
+
individual, or aggression toward or disparagement of classes of individuals.
|
|
111
|
+
|
|
112
|
+
**Consequence**: A permanent ban from any sort of public interaction within
|
|
113
|
+
the community.
|
|
114
|
+
|
|
115
|
+
## Attribution
|
|
116
|
+
|
|
117
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
|
|
118
|
+
version 2.0, available at
|
|
119
|
+
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
|
|
120
|
+
|
|
121
|
+
Community Impact Guidelines were inspired by [Mozilla's code of conduct
|
|
122
|
+
enforcement ladder](https://github.com/mozilla/diversity).
|
|
123
|
+
|
|
124
|
+
[homepage]: https://www.contributor-covenant.org
|
|
125
|
+
|
|
126
|
+
For answers to common questions about this code of conduct, see the FAQ at
|
|
127
|
+
https://www.contributor-covenant.org/faq. Translations are available at
|
|
128
|
+
https://www.contributor-covenant.org/translations.
|