maturin 1.5.1__py3-none-linux_armv6l.whl → 1.6.0__py3-none-linux_armv6l.whl
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.
Potentially problematic release.
This version of maturin might be problematic. Click here for more details.
- maturin/__init__.py +11 -2
- maturin/__main__.py +7 -1
- maturin/import_hook.py +7 -1
- {maturin-1.5.1.data → maturin-1.6.0.data}/scripts/maturin +0 -0
- {maturin-1.5.1.dist-info → maturin-1.6.0.dist-info}/METADATA +34 -34
- maturin-1.6.0.dist-info/RECORD +7 -0
- {maturin-1.5.1.dist-info → maturin-1.6.0.dist-info}/WHEEL +1 -1
- maturin-1.5.1.dist-info/RECORD +0 -7
maturin/__init__.py
CHANGED
|
@@ -45,6 +45,15 @@ def get_maturin_pep517_args(config_settings: Optional[Mapping[str, Any]] = None)
|
|
|
45
45
|
return args
|
|
46
46
|
|
|
47
47
|
|
|
48
|
+
def _get_sys_executable() -> str:
|
|
49
|
+
# Use the base interpreter path when running inside a venv to avoid recompilation
|
|
50
|
+
# when switching between venvs
|
|
51
|
+
executable = getattr(sys, "_base_executable", sys.executable)
|
|
52
|
+
if not os.path.exists(executable):
|
|
53
|
+
executable = sys.executable
|
|
54
|
+
return executable
|
|
55
|
+
|
|
56
|
+
|
|
48
57
|
def _additional_pep517_args() -> List[str]:
|
|
49
58
|
# Support building for 32-bit Python on x64 Windows
|
|
50
59
|
if platform.system().lower() == "windows" and platform.machine().lower() == "amd64":
|
|
@@ -68,7 +77,7 @@ def _build_wheel(
|
|
|
68
77
|
"pep517",
|
|
69
78
|
"build-wheel",
|
|
70
79
|
"-i",
|
|
71
|
-
|
|
80
|
+
_get_sys_executable(),
|
|
72
81
|
]
|
|
73
82
|
options = _additional_pep517_args()
|
|
74
83
|
if editable:
|
|
@@ -180,7 +189,7 @@ def prepare_metadata_for_build_wheel(
|
|
|
180
189
|
# PEP 517 specifies that only `sys.executable` points to the correct
|
|
181
190
|
# python interpreter
|
|
182
191
|
"--interpreter",
|
|
183
|
-
|
|
192
|
+
_get_sys_executable(),
|
|
184
193
|
]
|
|
185
194
|
command.extend(_additional_pep517_args())
|
|
186
195
|
pep517_args = get_maturin_pep517_args(config_settings)
|
maturin/__main__.py
CHANGED
|
@@ -41,4 +41,10 @@ if __name__ == "__main__":
|
|
|
41
41
|
print("Unable to find `maturin` script")
|
|
42
42
|
exit(1)
|
|
43
43
|
|
|
44
|
-
|
|
44
|
+
if sys.platform == "win32":
|
|
45
|
+
import subprocess
|
|
46
|
+
|
|
47
|
+
code = subprocess.call([str(maturin)] + sys.argv[1:])
|
|
48
|
+
sys.exit(code)
|
|
49
|
+
else:
|
|
50
|
+
os.execv(maturin, [str(maturin)] + sys.argv[1:])
|
maturin/import_hook.py
CHANGED
|
@@ -11,6 +11,7 @@ import sys
|
|
|
11
11
|
from contextvars import ContextVar
|
|
12
12
|
from importlib import abc
|
|
13
13
|
from importlib.machinery import ModuleSpec
|
|
14
|
+
import warnings
|
|
14
15
|
from types import ModuleType
|
|
15
16
|
from typing import Sequence
|
|
16
17
|
|
|
@@ -148,10 +149,15 @@ def install(bindings: str | None = None, release: bool = False) -> Importer | No
|
|
|
148
149
|
Install the import hook.
|
|
149
150
|
|
|
150
151
|
:param bindings: Which kind of bindings to use.
|
|
151
|
-
Possible values are pyo3,
|
|
152
|
+
Possible values are pyo3, cffi and uniffi
|
|
152
153
|
|
|
153
154
|
:param release: Build in release mode, otherwise debug mode by default
|
|
154
155
|
"""
|
|
156
|
+
warnings.warn(
|
|
157
|
+
"`maturin.import_hook` is deprecated in favour of a new "
|
|
158
|
+
"`maturin_import_hook` package and will be removed in a future release. See https://maturin.rs/import_hook",
|
|
159
|
+
DeprecationWarning,
|
|
160
|
+
)
|
|
155
161
|
if _have_importer():
|
|
156
162
|
return None
|
|
157
163
|
importer = Importer(bindings=bindings, release=release)
|
|
Binary file
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: maturin
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.6.0
|
|
4
4
|
Classifier: Topic :: Software Development :: Build Tools
|
|
5
5
|
Classifier: Programming Language :: Rust
|
|
6
6
|
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
7
7
|
Classifier: Programming Language :: Python :: Implementation :: PyPy
|
|
8
8
|
Requires-Dist: tomli >=1.1.0 ; python_version < '3.11'
|
|
9
|
-
Requires-Dist: ziglang
|
|
9
|
+
Requires-Dist: ziglang >=0.10.0, <0.13.0 ; extra == 'zig'
|
|
10
10
|
Requires-Dist: patchelf ; extra == 'patchelf'
|
|
11
11
|
Provides-Extra: zig
|
|
12
12
|
Provides-Extra: patchelf
|
|
13
|
-
Summary: Build and publish crates with pyo3,
|
|
13
|
+
Summary: Build and publish crates with pyo3, cffi and uniffi bindings as well as rust binaries as python packages
|
|
14
14
|
Keywords: python,cffi,packaging,pypi,pyo3
|
|
15
15
|
Home-Page: https://github.com/pyo3/maturin
|
|
16
16
|
Author: konstin <konstin@mailbox.org>, messense <messense@icloud.com>
|
|
@@ -32,9 +32,9 @@ _formerly pyo3-pack_
|
|
|
32
32
|
[](https://pypi.org/project/maturin)
|
|
33
33
|
[](https://github.com/PyO3/maturin/actions)
|
|
34
34
|
[](https://cirrus-ci.com/github/PyO3/maturin)
|
|
35
|
-
[](https://discord.gg/33kcChzH7f)
|
|
36
36
|
|
|
37
|
-
Build and publish crates with pyo3,
|
|
37
|
+
Build and publish crates with pyo3, cffi and uniffi bindings as well as rust binaries as python packages with minimal configuration.
|
|
38
38
|
It supports building wheels for python 3.8+ on windows, linux, mac and freebsd, can upload them to [pypi](https://pypi.org/) and has basic pypy and graalpy support.
|
|
39
39
|
|
|
40
40
|
Check out the [User Guide](https://maturin.rs/)!
|
|
@@ -53,12 +53,12 @@ pipx install maturin
|
|
|
53
53
|
|
|
54
54
|
There are four main commands:
|
|
55
55
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
56
|
+
- `maturin new` creates a new cargo project with maturin configured.
|
|
57
|
+
- `maturin publish` builds the crate into python packages and publishes them to pypi.
|
|
58
|
+
- `maturin build` builds the wheels and stores them in a folder (`target/wheels` by default), but doesn't upload them. It's possible to upload those with [twine](https://github.com/pypa/twine) or `maturin upload`.
|
|
59
|
+
- `maturin develop` builds the crate and installs it as a python module directly in the current virtualenv. Note that while `maturin develop` is faster, it doesn't support all the feature that running `pip install` after `maturin build` supports.
|
|
60
60
|
|
|
61
|
-
`pyo3`
|
|
61
|
+
`pyo3` bindings are automatically detected. For cffi or binaries, you need to pass `-b cffi` or `-b bin`.
|
|
62
62
|
maturin doesn't need extra configuration files and doesn't clash with an existing setuptools-rust or milksnake configuration.
|
|
63
63
|
You can even integrate it with testing tools such as [tox](https://tox.readthedocs.io/en/latest/).
|
|
64
64
|
There are examples for the different bindings in the `test-crates` folder.
|
|
@@ -71,7 +71,7 @@ The name of the module, which you are using when importing, will be the `name` v
|
|
|
71
71
|
Python packages come in two formats:
|
|
72
72
|
A built form called wheel and source distributions (sdist), both of which are archives.
|
|
73
73
|
A wheel can be compatible with any python version, interpreter (cpython and pypy, mainly), operating system and hardware architecture (for pure python wheels),
|
|
74
|
-
can be limited to a specific platform and architecture (e.g. when using ctypes or cffi) or to a specific python interpreter and version on a specific architecture and operating system (e.g. with pyo3
|
|
74
|
+
can be limited to a specific platform and architecture (e.g. when using ctypes or cffi) or to a specific python interpreter and version on a specific architecture and operating system (e.g. with pyo3).
|
|
75
75
|
|
|
76
76
|
When using `pip install` on a package, pip tries to find a matching wheel and install that. If it doesn't find one, it downloads the source distribution and builds a wheel for the current platform,
|
|
77
77
|
which requires the right compilers to be installed. Installing a wheel is much faster than installing a source distribution as building wheels is generally slow.
|
|
@@ -80,9 +80,9 @@ When you publish a package to be installable with `pip install`, you upload it t
|
|
|
80
80
|
For testing, you can use [test pypi](https://test.pypi.org/) instead, which you can use with `pip install --index-url https://test.pypi.org/simple/`.
|
|
81
81
|
Note that for publishing for linux, [you need to use the manylinux docker container](#manylinux-and-auditwheel), while for publishing from your repository you can use the [PyO3/maturin-action github action](https://github.com/PyO3/maturin-action).
|
|
82
82
|
|
|
83
|
-
## pyo3
|
|
83
|
+
## pyo3
|
|
84
84
|
|
|
85
|
-
For pyo3
|
|
85
|
+
For pyo3, maturin can only build packages for installed python versions. On linux and mac, all python versions in `PATH` are used.
|
|
86
86
|
If you don't set your own interpreters with `-i`, a heuristic is used to search for python installations.
|
|
87
87
|
On windows all versions from the python launcher (which is installed by default by the python.org installer) and all conda environments except base are used. You can check which versions are picked up with the `list-python` subcommand.
|
|
88
88
|
|
|
@@ -171,7 +171,7 @@ my-project
|
|
|
171
171
|
|
|
172
172
|
maturin will add the native extension as a module in your python folder. When using develop, maturin will copy the native library and for cffi also the glue code to your python folder. You should add those files to your gitignore.
|
|
173
173
|
|
|
174
|
-
With cffi you can do `from .my_project import lib` and then use `lib.my_native_function`, with pyo3
|
|
174
|
+
With cffi you can do `from .my_project import lib` and then use `lib.my_native_function`, with pyo3 you can directly `from .my_project import my_native_function`.
|
|
175
175
|
|
|
176
176
|
Example layout with pyo3 after `maturin develop`:
|
|
177
177
|
|
|
@@ -198,7 +198,6 @@ fn my_lib_name(_py: Python<'_>, m: &PyModule) -> PyResult<()> {
|
|
|
198
198
|
}
|
|
199
199
|
```
|
|
200
200
|
|
|
201
|
-
|
|
202
201
|
## Python metadata
|
|
203
202
|
|
|
204
203
|
maturin supports [PEP 621](https://www.python.org/dev/peps/pep-0621/), you can specify python package metadata in `pyproject.toml`.
|
|
@@ -297,23 +296,24 @@ maturin itself is manylinux compliant when compiled for the musl target.
|
|
|
297
296
|
|
|
298
297
|
## Examples
|
|
299
298
|
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
299
|
+
- [ballista-python](https://github.com/apache/arrow-ballista-python) - A Python library that binds to Apache Arrow distributed query engine Ballista
|
|
300
|
+
- [bleuscore](https://github.com/shenxiangzhuang/bleuscore) - A BLEU score calculation library, written in pure Rust
|
|
301
|
+
- [chardetng-py](https://github.com/john-parton/chardetng-py) - Python binding for the chardetng character encoding detector.
|
|
302
|
+
- [connector-x](https://github.com/sfu-db/connector-x/tree/main/connectorx-python) - ConnectorX enables you to load data from databases into Python in the fastest and most memory efficient way
|
|
303
|
+
- [datafusion-python](https://github.com/apache/arrow-datafusion-python) - a Python library that binds to Apache Arrow in-memory query engine DataFusion
|
|
304
|
+
- [deltalake-python](https://github.com/delta-io/delta-rs/tree/main/python) - Native Delta Lake Python binding based on delta-rs with Pandas integration
|
|
305
|
+
- [opendal](https://github.com/apache/incubator-opendal/tree/main/bindings/python) - OpenDAL Python Binding to access data freely
|
|
306
|
+
- [orjson](https://github.com/ijl/orjson) - A fast, correct JSON library for Python
|
|
307
|
+
- [polars](https://github.com/pola-rs/polars/tree/master/py-polars) - Fast multi-threaded DataFrame library in Rust | Python | Node.js
|
|
308
|
+
- [pydantic-core](https://github.com/pydantic/pydantic-core) - Core validation logic for pydantic written in Rust
|
|
309
|
+
- [pyrus-cramjam](https://github.com/milesgranger/pyrus-cramjam) - Thin Python wrapper to de/compression algorithms in Rust
|
|
310
|
+
- [pyxel](https://github.com/kitao/pyxel) - A retro game engine for Python
|
|
311
|
+
- [roapi](https://github.com/roapi/roapi) - ROAPI automatically spins up read-only APIs for static datasets without requiring you to write a single line of code
|
|
312
|
+
- [robyn](https://github.com/sansyrox/robyn) - A fast and extensible async python web server with a Rust runtime
|
|
313
|
+
- [ruff](https://github.com/charliermarsh/ruff) - An extremely fast Python linter, written in Rust
|
|
314
|
+
- [tantivy-py](https://github.com/quickwit-oss/tantivy-py) - Python bindings for Tantivy
|
|
315
|
+
- [watchfiles](https://github.com/samuelcolvin/watchfiles) - Simple, modern and high performance file watching and code reload in python
|
|
316
|
+
- [wonnx](https://github.com/webonnx/wonnx/tree/master/wonnx-py) - Wonnx is a GPU-accelerated ONNX inference run-time written 100% in Rust
|
|
317
317
|
|
|
318
318
|
## Contributing
|
|
319
319
|
|
|
@@ -334,8 +334,8 @@ If you don't have time to contribute yourself but still wish to support the proj
|
|
|
334
334
|
|
|
335
335
|
Licensed under either of:
|
|
336
336
|
|
|
337
|
-
|
|
338
|
-
|
|
337
|
+
- Apache License, Version 2.0, ([LICENSE-APACHE](https://github.com/PyO3/maturin/blob/main/license-apache) or http://www.apache.org/licenses/LICENSE-2.0)
|
|
338
|
+
- MIT license ([LICENSE-MIT](https://github.com/PyO3/maturin/blob/main/license-mit) or http://opensource.org/licenses/MIT)
|
|
339
339
|
|
|
340
340
|
at your option.
|
|
341
341
|
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
maturin-1.6.0.dist-info/METADATA,sha256=bvHMhiptw-W1xo8B7tJKwtVbvA0wgaDKzrRzy6yGwIQ,18241
|
|
2
|
+
maturin-1.6.0.dist-info/WHEEL,sha256=EJCrd8e34JqUvXk6uBEWooh4pioqQDLoKD3mMF6H1B4,96
|
|
3
|
+
maturin/__main__.py,sha256=Fg40Rg6srWYrH0s2ZgbIOysRDnZf2tX-z5VJAPyOs4Y,1145
|
|
4
|
+
maturin/__init__.py,sha256=GFHTJ9LXcx2w0KEceMRXaBLhUf2lB_uBnmEQ66P8STk,7037
|
|
5
|
+
maturin/import_hook.py,sha256=Ze5hQYLdScmcr2lVOk4lRKv6YgnkcuwDccue0nqBlco,5848
|
|
6
|
+
maturin-1.6.0.data/scripts/maturin,sha256=Ri76hfpS0T_VBu6wICy7uOFNhhU3p7mK2AKA70owgvs,27425744
|
|
7
|
+
maturin-1.6.0.dist-info/RECORD,,
|
maturin-1.5.1.dist-info/RECORD
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
maturin-1.5.1.dist-info/METADATA,sha256=wvzGoE8Aa9lK5HWLngo8FU-w2-UpfQx3-YtEqUN3GUs,18241
|
|
2
|
-
maturin-1.5.1.dist-info/WHEEL,sha256=ZmnPU_EDSjDSAigHhNf2hHOCxlWqJ-iLDD3F6I5RgmY,96
|
|
3
|
-
maturin/__init__.py,sha256=LTulsQuZU-v7IAdoxw_R6A661B1KsSlIsF2sMMDllYo,6703
|
|
4
|
-
maturin/__main__.py,sha256=4CyZAGqzmFsCl0FMlxAcG4vHFepE2lRZiPu4MKXyY4Y,987
|
|
5
|
-
maturin/import_hook.py,sha256=4Uwi4mBhMh3OlrWYpz2bwRU1mBG7HP2YObpo3vPcNYI,5602
|
|
6
|
-
maturin-1.5.1.data/scripts/maturin,sha256=TMxb27KChccCMHr50xv8At427oQwDCeZi3TsEODS1uo,27539276
|
|
7
|
-
maturin-1.5.1.dist-info/RECORD,,
|