e57 0.1.0a1__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.
@@ -0,0 +1,120 @@
1
+ # This file is autogenerated by maturin v1.0.1
2
+ # To update, run
3
+ #
4
+ # maturin generate-ci github
5
+ #
6
+ name: CI
7
+
8
+ on:
9
+ push:
10
+ branches:
11
+ - main
12
+ - master
13
+ tags:
14
+ - '*'
15
+ pull_request:
16
+ workflow_dispatch:
17
+
18
+ permissions:
19
+ contents: read
20
+
21
+ jobs:
22
+ linux:
23
+ runs-on: ubuntu-latest
24
+ strategy:
25
+ matrix:
26
+ target: [x86_64, x86, aarch64, armv7, s390x, ppc64le]
27
+ steps:
28
+ - uses: actions/checkout@v3
29
+ - uses: actions/setup-python@v4
30
+ with:
31
+ python-version: '3.10'
32
+ - name: Build wheels
33
+ uses: PyO3/maturin-action@v1
34
+ with:
35
+ target: ${{ matrix.target }}
36
+ args: --release --out dist --find-interpreter
37
+ sccache: 'true'
38
+ manylinux: auto
39
+ - name: Upload wheels
40
+ uses: actions/upload-artifact@v3
41
+ with:
42
+ name: wheels
43
+ path: dist
44
+
45
+ windows:
46
+ runs-on: windows-latest
47
+ strategy:
48
+ matrix:
49
+ target: [x64, x86]
50
+ steps:
51
+ - uses: actions/checkout@v3
52
+ - uses: actions/setup-python@v4
53
+ with:
54
+ python-version: '3.10'
55
+ architecture: ${{ matrix.target }}
56
+ - name: Build wheels
57
+ uses: PyO3/maturin-action@v1
58
+ with:
59
+ target: ${{ matrix.target }}
60
+ args: --release --out dist --find-interpreter
61
+ sccache: 'true'
62
+ - name: Upload wheels
63
+ uses: actions/upload-artifact@v3
64
+ with:
65
+ name: wheels
66
+ path: dist
67
+
68
+ macos:
69
+ runs-on: macos-latest
70
+ strategy:
71
+ matrix:
72
+ target: [x86_64, aarch64]
73
+ steps:
74
+ - uses: actions/checkout@v3
75
+ - uses: actions/setup-python@v4
76
+ with:
77
+ python-version: '3.10'
78
+ - name: Build wheels
79
+ uses: PyO3/maturin-action@v1
80
+ with:
81
+ target: ${{ matrix.target }}
82
+ args: --release --out dist --find-interpreter
83
+ sccache: 'true'
84
+ - name: Upload wheels
85
+ uses: actions/upload-artifact@v3
86
+ with:
87
+ name: wheels
88
+ path: dist
89
+
90
+ sdist:
91
+ runs-on: ubuntu-latest
92
+ steps:
93
+ - uses: actions/checkout@v3
94
+ - name: Build sdist
95
+ uses: PyO3/maturin-action@v1
96
+ with:
97
+ command: sdist
98
+ args: --out dist
99
+ - name: Upload sdist
100
+ uses: actions/upload-artifact@v3
101
+ with:
102
+ name: wheels
103
+ path: dist
104
+
105
+ release:
106
+ name: Release
107
+ runs-on: ubuntu-latest
108
+ if: "startsWith(github.ref, 'refs/tags/')"
109
+ needs: [linux, windows, macos, sdist]
110
+ steps:
111
+ - uses: actions/download-artifact@v3
112
+ with:
113
+ name: wheels
114
+ - name: Publish to PyPI
115
+ uses: PyO3/maturin-action@v1
116
+ env:
117
+ MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
118
+ with:
119
+ command: upload
120
+ args: --skip-existing *
e57-0.1.0a1/.gitignore ADDED
@@ -0,0 +1,72 @@
1
+ /target
2
+
3
+ # Byte-compiled / optimized / DLL files
4
+ __pycache__/
5
+ .pytest_cache/
6
+ *.py[cod]
7
+
8
+ # C extensions
9
+ *.so
10
+
11
+ # Distribution / packaging
12
+ .Python
13
+ .venv/
14
+ env/
15
+ bin/
16
+ build/
17
+ develop-eggs/
18
+ dist/
19
+ eggs/
20
+ lib/
21
+ lib64/
22
+ parts/
23
+ sdist/
24
+ var/
25
+ include/
26
+ man/
27
+ venv/
28
+ *.egg-info/
29
+ .installed.cfg
30
+ *.egg
31
+
32
+ # Installer logs
33
+ pip-log.txt
34
+ pip-delete-this-directory.txt
35
+ pip-selfcheck.json
36
+
37
+ # Unit test / coverage reports
38
+ htmlcov/
39
+ .tox/
40
+ .coverage
41
+ .cache
42
+ nosetests.xml
43
+ coverage.xml
44
+
45
+ # Translations
46
+ *.mo
47
+
48
+ # Mr Developer
49
+ .mr.developer.cfg
50
+ .project
51
+ .pydevproject
52
+
53
+ # Rope
54
+ .ropeproject
55
+
56
+ # Django stuff:
57
+ *.log
58
+ *.pot
59
+
60
+ .DS_Store
61
+
62
+ # Sphinx documentation
63
+ docs/_build/
64
+
65
+ # PyCharm
66
+ .idea/
67
+
68
+ # VSCode
69
+ .vscode/
70
+
71
+ # Pyenv
72
+ .python-version
e57-0.1.0a1/Cargo.lock ADDED
@@ -0,0 +1,331 @@
1
+ # This file is automatically @generated by Cargo.
2
+ # It is not intended for manual editing.
3
+ version = 3
4
+
5
+ [[package]]
6
+ name = "anyhow"
7
+ version = "1.0.71"
8
+ source = "registry+https://github.com/rust-lang/crates.io-index"
9
+ checksum = "9c7d0618f0e0b7e8ff11427422b64564d5fb0be1940354bfe2e0529b18a9d9b8"
10
+
11
+ [[package]]
12
+ name = "autocfg"
13
+ version = "1.1.0"
14
+ source = "registry+https://github.com/rust-lang/crates.io-index"
15
+ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa"
16
+
17
+ [[package]]
18
+ name = "bitflags"
19
+ version = "1.3.2"
20
+ source = "registry+https://github.com/rust-lang/crates.io-index"
21
+ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
22
+
23
+ [[package]]
24
+ name = "cfg-if"
25
+ version = "1.0.0"
26
+ source = "registry+https://github.com/rust-lang/crates.io-index"
27
+ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
28
+
29
+ [[package]]
30
+ name = "e57"
31
+ version = "0.5.0"
32
+ source = "registry+https://github.com/rust-lang/crates.io-index"
33
+ checksum = "7667dbb67888f1371663e81649d90c3606fad3a5204afca10b9c821397e813a5"
34
+ dependencies = [
35
+ "roxmltree",
36
+ ]
37
+
38
+ [[package]]
39
+ name = "e57-python"
40
+ version = "0.1.0-a1"
41
+ dependencies = [
42
+ "anyhow",
43
+ "e57",
44
+ "eyre",
45
+ "pyo3",
46
+ ]
47
+
48
+ [[package]]
49
+ name = "eyre"
50
+ version = "0.6.8"
51
+ source = "registry+https://github.com/rust-lang/crates.io-index"
52
+ checksum = "4c2b6b5a29c02cdc822728b7d7b8ae1bab3e3b05d44522770ddd49722eeac7eb"
53
+ dependencies = [
54
+ "indenter",
55
+ "once_cell",
56
+ ]
57
+
58
+ [[package]]
59
+ name = "indenter"
60
+ version = "0.3.3"
61
+ source = "registry+https://github.com/rust-lang/crates.io-index"
62
+ checksum = "ce23b50ad8242c51a442f3ff322d56b02f08852c77e4c0b4d3fd684abc89c683"
63
+
64
+ [[package]]
65
+ name = "indoc"
66
+ version = "1.0.9"
67
+ source = "registry+https://github.com/rust-lang/crates.io-index"
68
+ checksum = "bfa799dd5ed20a7e349f3b4639aa80d74549c81716d9ec4f994c9b5815598306"
69
+
70
+ [[package]]
71
+ name = "libc"
72
+ version = "0.2.144"
73
+ source = "registry+https://github.com/rust-lang/crates.io-index"
74
+ checksum = "2b00cc1c228a6782d0f076e7b232802e0c5689d41bb5df366f2a6b6621cfdfe1"
75
+
76
+ [[package]]
77
+ name = "lock_api"
78
+ version = "0.4.9"
79
+ source = "registry+https://github.com/rust-lang/crates.io-index"
80
+ checksum = "435011366fe56583b16cf956f9df0095b405b82d76425bc8981c0e22e60ec4df"
81
+ dependencies = [
82
+ "autocfg",
83
+ "scopeguard",
84
+ ]
85
+
86
+ [[package]]
87
+ name = "memoffset"
88
+ version = "0.8.0"
89
+ source = "registry+https://github.com/rust-lang/crates.io-index"
90
+ checksum = "d61c719bcfbcf5d62b3a09efa6088de8c54bc0bfcd3ea7ae39fcc186108b8de1"
91
+ dependencies = [
92
+ "autocfg",
93
+ ]
94
+
95
+ [[package]]
96
+ name = "once_cell"
97
+ version = "1.17.2"
98
+ source = "registry+https://github.com/rust-lang/crates.io-index"
99
+ checksum = "9670a07f94779e00908f3e686eab508878ebb390ba6e604d3a284c00e8d0487b"
100
+
101
+ [[package]]
102
+ name = "parking_lot"
103
+ version = "0.12.1"
104
+ source = "registry+https://github.com/rust-lang/crates.io-index"
105
+ checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f"
106
+ dependencies = [
107
+ "lock_api",
108
+ "parking_lot_core",
109
+ ]
110
+
111
+ [[package]]
112
+ name = "parking_lot_core"
113
+ version = "0.9.7"
114
+ source = "registry+https://github.com/rust-lang/crates.io-index"
115
+ checksum = "9069cbb9f99e3a5083476ccb29ceb1de18b9118cafa53e90c9551235de2b9521"
116
+ dependencies = [
117
+ "cfg-if",
118
+ "libc",
119
+ "redox_syscall",
120
+ "smallvec",
121
+ "windows-sys",
122
+ ]
123
+
124
+ [[package]]
125
+ name = "proc-macro2"
126
+ version = "1.0.59"
127
+ source = "registry+https://github.com/rust-lang/crates.io-index"
128
+ checksum = "6aeca18b86b413c660b781aa319e4e2648a3e6f9eadc9b47e9038e6fe9f3451b"
129
+ dependencies = [
130
+ "unicode-ident",
131
+ ]
132
+
133
+ [[package]]
134
+ name = "pyo3"
135
+ version = "0.18.3"
136
+ source = "registry+https://github.com/rust-lang/crates.io-index"
137
+ checksum = "e3b1ac5b3731ba34fdaa9785f8d74d17448cd18f30cf19e0c7e7b1fdb5272109"
138
+ dependencies = [
139
+ "cfg-if",
140
+ "indoc",
141
+ "libc",
142
+ "memoffset",
143
+ "parking_lot",
144
+ "pyo3-build-config",
145
+ "pyo3-ffi",
146
+ "pyo3-macros",
147
+ "unindent",
148
+ ]
149
+
150
+ [[package]]
151
+ name = "pyo3-build-config"
152
+ version = "0.18.3"
153
+ source = "registry+https://github.com/rust-lang/crates.io-index"
154
+ checksum = "9cb946f5ac61bb61a5014924910d936ebd2b23b705f7a4a3c40b05c720b079a3"
155
+ dependencies = [
156
+ "once_cell",
157
+ "target-lexicon",
158
+ ]
159
+
160
+ [[package]]
161
+ name = "pyo3-ffi"
162
+ version = "0.18.3"
163
+ source = "registry+https://github.com/rust-lang/crates.io-index"
164
+ checksum = "fd4d7c5337821916ea2a1d21d1092e8443cf34879e53a0ac653fbb98f44ff65c"
165
+ dependencies = [
166
+ "libc",
167
+ "pyo3-build-config",
168
+ ]
169
+
170
+ [[package]]
171
+ name = "pyo3-macros"
172
+ version = "0.18.3"
173
+ source = "registry+https://github.com/rust-lang/crates.io-index"
174
+ checksum = "a9d39c55dab3fc5a4b25bbd1ac10a2da452c4aca13bb450f22818a002e29648d"
175
+ dependencies = [
176
+ "proc-macro2",
177
+ "pyo3-macros-backend",
178
+ "quote",
179
+ "syn",
180
+ ]
181
+
182
+ [[package]]
183
+ name = "pyo3-macros-backend"
184
+ version = "0.18.3"
185
+ source = "registry+https://github.com/rust-lang/crates.io-index"
186
+ checksum = "97daff08a4c48320587b5224cc98d609e3c27b6d437315bd40b605c98eeb5918"
187
+ dependencies = [
188
+ "proc-macro2",
189
+ "quote",
190
+ "syn",
191
+ ]
192
+
193
+ [[package]]
194
+ name = "quote"
195
+ version = "1.0.28"
196
+ source = "registry+https://github.com/rust-lang/crates.io-index"
197
+ checksum = "1b9ab9c7eadfd8df19006f1cf1a4aed13540ed5cbc047010ece5826e10825488"
198
+ dependencies = [
199
+ "proc-macro2",
200
+ ]
201
+
202
+ [[package]]
203
+ name = "redox_syscall"
204
+ version = "0.2.16"
205
+ source = "registry+https://github.com/rust-lang/crates.io-index"
206
+ checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a"
207
+ dependencies = [
208
+ "bitflags",
209
+ ]
210
+
211
+ [[package]]
212
+ name = "roxmltree"
213
+ version = "0.18.0"
214
+ source = "registry+https://github.com/rust-lang/crates.io-index"
215
+ checksum = "d8f595a457b6b8c6cda66a48503e92ee8d19342f905948f29c383200ec9eb1d8"
216
+ dependencies = [
217
+ "xmlparser",
218
+ ]
219
+
220
+ [[package]]
221
+ name = "scopeguard"
222
+ version = "1.1.0"
223
+ source = "registry+https://github.com/rust-lang/crates.io-index"
224
+ checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd"
225
+
226
+ [[package]]
227
+ name = "smallvec"
228
+ version = "1.10.0"
229
+ source = "registry+https://github.com/rust-lang/crates.io-index"
230
+ checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0"
231
+
232
+ [[package]]
233
+ name = "syn"
234
+ version = "1.0.109"
235
+ source = "registry+https://github.com/rust-lang/crates.io-index"
236
+ checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237"
237
+ dependencies = [
238
+ "proc-macro2",
239
+ "quote",
240
+ "unicode-ident",
241
+ ]
242
+
243
+ [[package]]
244
+ name = "target-lexicon"
245
+ version = "0.12.7"
246
+ source = "registry+https://github.com/rust-lang/crates.io-index"
247
+ checksum = "fd1ba337640d60c3e96bc6f0638a939b9c9a7f2c316a1598c279828b3d1dc8c5"
248
+
249
+ [[package]]
250
+ name = "unicode-ident"
251
+ version = "1.0.9"
252
+ source = "registry+https://github.com/rust-lang/crates.io-index"
253
+ checksum = "b15811caf2415fb889178633e7724bad2509101cde276048e013b9def5e51fa0"
254
+
255
+ [[package]]
256
+ name = "unindent"
257
+ version = "0.1.11"
258
+ source = "registry+https://github.com/rust-lang/crates.io-index"
259
+ checksum = "e1766d682d402817b5ac4490b3c3002d91dfa0d22812f341609f97b08757359c"
260
+
261
+ [[package]]
262
+ name = "windows-sys"
263
+ version = "0.45.0"
264
+ source = "registry+https://github.com/rust-lang/crates.io-index"
265
+ checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0"
266
+ dependencies = [
267
+ "windows-targets",
268
+ ]
269
+
270
+ [[package]]
271
+ name = "windows-targets"
272
+ version = "0.42.2"
273
+ source = "registry+https://github.com/rust-lang/crates.io-index"
274
+ checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071"
275
+ dependencies = [
276
+ "windows_aarch64_gnullvm",
277
+ "windows_aarch64_msvc",
278
+ "windows_i686_gnu",
279
+ "windows_i686_msvc",
280
+ "windows_x86_64_gnu",
281
+ "windows_x86_64_gnullvm",
282
+ "windows_x86_64_msvc",
283
+ ]
284
+
285
+ [[package]]
286
+ name = "windows_aarch64_gnullvm"
287
+ version = "0.42.2"
288
+ source = "registry+https://github.com/rust-lang/crates.io-index"
289
+ checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8"
290
+
291
+ [[package]]
292
+ name = "windows_aarch64_msvc"
293
+ version = "0.42.2"
294
+ source = "registry+https://github.com/rust-lang/crates.io-index"
295
+ checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43"
296
+
297
+ [[package]]
298
+ name = "windows_i686_gnu"
299
+ version = "0.42.2"
300
+ source = "registry+https://github.com/rust-lang/crates.io-index"
301
+ checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f"
302
+
303
+ [[package]]
304
+ name = "windows_i686_msvc"
305
+ version = "0.42.2"
306
+ source = "registry+https://github.com/rust-lang/crates.io-index"
307
+ checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060"
308
+
309
+ [[package]]
310
+ name = "windows_x86_64_gnu"
311
+ version = "0.42.2"
312
+ source = "registry+https://github.com/rust-lang/crates.io-index"
313
+ checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36"
314
+
315
+ [[package]]
316
+ name = "windows_x86_64_gnullvm"
317
+ version = "0.42.2"
318
+ source = "registry+https://github.com/rust-lang/crates.io-index"
319
+ checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3"
320
+
321
+ [[package]]
322
+ name = "windows_x86_64_msvc"
323
+ version = "0.42.2"
324
+ source = "registry+https://github.com/rust-lang/crates.io-index"
325
+ checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0"
326
+
327
+ [[package]]
328
+ name = "xmlparser"
329
+ version = "0.13.5"
330
+ source = "registry+https://github.com/rust-lang/crates.io-index"
331
+ checksum = "4d25c75bf9ea12c4040a97f829154768bbbce366287e2dc044af160cd79a13fd"
e57-0.1.0a1/Cargo.toml ADDED
@@ -0,0 +1,15 @@
1
+ [package]
2
+ name = "e57-python"
3
+ version = "0.1.0-a1"
4
+ edition = "2021"
5
+
6
+ # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
7
+ [lib]
8
+ name = "e57"
9
+ crate-type = ["cdylib"]
10
+
11
+ [dependencies]
12
+ pyo3 = "0.18.3"
13
+ e57 = "0.5.0"
14
+ anyhow = "1"
15
+ eyre = "0.6.8"
e57-0.1.0a1/PKG-INFO ADDED
@@ -0,0 +1,20 @@
1
+ Metadata-Version: 2.1
2
+ Name: e57
3
+ Version: 0.1.0a1
4
+ Classifier: Programming Language :: Rust
5
+ Classifier: Programming Language :: Python :: Implementation :: CPython
6
+ Classifier: Programming Language :: Python :: Implementation :: PyPy
7
+ Classifier: Development Status :: 3 - Alpha
8
+ Classifier: License :: OSI Approved :: MIT License
9
+ Classifier: Topic :: File Formats
10
+ Summary: E57 is a compact, non-proprietary point cloud format that's defined by the ASTM E2807 standard. This format is widely adopted by 3D design applications.
11
+ Keywords: pointcloud
12
+ Author-email: Graham Knapp <graham.knapp@gmail.com>
13
+ Requires-Python: >=3.7
14
+ Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
15
+
16
+ # e57-python
17
+ e57 file reading
18
+
19
+ Wraps
20
+
e57-0.1.0a1/README.md ADDED
@@ -0,0 +1,4 @@
1
+ # e57-python
2
+ e57 file reading
3
+
4
+ Wraps
@@ -0,0 +1,24 @@
1
+ [build-system]
2
+ requires = ["maturin>=1.0,<2.0"]
3
+ build-backend = "maturin"
4
+
5
+ [project]
6
+ name = "e57"
7
+ description = "E57 is a compact, non-proprietary point cloud format that's defined by the ASTM E2807 standard. This format is widely adopted by 3D design applications."
8
+ authors = [
9
+ { name = "Graham Knapp", email = "graham.knapp@gmail.com" }
10
+ ]
11
+ requires-python = ">=3.7"
12
+ keywords = ["pointcloud"]
13
+ classifiers = [
14
+ "Programming Language :: Rust",
15
+ "Programming Language :: Python :: Implementation :: CPython",
16
+ "Programming Language :: Python :: Implementation :: PyPy",
17
+ "Development Status :: 3 - Alpha",
18
+ "License :: OSI Approved :: MIT License",
19
+ "Topic :: File Formats",
20
+ ]
21
+
22
+
23
+ [tool.maturin]
24
+ features = ["pyo3/extension-module"]
e57-0.1.0a1/src/lib.rs ADDED
@@ -0,0 +1,25 @@
1
+ use ::e57::E57Reader;
2
+ use pyo3::prelude::*;
3
+ use std::fs::File;
4
+ use std::io::BufReader;
5
+
6
+ /// Extracts the xml contents from an e57 file.
7
+ #[pyfunction]
8
+ fn raw_xml(filepath: &str) -> PyResult<String> {
9
+ let file = File::open(filepath)?;
10
+ let reader = BufReader::new(file);
11
+ let xml = E57Reader::raw_xml(reader);
12
+ let xml = match &xml {
13
+ Ok(_) => xml,
14
+ Err(e) => return Err(PyErr::new::<pyo3::exceptions::PyRuntimeError, _>(e.to_string())),
15
+ };
16
+ let xml_string = String::from_utf8(xml.unwrap())?;
17
+ Ok(xml_string)
18
+ }
19
+
20
+ /// e57 pointcloud file reading.
21
+ #[pymodule]
22
+ fn e57(_py: Python, m: &PyModule) -> PyResult<()> {
23
+ m.add_function(wrap_pyfunction!(raw_xml, m)?)?;
24
+ Ok(())
25
+ }