geomanpy 0.2.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.
Files changed (46) hide show
  1. geomanpy-0.2.0/.devcontainer/Dockerfile +21 -0
  2. geomanpy-0.2.0/.devcontainer/devcontainer.json +32 -0
  3. geomanpy-0.2.0/.github/workflows/check.yml +61 -0
  4. geomanpy-0.2.0/.github/workflows/format.yml +32 -0
  5. geomanpy-0.2.0/.github/workflows/publish.yml +165 -0
  6. geomanpy-0.2.0/.gitignore +4 -0
  7. geomanpy-0.2.0/.vscode/settings.json +5 -0
  8. geomanpy-0.2.0/Cargo.lock +3247 -0
  9. geomanpy-0.2.0/Cargo.toml +39 -0
  10. geomanpy-0.2.0/LICENSE +201 -0
  11. geomanpy-0.2.0/PKG-INFO +78 -0
  12. geomanpy-0.2.0/README.md +70 -0
  13. geomanpy-0.2.0/py_src/geomanpy/__init__.py +68 -0
  14. geomanpy-0.2.0/py_src/geomanpy/__init__.pyi +1381 -0
  15. geomanpy-0.2.0/py_src/geomanpy/py.typed +0 -0
  16. geomanpy-0.2.0/pyproject.toml +21 -0
  17. geomanpy-0.2.0/scripts/fmt.sh +6 -0
  18. geomanpy-0.2.0/scripts/test-cross-build.sh +96 -0
  19. geomanpy-0.2.0/src/dataclass.rs +73 -0
  20. geomanpy-0.2.0/src/glam_wrappers/affine3.rs +740 -0
  21. geomanpy-0.2.0/src/glam_wrappers/mat3.rs +971 -0
  22. geomanpy-0.2.0/src/glam_wrappers/mat4.rs +1343 -0
  23. geomanpy-0.2.0/src/glam_wrappers/mod.rs +605 -0
  24. geomanpy-0.2.0/src/glam_wrappers/quat.rs +964 -0
  25. geomanpy-0.2.0/src/glam_wrappers/vec2.rs +976 -0
  26. geomanpy-0.2.0/src/glam_wrappers/vec3.rs +1152 -0
  27. geomanpy-0.2.0/src/glam_wrappers/vec4.rs +991 -0
  28. geomanpy-0.2.0/src/lib.rs +77 -0
  29. geomanpy-0.2.0/src/pickle.rs +79 -0
  30. geomanpy-0.2.0/src/rp_serde.rs +152 -0
  31. geomanpy-0.2.0/src/rustpython_bindings/mod.rs +163 -0
  32. geomanpy-0.2.0/src/wreck_wrappers/capsule.rs +266 -0
  33. geomanpy-0.2.0/src/wreck_wrappers/collider.rs +383 -0
  34. geomanpy-0.2.0/src/wreck_wrappers/convex_polygon.rs +264 -0
  35. geomanpy-0.2.0/src/wreck_wrappers/convex_polytope.rs +251 -0
  36. geomanpy-0.2.0/src/wreck_wrappers/cuboid.rs +347 -0
  37. geomanpy-0.2.0/src/wreck_wrappers/cylinder.rs +281 -0
  38. geomanpy-0.2.0/src/wreck_wrappers/line.rs +191 -0
  39. geomanpy-0.2.0/src/wreck_wrappers/line_segment.rs +202 -0
  40. geomanpy-0.2.0/src/wreck_wrappers/mod.rs +898 -0
  41. geomanpy-0.2.0/src/wreck_wrappers/plane.rs +186 -0
  42. geomanpy-0.2.0/src/wreck_wrappers/pointcloud.rs +259 -0
  43. geomanpy-0.2.0/src/wreck_wrappers/ray.rs +180 -0
  44. geomanpy-0.2.0/src/wreck_wrappers/sphere.rs +197 -0
  45. geomanpy-0.2.0/src/wreck_wrappers/sphere_collection.rs +221 -0
  46. geomanpy-0.2.0/tests/rp_parity.rs +297 -0
@@ -0,0 +1,21 @@
1
+ FROM ubuntu:latest
2
+
3
+ # Avoid prompts during install
4
+ ENV DEBIAN_FRONTEND=noninteractive
5
+
6
+ RUN apt-get update \
7
+ && apt-get install -y --no-install-recommends python3 \
8
+ python3-pip \
9
+ build-essential \
10
+ git \
11
+ python3-dev \
12
+ llvm \
13
+ pkg-config \
14
+ lsb-release \
15
+ curl \
16
+ crossbuild-essential-arm64 \
17
+ gcc-mingw-w64-x86-64 \
18
+ && rm -rf /var/lib/apt/lists/*
19
+
20
+ RUN python3 -m pip config set global.break-system-packages true
21
+ RUN pip install --no-cache-dir uv maturin ruff ziglang cargo-zigbuild
@@ -0,0 +1,32 @@
1
+ {
2
+ "name": "geomanpy",
3
+ "runArgs": [
4
+ "--platform=linux/amd64"
5
+ ],
6
+ "build": {
7
+ "dockerfile": "Dockerfile",
8
+ "context": ".."
9
+ },
10
+ "customizations": {
11
+ "vscode": {
12
+ "extensions": [
13
+ "ms-python.debugpy",
14
+ "ms-python.python",
15
+ "ms-python.black-formatter",
16
+ "mhutchie.git-graph",
17
+ "fill-labs.dependi",
18
+ "tamasfe.even-better-toml",
19
+ "rust-lang.rust-analyzer"
20
+ ]
21
+ }
22
+ },
23
+ "postStartCommand": "sudo usermod -aG sudo vscode",
24
+ "postCreateCommand": "sudo chown -R vscode:vscode /workspaces/geomanpy",
25
+ "features": {
26
+ "ghcr.io/devcontainers/features/common-utils:2": {
27
+ "username": "vscode"
28
+ },
29
+ "ghcr.io/devcontainers/features/github-cli:1": {},
30
+ "ghcr.io/devcontainers/features/rust:1.5.0": {}
31
+ }
32
+ }
@@ -0,0 +1,61 @@
1
+ name: Check
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+
8
+ jobs:
9
+ check:
10
+ strategy:
11
+ fail-fast: false
12
+ matrix:
13
+ target:
14
+ - x86_64-unknown-linux-gnu
15
+ - aarch64-unknown-linux-gnu
16
+ - aarch64-apple-darwin
17
+ - x86_64-pc-windows-msvc
18
+
19
+ runs-on: ubuntu-latest
20
+ name: ${{ matrix.target }}
21
+
22
+ steps:
23
+ - uses: actions/checkout@v4
24
+
25
+ - uses: dtolnay/rust-toolchain@stable
26
+ with:
27
+ targets: ${{ matrix.target }}
28
+ components: clippy
29
+
30
+ - uses: actions/setup-python@v5
31
+ with:
32
+ python-version: "3.10"
33
+
34
+ - name: Install llvm-dlltool
35
+ if: contains(matrix.target, 'windows')
36
+ run: sudo apt-get update && sudo apt-get install -y llvm
37
+
38
+ - uses: Swatinem/rust-cache@v2
39
+ with:
40
+ key: ${{ matrix.target }}
41
+
42
+ - name: Cargo check
43
+ run: cargo check --target ${{ matrix.target }}
44
+
45
+ - name: Clippy
46
+ run: cargo clippy --target ${{ matrix.target }} -- -D warnings
47
+
48
+ # The RustPython backend embeds an interpreter (psm/stacker need a C
49
+ # toolchain) and ships no cross-platform wheels, so it's only built on
50
+ # the native host rather than across every wheel target.
51
+ - name: Cargo check RustPython backend
52
+ if: matrix.target == 'x86_64-unknown-linux-gnu'
53
+ run: cargo check --target ${{ matrix.target }} --no-default-features --features rustpython-backend,not_build_only
54
+
55
+ - name: Clippy RustPython backend
56
+ if: matrix.target == 'x86_64-unknown-linux-gnu'
57
+ run: cargo clippy --target ${{ matrix.target }} --no-default-features --features rustpython-backend,not_build_only -- -D warnings
58
+
59
+ - name: Tests
60
+ if: matrix.target == 'x86_64-unknown-linux-gnu'
61
+ run: cargo test --target ${{ matrix.target }}
@@ -0,0 +1,32 @@
1
+ name: Format
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+
8
+ jobs:
9
+ rust:
10
+ runs-on: ubuntu-latest
11
+ name: cargo fmt
12
+
13
+ steps:
14
+ - uses: actions/checkout@v4
15
+
16
+ - uses: dtolnay/rust-toolchain@stable
17
+ with:
18
+ components: rustfmt
19
+
20
+ - run: cargo fmt --check
21
+
22
+ python:
23
+ runs-on: ubuntu-latest
24
+ name: ruff
25
+
26
+ steps:
27
+ - uses: actions/checkout@v4
28
+
29
+ - uses: astral-sh/setup-uv@v5
30
+
31
+ - run: uv tool run ruff check --ignore F403,F405 .
32
+ - run: uv tool run ruff format --check
@@ -0,0 +1,165 @@
1
+ name: Publish
2
+
3
+ # The build jobs run on every PR and push to main as a dry run of the real
4
+ # release pipeline — same targets, same interpreters — so a publish-time
5
+ # breakage (unsupported interpreter, packaging error, bad metadata) surfaces
6
+ # in CI before a tag is cut. Only the upload jobs are gated on v* tags.
7
+ on:
8
+ push:
9
+ branches: [main]
10
+ tags:
11
+ - "v*"
12
+ pull_request:
13
+
14
+ permissions:
15
+ contents: read
16
+
17
+ jobs:
18
+ build-wheels:
19
+ strategy:
20
+ fail-fast: false
21
+ matrix:
22
+ include:
23
+ - os: ubuntu-latest
24
+ target: x86_64-unknown-linux-gnu
25
+ - os: ubuntu-latest
26
+ target: aarch64-unknown-linux-gnu
27
+ - os: macos-latest
28
+ target: aarch64-apple-darwin
29
+ - os: windows-latest
30
+ target: x86_64-pc-windows-msvc
31
+
32
+ runs-on: ${{ matrix.os }}
33
+ name: Build wheel (${{ matrix.target }})
34
+
35
+ steps:
36
+ - uses: actions/checkout@v4
37
+
38
+ - uses: PyO3/maturin-action@v1
39
+ with:
40
+ target: ${{ matrix.target }}
41
+ args: --release --out dist
42
+ manylinux: auto
43
+
44
+ - uses: actions/upload-artifact@v4
45
+ with:
46
+ name: wheel-${{ matrix.target }}
47
+ path: dist/*.whl
48
+
49
+ build-freethreaded:
50
+ strategy:
51
+ fail-fast: false
52
+ matrix:
53
+ include:
54
+ - os: ubuntu-latest
55
+ target: x86_64-unknown-linux-gnu
56
+ - os: ubuntu-latest
57
+ target: aarch64-unknown-linux-gnu
58
+ - os: macos-latest
59
+ target: aarch64-apple-darwin
60
+ - os: windows-latest
61
+ target: x86_64-pc-windows-msvc
62
+
63
+ runs-on: ${{ matrix.os }}
64
+ name: Build free-threaded wheel (${{ matrix.target }})
65
+
66
+ steps:
67
+ - uses: actions/checkout@v4
68
+
69
+ - uses: actions/setup-python@v5
70
+ if: matrix.os != 'ubuntu-latest'
71
+ with:
72
+ python-version: 3.14t
73
+
74
+ - uses: PyO3/maturin-action@v1
75
+ with:
76
+ target: ${{ matrix.target }}
77
+ args: --release --out dist --interpreter python3.14t
78
+ manylinux: auto
79
+
80
+ - uses: actions/upload-artifact@v4
81
+ with:
82
+ name: wheel-freethreaded-${{ matrix.target }}
83
+ path: dist/*.whl
84
+
85
+ sdist:
86
+ runs-on: ubuntu-latest
87
+ name: Build sdist
88
+
89
+ steps:
90
+ - uses: actions/checkout@v4
91
+
92
+ - uses: PyO3/maturin-action@v1
93
+ with:
94
+ command: sdist
95
+ args: --out dist
96
+
97
+ - uses: actions/upload-artifact@v4
98
+ with:
99
+ name: sdist
100
+ path: dist/*.tar.gz
101
+
102
+ check-dist:
103
+ runs-on: ubuntu-latest
104
+ name: twine check
105
+ needs: [build-wheels, build-freethreaded, sdist]
106
+
107
+ steps:
108
+ - uses: actions/download-artifact@v4
109
+ with:
110
+ path: dist
111
+ merge-multiple: true
112
+
113
+ - uses: astral-sh/setup-uv@v5
114
+
115
+ - run: uv tool run twine check --strict dist/*
116
+
117
+ crates-dry-run:
118
+ runs-on: ubuntu-latest
119
+ name: cargo publish --dry-run
120
+ if: ${{ !startsWith(github.ref, 'refs/tags/') }}
121
+
122
+ steps:
123
+ - uses: actions/checkout@v4
124
+
125
+ - uses: dtolnay/rust-toolchain@stable
126
+
127
+ - uses: Swatinem/rust-cache@v2
128
+ with:
129
+ key: publish-dry-run
130
+
131
+ - run: cargo publish --dry-run
132
+
133
+ publish-pypi:
134
+ runs-on: ubuntu-latest
135
+ name: Publish to PyPI
136
+ if: startsWith(github.ref, 'refs/tags/v')
137
+ needs: [check-dist]
138
+
139
+ steps:
140
+ - uses: actions/download-artifact@v4
141
+ with:
142
+ path: dist
143
+ merge-multiple: true
144
+
145
+ - uses: astral-sh/setup-uv@v5
146
+
147
+ - name: Publish to PyPI
148
+ run: uv publish dist/*
149
+ env:
150
+ UV_PUBLISH_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
151
+
152
+ publish-crates:
153
+ runs-on: ubuntu-latest
154
+ name: Publish to crates.io
155
+ if: startsWith(github.ref, 'refs/tags/v')
156
+
157
+ steps:
158
+ - uses: actions/checkout@v4
159
+
160
+ - uses: dtolnay/rust-toolchain@stable
161
+
162
+ - name: Publish to crates.io
163
+ run: cargo publish
164
+ env:
165
+ CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
@@ -0,0 +1,4 @@
1
+ Cargo.lock
2
+ target/
3
+ __pycache__/
4
+ *.so
@@ -0,0 +1,5 @@
1
+ {
2
+ "rust-analyzer.cargo.features": [],
3
+ "rust-analyzer.check.command": "clippy",
4
+ "rust-analyzer.cfg.setTest": true,
5
+ }