maturin 1.0.0b8__py3-none-linux_armv6l.whl → 1.0.1__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 CHANGED
@@ -32,8 +32,21 @@ def get_config() -> Dict[str, str]:
32
32
  return pyproject_toml.get("tool", {}).get("maturin", {})
33
33
 
34
34
 
35
- def get_maturin_pep517_args() -> list[str]:
36
- args = shlex.split(os.getenv("MATURIN_PEP517_ARGS", ""))
35
+ def get_maturin_pep517_args(
36
+ config_settings: Mapping[str, Any] | None = None
37
+ ) -> list[str]:
38
+ build_args = config_settings.get("build-args") if config_settings else None
39
+ if build_args is None:
40
+ env_args = os.getenv("MATURIN_PEP517_ARGS", "")
41
+ if env_args:
42
+ print(
43
+ f"'MATURIN_PEP517_ARGS' is deprecated, use `--config-settings build-args='{env_args}'` instead."
44
+ )
45
+ args = shlex.split(env_args)
46
+ elif isinstance(build_args, str):
47
+ args = shlex.split(build_args)
48
+ else:
49
+ args = build_args
37
50
  return args
38
51
 
39
52
 
@@ -68,7 +81,7 @@ def _build_wheel(
68
81
  if editable:
69
82
  command.append("--editable")
70
83
 
71
- pep517_args = get_maturin_pep517_args()
84
+ pep517_args = get_maturin_pep517_args(config_settings)
72
85
  if pep517_args:
73
86
  command.extend(pep517_args)
74
87
 
@@ -185,7 +198,7 @@ def prepare_metadata_for_build_wheel(
185
198
  sys.executable,
186
199
  ]
187
200
  command.extend(_additional_pep517_args())
188
- pep517_args = get_maturin_pep517_args()
201
+ pep517_args = get_maturin_pep517_args(config_settings)
189
202
  if pep517_args:
190
203
  command.extend(pep517_args)
191
204
 
@@ -1,12 +1,12 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: maturin
3
- Version: 1.0.0b8
3
+ Version: 1.0.1
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
- Requires-Dist: tomli >= 1.1.0 ; python_version < '3.11'
9
- Requires-Dist: ziglang ~= 0.10.0 ; extra == 'zig'
8
+ Requires-Dist: tomli >=1.1.0 ; python_version < '3.11'
9
+ Requires-Dist: ziglang ~=0.10.0 ; extra == 'zig'
10
10
  Requires-Dist: patchelf ; extra == 'patchelf'
11
11
  Provides-Extra: zig
12
12
  Provides-Extra: patchelf
@@ -16,7 +16,7 @@ Home-Page: https://github.com/pyo3/maturin
16
16
  Author: konstin <konstin@mailbox.org>, messense <messense@icloud.com>
17
17
  Author-email: konstin <konstin@mailbox.org>, messense <messense@icloud.com>
18
18
  License: MIT OR Apache-2.0
19
- Requires-Python: >= 3.7
19
+ Requires-Python: >=3.7
20
20
  Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
21
21
  Project-URL: Source Code, https://github.com/PyO3/maturin
22
22
  Project-URL: Issues, https://github.com/PyO3/maturin/issues
@@ -29,7 +29,6 @@ _formerly pyo3-pack_
29
29
 
30
30
  [![Actions Status](https://img.shields.io/github/actions/workflow/status/PyO3/maturin/test.yml?branch=main&logo=github&style=flat-square)](https://github.com/PyO3/maturin/actions)
31
31
  [![FreeBSD](https://img.shields.io/cirrus/github/PyO3/maturin/main?logo=CircleCI&style=flat-square)](https://cirrus-ci.com/github/PyO3/maturin)
32
- [![Bors enabled](https://bors.tech/images/badge_small.svg)](https://app.bors.tech/repositories/55651)
33
32
  [![Crates.io](https://img.shields.io/crates/v/maturin.svg?logo=rust&style=flat-square)](https://crates.io/crates/maturin)
34
33
  [![PyPI](https://img.shields.io/pypi/v/maturin.svg?logo=python&style=flat-square)](https://pypi.org/project/maturin)
35
34
  [![Maturin User Guide](https://img.shields.io/badge/user-guide-brightgreen?logo=readthedocs&style=flat-square)](https://maturin.rs)
@@ -146,6 +145,7 @@ You can specify a different python source directory in `pyproject.toml` by setti
146
145
  ```toml
147
146
  [tool.maturin]
148
147
  python-source = "python"
148
+ module-name = "my_project._lib_name"
149
149
  ```
150
150
 
151
151
  then the project structure would look like this:
@@ -179,12 +179,24 @@ my-project
179
179
  ├── my_project
180
180
  │   ├── __init__.py
181
181
  │   ├── bar.py
182
- │   └── my_project.cpython-36m-x86_64-linux-gnu.so
182
+ │   └── _lib_name.cpython-36m-x86_64-linux-gnu.so
183
183
  ├── README.md
184
184
  └── src
185
185
     └── lib.rs
186
186
  ```
187
187
 
188
+ When doing this also be sure to set the module name in your code to match the last part of `module-name` (don't include the package path):
189
+
190
+ ```
191
+ #[pymodule]
192
+ #[pyo3(name="_lib_name")]
193
+ fn my_lib_name(_py: Python<'_>, m: &PyModule) -> PyResult<()> {
194
+ m.add_class::<MyPythonRustClass>()?;
195
+ Ok(())
196
+ }
197
+ ```
198
+
199
+
188
200
  ## Python metadata
189
201
 
190
202
  maturin supports [PEP 621](https://www.python.org/dev/peps/pep-0621/), you can specify python package metadata in `pyproject.toml`.
@@ -220,7 +232,7 @@ maturin supports building through `pyproject.toml`. To use it, create a `pyproje
220
232
 
221
233
  ```toml
222
234
  [build-system]
223
- requires = ["maturin>=0.14,<0.15"]
235
+ requires = ["maturin>=1.0,<2.0"]
224
236
  build-backend = "maturin"
225
237
  ```
226
238
 
@@ -236,7 +248,7 @@ For a non-manylinux build with cffi bindings you could use the following:
236
248
 
237
249
  ```toml
238
250
  [build-system]
239
- requires = ["maturin>=0.14,<0.15"]
251
+ requires = ["maturin>=1.0,<2.0"]
240
252
  build-backend = "maturin"
241
253
 
242
254
  [tool.maturin]
@@ -0,0 +1,7 @@
1
+ maturin-1.0.1.dist-info/METADATA,sha256=eOgeVpDQ8ZHbx3xuI8o-F_rg0XLGBZJ1Nk_MCcdten4,17988
2
+ maturin-1.0.1.dist-info/WHEEL,sha256=s19g32HzAoNPB5--_s09m0W79Yw76dVdXCzWjiDlHWA,96
3
+ maturin/__main__.py,sha256=hDlP-5HIi0cJ_glQYNPENWOtOb5Hh7TMDeCIos5mPX8,956
4
+ maturin/__init__.py,sha256=YSw3qN9r4EQAcHIkUSkRf3Dwdm0U_Fcmf_eiYH1vimA,6739
5
+ maturin/import_hook.py,sha256=ZuSpyCxJ7j_vw2KW4SoyHWQeaxQDo8dl6XsN9BAUZWk,5162
6
+ maturin-1.0.1.data/scripts/maturin,sha256=crE4etYcQsPilRUyqnupn4po8-j-RRNL29ItJeIcRFQ,26343624
7
+ maturin-1.0.1.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: maturin (1.0.0-beta.7)
2
+ Generator: maturin (1.0.0)
3
3
  Root-Is-Purelib: false
4
4
  Tag: py3-none-linux_armv6l
@@ -1,7 +0,0 @@
1
- maturin-1.0.0b8.dist-info/METADATA,sha256=K79tjPhfTXidaEgXTLDtCN6OL-ONMRHj4Y1eW8EbVM4,17757
2
- maturin-1.0.0b8.dist-info/WHEEL,sha256=6BTKXT54iNOircntx1pXNFsIbyK-vdHwG4u51c-xN6g,103
3
- maturin/__main__.py,sha256=hDlP-5HIi0cJ_glQYNPENWOtOb5Hh7TMDeCIos5mPX8,956
4
- maturin/__init__.py,sha256=PIXDyJHtVGdXe2OzmNYudC0s4Z1d7OIBv-yvq7sLiqs,6236
5
- maturin/import_hook.py,sha256=ZuSpyCxJ7j_vw2KW4SoyHWQeaxQDo8dl6XsN9BAUZWk,5162
6
- maturin-1.0.0b8.data/scripts/maturin,sha256=Z1n8P5RZKn3czP2rWaGW7U0j84SrFV25C6xRhn79rIE,26235916
7
- maturin-1.0.0b8.dist-info/RECORD,,