superwings 0.1.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.
- superwings-0.1.0/.github/workflows/release.yml +82 -0
- superwings-0.1.0/.gitignore +5 -0
- superwings-0.1.0/Cargo.lock +310 -0
- superwings-0.1.0/Cargo.toml +15 -0
- superwings-0.1.0/LICENSE +21 -0
- superwings-0.1.0/PKG-INFO +10 -0
- superwings-0.1.0/README.md +32 -0
- superwings-0.1.0/pyproject.toml +20 -0
- superwings-0.1.0/python/superwings/__init__.py +13 -0
- superwings-0.1.0/src/lib.rs +28 -0
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
name: Build and publish wheels
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags: ["v*"]
|
|
6
|
+
workflow_dispatch:
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
contents: read
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
build-linux:
|
|
13
|
+
strategy:
|
|
14
|
+
matrix:
|
|
15
|
+
target: [x86_64, aarch64]
|
|
16
|
+
runs-on: ubuntu-latest
|
|
17
|
+
steps:
|
|
18
|
+
- uses: actions/checkout@v4
|
|
19
|
+
- uses: actions/setup-python@v5
|
|
20
|
+
with:
|
|
21
|
+
python-version: "3.12"
|
|
22
|
+
- name: Build wheels
|
|
23
|
+
uses: PyO3/maturin-action@v1
|
|
24
|
+
with:
|
|
25
|
+
target: ${{ matrix.target }}
|
|
26
|
+
args: --release --out dist -i python3.9 -i python3.10 -i python3.11 -i python3.12 -i python3.13
|
|
27
|
+
manylinux: auto
|
|
28
|
+
- uses: actions/upload-artifact@v4
|
|
29
|
+
with:
|
|
30
|
+
name: wheels-linux-${{ matrix.target }}
|
|
31
|
+
path: dist
|
|
32
|
+
|
|
33
|
+
build-macos:
|
|
34
|
+
strategy:
|
|
35
|
+
matrix:
|
|
36
|
+
target: [x86_64, aarch64]
|
|
37
|
+
runs-on: macos-latest
|
|
38
|
+
steps:
|
|
39
|
+
- uses: actions/checkout@v4
|
|
40
|
+
- uses: actions/setup-python@v5
|
|
41
|
+
with:
|
|
42
|
+
python-version: "3.12"
|
|
43
|
+
- name: Build wheels
|
|
44
|
+
uses: PyO3/maturin-action@v1
|
|
45
|
+
with:
|
|
46
|
+
target: ${{ matrix.target }}
|
|
47
|
+
args: --release --out dist
|
|
48
|
+
- uses: actions/upload-artifact@v4
|
|
49
|
+
with:
|
|
50
|
+
name: wheels-macos-${{ matrix.target }}
|
|
51
|
+
path: dist
|
|
52
|
+
|
|
53
|
+
sdist:
|
|
54
|
+
runs-on: ubuntu-latest
|
|
55
|
+
steps:
|
|
56
|
+
- uses: actions/checkout@v4
|
|
57
|
+
- name: Build sdist
|
|
58
|
+
uses: PyO3/maturin-action@v1
|
|
59
|
+
with:
|
|
60
|
+
command: sdist
|
|
61
|
+
args: --out dist
|
|
62
|
+
- uses: actions/upload-artifact@v4
|
|
63
|
+
with:
|
|
64
|
+
name: wheels-sdist
|
|
65
|
+
path: dist
|
|
66
|
+
|
|
67
|
+
publish:
|
|
68
|
+
needs: [build-linux, build-macos, sdist]
|
|
69
|
+
runs-on: ubuntu-latest
|
|
70
|
+
steps:
|
|
71
|
+
- uses: actions/download-artifact@v4
|
|
72
|
+
with:
|
|
73
|
+
pattern: wheels-*
|
|
74
|
+
merge-multiple: true
|
|
75
|
+
path: dist
|
|
76
|
+
- name: Publish to PyPI
|
|
77
|
+
uses: PyO3/maturin-action@v1
|
|
78
|
+
env:
|
|
79
|
+
MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
|
|
80
|
+
with:
|
|
81
|
+
command: upload
|
|
82
|
+
args: --non-interactive dist/*
|
|
@@ -0,0 +1,310 @@
|
|
|
1
|
+
# This file is automatically @generated by Cargo.
|
|
2
|
+
# It is not intended for manual editing.
|
|
3
|
+
version = 4
|
|
4
|
+
|
|
5
|
+
[[package]]
|
|
6
|
+
name = "airport_finder"
|
|
7
|
+
version = "0.1.0"
|
|
8
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
9
|
+
checksum = "9cc2e57ece391d812c48543d82376991df380f8841760475091a200857c8cd83"
|
|
10
|
+
dependencies = [
|
|
11
|
+
"rstar",
|
|
12
|
+
"serde",
|
|
13
|
+
"serde_json",
|
|
14
|
+
]
|
|
15
|
+
|
|
16
|
+
[[package]]
|
|
17
|
+
name = "autocfg"
|
|
18
|
+
version = "1.5.0"
|
|
19
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
20
|
+
checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8"
|
|
21
|
+
|
|
22
|
+
[[package]]
|
|
23
|
+
name = "byteorder"
|
|
24
|
+
version = "1.5.0"
|
|
25
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
26
|
+
checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b"
|
|
27
|
+
|
|
28
|
+
[[package]]
|
|
29
|
+
name = "hash32"
|
|
30
|
+
version = "0.3.1"
|
|
31
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
32
|
+
checksum = "47d60b12902ba28e2730cd37e95b8c9223af2808df9e902d4df49588d1470606"
|
|
33
|
+
dependencies = [
|
|
34
|
+
"byteorder",
|
|
35
|
+
]
|
|
36
|
+
|
|
37
|
+
[[package]]
|
|
38
|
+
name = "heapless"
|
|
39
|
+
version = "0.8.0"
|
|
40
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
41
|
+
checksum = "0bfb9eb618601c89945a70e254898da93b13be0388091d42117462b265bb3fad"
|
|
42
|
+
dependencies = [
|
|
43
|
+
"hash32",
|
|
44
|
+
"stable_deref_trait",
|
|
45
|
+
]
|
|
46
|
+
|
|
47
|
+
[[package]]
|
|
48
|
+
name = "heck"
|
|
49
|
+
version = "0.5.0"
|
|
50
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
51
|
+
checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
|
|
52
|
+
|
|
53
|
+
[[package]]
|
|
54
|
+
name = "indoc"
|
|
55
|
+
version = "2.0.7"
|
|
56
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
57
|
+
checksum = "79cf5c93f93228cf8efb3ba362535fb11199ac548a09ce117c9b1adc3030d706"
|
|
58
|
+
dependencies = [
|
|
59
|
+
"rustversion",
|
|
60
|
+
]
|
|
61
|
+
|
|
62
|
+
[[package]]
|
|
63
|
+
name = "itoa"
|
|
64
|
+
version = "1.0.18"
|
|
65
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
66
|
+
checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682"
|
|
67
|
+
|
|
68
|
+
[[package]]
|
|
69
|
+
name = "libc"
|
|
70
|
+
version = "0.2.184"
|
|
71
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
72
|
+
checksum = "48f5d2a454e16a5ea0f4ced81bd44e4cfc7bd3a507b61887c99fd3538b28e4af"
|
|
73
|
+
|
|
74
|
+
[[package]]
|
|
75
|
+
name = "libm"
|
|
76
|
+
version = "0.2.16"
|
|
77
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
78
|
+
checksum = "b6d2cec3eae94f9f509c767b45932f1ada8350c4bdb85af2fcab4a3c14807981"
|
|
79
|
+
|
|
80
|
+
[[package]]
|
|
81
|
+
name = "memchr"
|
|
82
|
+
version = "2.8.0"
|
|
83
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
84
|
+
checksum = "f8ca58f447f06ed17d5fc4043ce1b10dd205e060fb3ce5b979b8ed8e59ff3f79"
|
|
85
|
+
|
|
86
|
+
[[package]]
|
|
87
|
+
name = "memoffset"
|
|
88
|
+
version = "0.9.1"
|
|
89
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
90
|
+
checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a"
|
|
91
|
+
dependencies = [
|
|
92
|
+
"autocfg",
|
|
93
|
+
]
|
|
94
|
+
|
|
95
|
+
[[package]]
|
|
96
|
+
name = "num-traits"
|
|
97
|
+
version = "0.2.19"
|
|
98
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
99
|
+
checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841"
|
|
100
|
+
dependencies = [
|
|
101
|
+
"autocfg",
|
|
102
|
+
"libm",
|
|
103
|
+
]
|
|
104
|
+
|
|
105
|
+
[[package]]
|
|
106
|
+
name = "once_cell"
|
|
107
|
+
version = "1.21.4"
|
|
108
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
109
|
+
checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50"
|
|
110
|
+
|
|
111
|
+
[[package]]
|
|
112
|
+
name = "portable-atomic"
|
|
113
|
+
version = "1.13.1"
|
|
114
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
115
|
+
checksum = "c33a9471896f1c69cecef8d20cbe2f7accd12527ce60845ff44c153bb2a21b49"
|
|
116
|
+
|
|
117
|
+
[[package]]
|
|
118
|
+
name = "proc-macro2"
|
|
119
|
+
version = "1.0.106"
|
|
120
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
121
|
+
checksum = "8fd00f0bb2e90d81d1044c2b32617f68fcb9fa3bb7640c23e9c748e53fb30934"
|
|
122
|
+
dependencies = [
|
|
123
|
+
"unicode-ident",
|
|
124
|
+
]
|
|
125
|
+
|
|
126
|
+
[[package]]
|
|
127
|
+
name = "pyo3"
|
|
128
|
+
version = "0.25.1"
|
|
129
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
130
|
+
checksum = "8970a78afe0628a3e3430376fc5fd76b6b45c4d43360ffd6cdd40bdde72b682a"
|
|
131
|
+
dependencies = [
|
|
132
|
+
"indoc",
|
|
133
|
+
"libc",
|
|
134
|
+
"memoffset",
|
|
135
|
+
"once_cell",
|
|
136
|
+
"portable-atomic",
|
|
137
|
+
"pyo3-build-config",
|
|
138
|
+
"pyo3-ffi",
|
|
139
|
+
"pyo3-macros",
|
|
140
|
+
"unindent",
|
|
141
|
+
]
|
|
142
|
+
|
|
143
|
+
[[package]]
|
|
144
|
+
name = "pyo3-build-config"
|
|
145
|
+
version = "0.25.1"
|
|
146
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
147
|
+
checksum = "458eb0c55e7ece017adeba38f2248ff3ac615e53660d7c71a238d7d2a01c7598"
|
|
148
|
+
dependencies = [
|
|
149
|
+
"once_cell",
|
|
150
|
+
"target-lexicon",
|
|
151
|
+
]
|
|
152
|
+
|
|
153
|
+
[[package]]
|
|
154
|
+
name = "pyo3-ffi"
|
|
155
|
+
version = "0.25.1"
|
|
156
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
157
|
+
checksum = "7114fe5457c61b276ab77c5055f206295b812608083644a5c5b2640c3102565c"
|
|
158
|
+
dependencies = [
|
|
159
|
+
"libc",
|
|
160
|
+
"pyo3-build-config",
|
|
161
|
+
]
|
|
162
|
+
|
|
163
|
+
[[package]]
|
|
164
|
+
name = "pyo3-macros"
|
|
165
|
+
version = "0.25.1"
|
|
166
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
167
|
+
checksum = "a8725c0a622b374d6cb051d11a0983786448f7785336139c3c94f5aa6bef7e50"
|
|
168
|
+
dependencies = [
|
|
169
|
+
"proc-macro2",
|
|
170
|
+
"pyo3-macros-backend",
|
|
171
|
+
"quote",
|
|
172
|
+
"syn",
|
|
173
|
+
]
|
|
174
|
+
|
|
175
|
+
[[package]]
|
|
176
|
+
name = "pyo3-macros-backend"
|
|
177
|
+
version = "0.25.1"
|
|
178
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
179
|
+
checksum = "4109984c22491085343c05b0dbc54ddc405c3cf7b4374fc533f5c3313a572ccc"
|
|
180
|
+
dependencies = [
|
|
181
|
+
"heck",
|
|
182
|
+
"proc-macro2",
|
|
183
|
+
"pyo3-build-config",
|
|
184
|
+
"quote",
|
|
185
|
+
"syn",
|
|
186
|
+
]
|
|
187
|
+
|
|
188
|
+
[[package]]
|
|
189
|
+
name = "quote"
|
|
190
|
+
version = "1.0.45"
|
|
191
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
192
|
+
checksum = "41f2619966050689382d2b44f664f4bc593e129785a36d6ee376ddf37259b924"
|
|
193
|
+
dependencies = [
|
|
194
|
+
"proc-macro2",
|
|
195
|
+
]
|
|
196
|
+
|
|
197
|
+
[[package]]
|
|
198
|
+
name = "rstar"
|
|
199
|
+
version = "0.12.2"
|
|
200
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
201
|
+
checksum = "421400d13ccfd26dfa5858199c30a5d76f9c54e0dba7575273025b43c5175dbb"
|
|
202
|
+
dependencies = [
|
|
203
|
+
"heapless",
|
|
204
|
+
"num-traits",
|
|
205
|
+
"smallvec",
|
|
206
|
+
]
|
|
207
|
+
|
|
208
|
+
[[package]]
|
|
209
|
+
name = "rustversion"
|
|
210
|
+
version = "1.0.22"
|
|
211
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
212
|
+
checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d"
|
|
213
|
+
|
|
214
|
+
[[package]]
|
|
215
|
+
name = "serde"
|
|
216
|
+
version = "1.0.228"
|
|
217
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
218
|
+
checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e"
|
|
219
|
+
dependencies = [
|
|
220
|
+
"serde_core",
|
|
221
|
+
"serde_derive",
|
|
222
|
+
]
|
|
223
|
+
|
|
224
|
+
[[package]]
|
|
225
|
+
name = "serde_core"
|
|
226
|
+
version = "1.0.228"
|
|
227
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
228
|
+
checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad"
|
|
229
|
+
dependencies = [
|
|
230
|
+
"serde_derive",
|
|
231
|
+
]
|
|
232
|
+
|
|
233
|
+
[[package]]
|
|
234
|
+
name = "serde_derive"
|
|
235
|
+
version = "1.0.228"
|
|
236
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
237
|
+
checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79"
|
|
238
|
+
dependencies = [
|
|
239
|
+
"proc-macro2",
|
|
240
|
+
"quote",
|
|
241
|
+
"syn",
|
|
242
|
+
]
|
|
243
|
+
|
|
244
|
+
[[package]]
|
|
245
|
+
name = "serde_json"
|
|
246
|
+
version = "1.0.149"
|
|
247
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
248
|
+
checksum = "83fc039473c5595ace860d8c4fafa220ff474b3fc6bfdb4293327f1a37e94d86"
|
|
249
|
+
dependencies = [
|
|
250
|
+
"itoa",
|
|
251
|
+
"memchr",
|
|
252
|
+
"serde",
|
|
253
|
+
"serde_core",
|
|
254
|
+
"zmij",
|
|
255
|
+
]
|
|
256
|
+
|
|
257
|
+
[[package]]
|
|
258
|
+
name = "smallvec"
|
|
259
|
+
version = "1.15.1"
|
|
260
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
261
|
+
checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03"
|
|
262
|
+
|
|
263
|
+
[[package]]
|
|
264
|
+
name = "stable_deref_trait"
|
|
265
|
+
version = "1.2.1"
|
|
266
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
267
|
+
checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596"
|
|
268
|
+
|
|
269
|
+
[[package]]
|
|
270
|
+
name = "superwings"
|
|
271
|
+
version = "0.1.0"
|
|
272
|
+
dependencies = [
|
|
273
|
+
"airport_finder",
|
|
274
|
+
"pyo3",
|
|
275
|
+
]
|
|
276
|
+
|
|
277
|
+
[[package]]
|
|
278
|
+
name = "syn"
|
|
279
|
+
version = "2.0.117"
|
|
280
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
281
|
+
checksum = "e665b8803e7b1d2a727f4023456bbbbe74da67099c585258af0ad9c5013b9b99"
|
|
282
|
+
dependencies = [
|
|
283
|
+
"proc-macro2",
|
|
284
|
+
"quote",
|
|
285
|
+
"unicode-ident",
|
|
286
|
+
]
|
|
287
|
+
|
|
288
|
+
[[package]]
|
|
289
|
+
name = "target-lexicon"
|
|
290
|
+
version = "0.13.5"
|
|
291
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
292
|
+
checksum = "adb6935a6f5c20170eeceb1a3835a49e12e19d792f6dd344ccc76a985ca5a6ca"
|
|
293
|
+
|
|
294
|
+
[[package]]
|
|
295
|
+
name = "unicode-ident"
|
|
296
|
+
version = "1.0.24"
|
|
297
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
298
|
+
checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75"
|
|
299
|
+
|
|
300
|
+
[[package]]
|
|
301
|
+
name = "unindent"
|
|
302
|
+
version = "0.2.4"
|
|
303
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
304
|
+
checksum = "7264e107f553ccae879d21fbea1d6724ac785e8c3bfc762137959b5802826ef3"
|
|
305
|
+
|
|
306
|
+
[[package]]
|
|
307
|
+
name = "zmij"
|
|
308
|
+
version = "1.0.21"
|
|
309
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
310
|
+
checksum = "b8848ee67ecc8aedbaf3e4122217aff892639231befc6a1b58d29fff4c2cabaa"
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
[package]
|
|
2
|
+
name = "superwings"
|
|
3
|
+
version = "0.1.0"
|
|
4
|
+
edition = "2021"
|
|
5
|
+
license = "MIT"
|
|
6
|
+
repository = "https://github.com/TeamMilestone/superwings"
|
|
7
|
+
readme = "README.md"
|
|
8
|
+
|
|
9
|
+
[lib]
|
|
10
|
+
name = "_superwings"
|
|
11
|
+
crate-type = ["cdylib"]
|
|
12
|
+
|
|
13
|
+
[dependencies]
|
|
14
|
+
airport_finder = "0.1"
|
|
15
|
+
pyo3 = { version = "0.25", features = ["extension-module"] }
|
superwings-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 TeamMilestone
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: superwings
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Classifier: Programming Language :: Rust
|
|
5
|
+
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
6
|
+
License-File: LICENSE
|
|
7
|
+
Summary: Find the nearest airport from (lat, lng) coordinates. R-tree spatial index, 10,000+ airports.
|
|
8
|
+
Keywords: airport,geolocation,gis
|
|
9
|
+
License: MIT
|
|
10
|
+
Requires-Python: >=3.9
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# superwings
|
|
2
|
+
|
|
3
|
+
Find the nearest airport from (lat, lng) coordinates.
|
|
4
|
+
|
|
5
|
+
Pre-built Python wheel — no Rust toolchain needed. Embeds ~10,000 airports and country polygon boundaries with R-tree spatial indexing.
|
|
6
|
+
|
|
7
|
+
## Install
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
pip install superwings
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Usage
|
|
14
|
+
|
|
15
|
+
```python
|
|
16
|
+
from superwings import find_nearest_airport
|
|
17
|
+
|
|
18
|
+
result = find_nearest_airport(37.5665, 126.978)
|
|
19
|
+
# {"code": "kr.gmp", "name": "Seoul, Korea"}
|
|
20
|
+
|
|
21
|
+
result = find_nearest_airport(35.6762, 139.6503)
|
|
22
|
+
# {"code": "jp.hnd", "name": "Tokyo, Japan"}
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Output format
|
|
26
|
+
|
|
27
|
+
- `code`: `country_code.iata_code` (e.g., `kr.gmp`, `us.jfk`, `jp.hnd`)
|
|
28
|
+
- `name`: `City, Country` (e.g., `Seoul, Korea`)
|
|
29
|
+
|
|
30
|
+
## License
|
|
31
|
+
|
|
32
|
+
MIT
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["maturin>=1.0,<2.0"]
|
|
3
|
+
build-backend = "maturin"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "superwings"
|
|
7
|
+
version = "0.1.0"
|
|
8
|
+
description = "Find the nearest airport from (lat, lng) coordinates. R-tree spatial index, 10,000+ airports."
|
|
9
|
+
license = {text = "MIT"}
|
|
10
|
+
requires-python = ">=3.9"
|
|
11
|
+
keywords = ["airport", "geolocation", "gis"]
|
|
12
|
+
classifiers = [
|
|
13
|
+
"Programming Language :: Rust",
|
|
14
|
+
"Programming Language :: Python :: Implementation :: CPython",
|
|
15
|
+
]
|
|
16
|
+
|
|
17
|
+
[tool.maturin]
|
|
18
|
+
python-source = "python"
|
|
19
|
+
module-name = "superwings._superwings"
|
|
20
|
+
features = ["pyo3/extension-module"]
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"""Find the nearest airport from (lat, lng) coordinates.
|
|
2
|
+
|
|
3
|
+
Usage::
|
|
4
|
+
|
|
5
|
+
from superwings import find_nearest_airport
|
|
6
|
+
|
|
7
|
+
result = find_nearest_airport(37.5665, 126.978)
|
|
8
|
+
# {"code": "kr.gmp", "name": "Seoul, Korea"}
|
|
9
|
+
"""
|
|
10
|
+
|
|
11
|
+
from ._superwings import find_nearest_airport
|
|
12
|
+
|
|
13
|
+
__all__ = ["find_nearest_airport"]
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
use pyo3::prelude::*;
|
|
2
|
+
|
|
3
|
+
/// Find the nearest airport for the given (lat, lng) coordinates.
|
|
4
|
+
///
|
|
5
|
+
/// Returns a dict with "code" (e.g. "kr.gmp") and "name" (e.g. "Seoul, Korea"),
|
|
6
|
+
/// or a dict with "error" on failure.
|
|
7
|
+
#[pyfunction]
|
|
8
|
+
fn find_nearest_airport(lat: f64, lng: f64) -> PyResult<PyObject> {
|
|
9
|
+
Python::with_gil(|py| {
|
|
10
|
+
let dict = pyo3::types::PyDict::new(py);
|
|
11
|
+
match airport_finder::find_nearest_airport(lat, lng) {
|
|
12
|
+
Ok((code, name)) => {
|
|
13
|
+
dict.set_item("code", code)?;
|
|
14
|
+
dict.set_item("name", name)?;
|
|
15
|
+
}
|
|
16
|
+
Err(e) => {
|
|
17
|
+
dict.set_item("error", e)?;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
Ok(dict.into())
|
|
21
|
+
})
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
#[pymodule]
|
|
25
|
+
fn _superwings(m: &Bound<'_, PyModule>) -> PyResult<()> {
|
|
26
|
+
m.add_function(wrap_pyfunction!(find_nearest_airport, m)?)?;
|
|
27
|
+
Ok(())
|
|
28
|
+
}
|