Skip to content

Commit 8de119a

Browse files
committed
Free-Threaded wheels, Change license to 0BSD, Update packages
1 parent 159d96a commit 8de119a

File tree

8 files changed

+85
-46
lines changed

8 files changed

+85
-46
lines changed

.github/workflows/workflow.yaml

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
- uses: dtolnay/rust-toolchain@stable
3333
- uses: cachix/install-nix-action@v30
3434
with:
35-
nix_path: nixpkgs=channel:nixpkgs-24.05-darwin
35+
nix_path: nixpkgs=channel:nixos-unstable
3636

3737
- name: Generate cache key
3838
run: |
@@ -100,6 +100,13 @@ jobs:
100100
args: --release --out dist --zig
101101
sccache: "true"
102102
manylinux: auto
103+
- name: Build free-threaded wheels
104+
uses: PyO3/maturin-action@v1
105+
with:
106+
target: ${{ matrix.platform.target }}
107+
args: --release --out dist --zig -i 3.13t
108+
sccache: "true"
109+
manylinux: auto
103110
- name: Upload wheels
104111
uses: actions/upload-artifact@v4
105112
with:
@@ -129,6 +136,13 @@ jobs:
129136
args: --release --out dist
130137
sccache: "true"
131138
manylinux: musllinux_1_2
139+
- name: Build free-threaded wheels
140+
uses: PyO3/maturin-action@v1
141+
with:
142+
target: ${{ matrix.platform.target }}
143+
args: --release --out dist -i 3.13t
144+
sccache: "true"
145+
manylinux: musllinux_1_2
132146
- name: Upload wheels
133147
uses: actions/upload-artifact@v4
134148
with:
@@ -169,7 +183,7 @@ jobs:
169183
strategy:
170184
matrix:
171185
platform:
172-
- runner: macos-12
186+
- runner: macos-13
173187
target: x86_64
174188
- runner: macos-14
175189
target: aarch64
@@ -184,6 +198,12 @@ jobs:
184198
target: ${{ matrix.platform.target }}
185199
args: --release --out dist
186200
sccache: "true"
201+
- name: Build free-threaded wheels
202+
uses: PyO3/maturin-action@v1
203+
with:
204+
target: ${{ matrix.platform.target }}
205+
args: --release --out dist -i 3.13t
206+
sccache: "true"
187207
- name: Upload wheels
188208
uses: actions/upload-artifact@v4
189209
with:

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
[package]
22
edition = "2021"
33
name = "polyline_rs"
4-
version = "1.1.0"
4+
version = "1.2.0"
55

66
[lib]
77
crate-type = ["cdylib"]
88
name = "polyline_rs"
99

1010
[dependencies]
11-
pyo3 = { version = "0.22.5", features = ["abi3-py39", "extension-module"] }
11+
pyo3 = { version = "0.23.3", features = ["abi3-py39", "extension-module"] }
1212

1313
[profile.release]
1414
overflow-checks = true

LICENSE

Lines changed: 12 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,12 @@
1-
This is free and unencumbered software released into the public domain.
2-
3-
Anyone is free to copy, modify, publish, use, compile, sell, or
4-
distribute this software, either in source code form or as a compiled
5-
binary, for any purpose, commercial or non-commercial, and by any
6-
means.
7-
8-
In jurisdictions that recognize copyright laws, the author or authors
9-
of this software dedicate any and all copyright interest in the
10-
software to the public domain. We make this dedication for the benefit
11-
of the public at large and to the detriment of our heirs and
12-
successors. We intend this dedication to be an overt act of
13-
relinquishment in perpetuity of all present and future rights to this
14-
software under copyright law.
15-
16-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17-
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18-
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
19-
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
20-
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
21-
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
22-
OTHER DEALINGS IN THE SOFTWARE.
23-
24-
For more information, please refer to <https://unlicense.org>
1+
BSD Zero Clause License
2+
3+
Permission to use, copy, modify, and/or distribute this software for any
4+
purpose with or without fee is hereby granted.
5+
6+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
7+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
8+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
9+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
10+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
11+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
12+
PERFORMANCE OF THIS SOFTWARE.

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
11
# polyline-rs
22

3+
![Python Free-Threaded Compatible](https://shields.monicz.dev/badge/Free--Threaded-Compatible-blue?logo=Python&logoColor=f0c74c)
34
[![PyPI - Python Version](https://shields.monicz.dev/pypi/pyversions/polyline-rs)](https://pypi.org/project/polyline-rs)
45
[![Liberapay Patrons](https://shields.monicz.dev/liberapay/patrons/Zaczero?logo=liberapay&label=Patrons)](https://liberapay.com/Zaczero/)
56
[![GitHub Sponsors](https://shields.monicz.dev/github/sponsors/Zaczero?logo=github&label=Sponsors&color=%23db61a2)](https://github.com/sponsors/Zaczero)
67

7-
Fast Google Encoded Polyline encoding & decoding in Rust. A Python PyO3 library with out-of-the-box support for both (lat, lon) and (lon, lat) coordinates.
8+
Fast Google Encoded Polyline encoding & decoding in Rust with Python bindings. Library with out-of-the-box support for both (lat, lon) and (lon, lat) coordinates.
89

910
[Encoded Polyline Algorithm Format](https://developers.google.com/maps/documentation/utilities/polylinealgorithm)
1011

1112
## Installation
1213

13-
The recommended installation method is through the PyPI package manager. The project is implemented in Rust and several pre-built binary wheels are available for Linux, macOS, and Windows, with support for both x64 and ARM architectures.
14+
Pre-built binary wheels are available for Linux, macOS, and Windows, with support for both x64 and ARM architectures.
1415

1516
```sh
1617
pip install polyline-rs

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ authors = [{ name = "Kamil Monicz", email = "[email protected]" }]
33
classifiers = [
44
"Development Status :: 5 - Production/Stable",
55
"Intended Audience :: Developers",
6-
"License :: OSI Approved :: The Unlicense (Unlicense)",
6+
"License :: OSI Approved :: Zero-Clause BSD (0BSD)",
77
"Operating System :: OS Independent",
88
"Programming Language :: Python :: 3.10",
99
"Programming Language :: Python :: 3.11",
@@ -17,7 +17,7 @@ classifiers = [
1717
"Typing :: Typed",
1818
]
1919
dependencies = []
20-
description = "Fast Google Encoded Polyline encoding & decoding in Rust"
20+
description = "Fast Google Encoded Polyline encoding & decoding"
2121
dynamic = ["version"]
2222
keywords = [
2323
"decoding",

shell.nix

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
{ isDevelopment ? true }:
1+
{}:
22

33
let
44
# Update packages with `nixpkgs-update` command
5-
pkgs = import (fetchTarball "https://github.com/NixOS/nixpkgs/archive/0fcb98acb6633445764dafe180e6833eb0f95208.tar.gz") { };
5+
pkgs = import (fetchTarball "https://github.com/NixOS/nixpkgs/archive/4989a246d7a390a859852baddb1013f825435cee.tar.gz") { };
66

77
packages' = with pkgs; [
88
coreutils
@@ -29,7 +29,7 @@ let
2929
'')
3030
];
3131

32-
shell' = with pkgs; lib.optionalString isDevelopment ''
32+
shell' = with pkgs; ''
3333
export PYTHONNOUSERSITE=1
3434
export TZ=UTC
3535

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ fn decode_latlon(polyline: &str, precision: i32) -> Vec<(f64, f64)> {
119119
_decode(polyline, precision, true)
120120
}
121121

122-
#[pymodule]
122+
#[pymodule(gil_used = false)]
123123
#[pyo3(name = "_lib")]
124124
fn lib(m: &Bound<'_, PyModule>) -> PyResult<()> {
125125
m.add_function(wrap_pyfunction!(encode_lonlat, m)?)?;

uv.lock

Lines changed: 40 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)