maturin 1.3.0__py3-none-win_arm64.whl → 1.3.2__py3-none-win_arm64.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,16 +32,10 @@ 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(
36
- config_settings: Optional[Mapping[str, Any]] = None
37
- ) -> List[str]:
35
+ def get_maturin_pep517_args(config_settings: Optional[Mapping[str, Any]] = None) -> List[str]:
38
36
  build_args = config_settings.get("build-args") if config_settings else None
39
37
  if build_args is None:
40
38
  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
39
  args = shlex.split(env_args)
46
40
  elif isinstance(build_args, str):
47
41
  args = shlex.split(build_args)
@@ -91,9 +85,7 @@ def _build_wheel(
91
85
  sys.stdout.buffer.write(result.stdout)
92
86
  sys.stdout.flush()
93
87
  if result.returncode != 0:
94
- sys.stderr.write(
95
- f"Error: command {command} returned non-zero exit status {result.returncode}\n"
96
- )
88
+ sys.stderr.write(f"Error: command {command} returned non-zero exit status {result.returncode}\n")
97
89
  sys.exit(1)
98
90
  output = result.stdout.decode(errors="replace")
99
91
  wheel_path = output.strip().splitlines()[-1]
@@ -112,9 +104,7 @@ def build_wheel(
112
104
 
113
105
 
114
106
  # noinspection PyUnusedLocal
115
- def build_sdist(
116
- sdist_directory: str, config_settings: Optional[Mapping[str, Any]] = None
117
- ) -> str:
107
+ def build_sdist(sdist_directory: str, config_settings: Optional[Mapping[str, Any]] = None) -> str:
118
108
  command = ["maturin", "pep517", "write-sdist", "--sdist-directory", sdist_directory]
119
109
 
120
110
  print("Running `{}`".format(" ".join(command)))
@@ -123,18 +113,14 @@ def build_sdist(
123
113
  sys.stdout.buffer.write(result.stdout)
124
114
  sys.stdout.flush()
125
115
  if result.returncode != 0:
126
- sys.stderr.write(
127
- f"Error: command {command} returned non-zero exit status {result.returncode}\n"
128
- )
116
+ sys.stderr.write(f"Error: command {command} returned non-zero exit status {result.returncode}\n")
129
117
  sys.exit(1)
130
118
  output = result.stdout.decode(errors="replace")
131
119
  return output.strip().splitlines()[-1]
132
120
 
133
121
 
134
122
  # noinspection PyUnusedLocal
135
- def get_requires_for_build_wheel(
136
- config_settings: Optional[Mapping[str, Any]] = None
137
- ) -> List[str]:
123
+ def get_requires_for_build_wheel(config_settings: Optional[Mapping[str, Any]] = None) -> List[str]:
138
124
  if get_config().get("bindings") == "cffi":
139
125
  return ["cffi"]
140
126
  else:
@@ -147,9 +133,7 @@ def build_editable(
147
133
  config_settings: Optional[Mapping[str, Any]] = None,
148
134
  metadata_directory: Optional[str] = None,
149
135
  ) -> str:
150
- return _build_wheel(
151
- wheel_directory, config_settings, metadata_directory, editable=True
152
- )
136
+ return _build_wheel(wheel_directory, config_settings, metadata_directory, editable=True)
153
137
 
154
138
 
155
139
  # Requirements to build an editable are the same as for a wheel
@@ -157,9 +141,7 @@ get_requires_for_build_editable = get_requires_for_build_wheel
157
141
 
158
142
 
159
143
  # noinspection PyUnusedLocal
160
- def get_requires_for_build_sdist(
161
- config_settings: Optional[Mapping[str, Any]] = None
162
- ) -> List[str]:
144
+ def get_requires_for_build_sdist(config_settings: Optional[Mapping[str, Any]] = None) -> List[str]:
163
145
  return []
164
146
 
165
147
 
@@ -170,9 +152,7 @@ def prepare_metadata_for_build_wheel(
170
152
  print("Checking for Rust toolchain....")
171
153
  is_cargo_installed = False
172
154
  try:
173
- output = subprocess.check_output(["cargo", "--version"]).decode(
174
- "utf-8", "ignore"
175
- )
155
+ output = subprocess.check_output(["cargo", "--version"]).decode("utf-8", "ignore")
176
156
  if "cargo" in output:
177
157
  is_cargo_installed = True
178
158
  except (FileNotFoundError, SubprocessError):
maturin/import_hook.py CHANGED
@@ -71,9 +71,7 @@ class Importer(abc.MetaPathFinder):
71
71
 
72
72
  return None
73
73
 
74
- def _build_and_load(
75
- self, fullname: str, cargo_toml: pathlib.Path
76
- ) -> ModuleSpec | None:
74
+ def _build_and_load(self, fullname: str, cargo_toml: pathlib.Path) -> ModuleSpec | None:
77
75
  build_module(cargo_toml, bindings=self.bindings)
78
76
  loader = Loader(fullname)
79
77
  return importlib.util.spec_from_loader(fullname, loader)
@@ -98,10 +96,7 @@ def _is_cargo_project(cargo_toml: pathlib.Path, module_name: str) -> bool:
98
96
  with open(cargo_toml, "rb") as f:
99
97
  cargo = tomllib.load(f)
100
98
  package_name = cargo.get("package", {}).get("name")
101
- if (
102
- package_name == module_name
103
- or package_name.replace("-", "_") == module_name
104
- ):
99
+ if package_name == module_name or package_name.replace("-", "_") == module_name:
105
100
  return True
106
101
  return False
107
102
 
@@ -115,9 +110,7 @@ def generate_project(rust_file: pathlib.Path, bindings: str = "pyo3") -> pathlib
115
110
  command: list[str] = ["maturin", "new", "-b", bindings, str(project_dir)]
116
111
  result = subprocess.run(command, stdout=subprocess.PIPE)
117
112
  if result.returncode != 0:
118
- sys.stderr.write(
119
- f"Error: command {command} returned non-zero exit status {result.returncode}\n"
120
- )
113
+ sys.stderr.write(f"Error: command {command} returned non-zero exit status {result.returncode}\n")
121
114
  raise ImportError("Failed to generate cargo project")
122
115
 
123
116
  with open(rust_file) as f:
@@ -128,9 +121,7 @@ def generate_project(rust_file: pathlib.Path, bindings: str = "pyo3") -> pathlib
128
121
  return project_dir
129
122
 
130
123
 
131
- def build_module(
132
- manifest_path: pathlib.Path, bindings: str | None = None, release: bool = False
133
- ) -> None:
124
+ def build_module(manifest_path: pathlib.Path, bindings: str | None = None, release: bool = False) -> None:
134
125
  command = ["maturin", "develop", "-m", str(manifest_path)]
135
126
  if bindings:
136
127
  command.append("-b")
@@ -141,9 +132,7 @@ def build_module(
141
132
  sys.stdout.buffer.write(result.stdout)
142
133
  sys.stdout.flush()
143
134
  if result.returncode != 0:
144
- sys.stderr.write(
145
- f"Error: command {command} returned non-zero exit status {result.returncode}\n"
146
- )
135
+ sys.stderr.write(f"Error: command {command} returned non-zero exit status {result.returncode}\n")
147
136
  raise ImportError("Failed to build module with maturin")
148
137
 
149
138
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: maturin
3
- Version: 1.3.0
3
+ Version: 1.3.2
4
4
  Classifier: Topic :: Software Development :: Build Tools
5
5
  Classifier: Programming Language :: Rust
6
6
  Classifier: Programming Language :: Python :: Implementation :: CPython
@@ -0,0 +1,7 @@
1
+ maturin-1.3.2.dist-info/METADATA,sha256=eNX2_q5G5w6lSyw1-MCrWuMtqFtSdibyZzU4k5Cj0Gg,18569
2
+ maturin-1.3.2.dist-info/WHEEL,sha256=tMtGablWxRB9gg2Rjf6X2NgtbhSLQehiKnIwqj-3y3s,93
3
+ maturin/import_hook.py,sha256=TsZzWauEAC-xPOnuvy3kn25GM2EGqmcuvzdzS-aAHTE,5771
4
+ maturin/__init__.py,sha256=nues8BiqPJG1hBgdPTNKd8mlxJhV1H069Ez1G-C-MVU,6720
5
+ maturin/__main__.py,sha256=pXjh1oJe1m1JmVwsRwvS22kS3qiGkcLD6r7jbNXTFKA,1031
6
+ maturin-1.3.2.data/scripts/maturin.exe,sha256=Kd9-5dOnyZ_jdR5XrKt-Sn7MULhy56okgX2CV_onqoU,15127040
7
+ maturin-1.3.2.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: maturin (1.3.0)
2
+ Generator: maturin (1.3.2)
3
3
  Root-Is-Purelib: false
4
4
  Tag: py3-none-win_arm64
@@ -1,7 +0,0 @@
1
- maturin-1.3.0.dist-info/METADATA,sha256=H9bxxaCrrYr7ApM5wmdVsvLFd5j7GYUMjWq2RbLQcOk,18569
2
- maturin-1.3.0.dist-info/WHEEL,sha256=DCn38dDUK8WZmQVX_yl6Hii-cr1qtpmHYPvUsD9ekU4,93
3
- maturin/import_hook.py,sha256=Tc54hs-HzyAAXPMQDSm7-BRD_aErCAQrudWWZFT9wE4,5894
4
- maturin/__init__.py,sha256=qGed60yk0frpTCLw1Dc-Bu2SivY5nm25gprqjrwop8Y,7011
5
- maturin/__main__.py,sha256=pXjh1oJe1m1JmVwsRwvS22kS3qiGkcLD6r7jbNXTFKA,1031
6
- maturin-1.3.0.data/scripts/maturin.exe,sha256=HFpN6lhV6HnDNxQA06dszb1oCb6vkWSx3tYdRvoxPT8,15095808
7
- maturin-1.3.0.dist-info/RECORD,,