Skip to content

Commit 63dd594

Browse files
committed
Drop ignore-rule-on-llvm patch rule
1 parent 617fba5 commit 63dd594

File tree

3 files changed

+4
-14
lines changed

3 files changed

+4
-14
lines changed

graalpython/lib-graalpython/patches/metadata.toml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -310,21 +310,18 @@ version = '>= 2.0.0rc1, < 2.1'
310310
patch = 'numpy-2.0.0.patch'
311311
license = 'BSD-3-Clause'
312312
dist-type = 'sdist'
313-
ignore-rule-on-llvm = true
314313

315314
[[numpy.rules]]
316315
version = '== 1.26.4'
317316
patch = 'numpy-1.26.4.patch'
318317
license = 'BSD-3-Clause'
319318
dist-type = 'sdist'
320-
ignore-rule-on-llvm = true
321319

322320
[[numpy.rules]]
323321
version = '== 1.24.3'
324322
patch = 'numpy-1.24.3.patch'
325323
license = 'BSD-3-Clause'
326324
dist-type = 'sdist'
327-
ignore-rule-on-llvm = true
328325

329326
[[numpy.rules]]
330327
version = '== 1.23.5'

graalpython/lib-graalpython/patches/pip-23.2.1.patch

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -102,10 +102,10 @@ index a8cd133..20dd1e6 100644
102102
# file in .data maps to same location as file in wheel root).
103103
diff --git a/pip/_internal/utils/graalpy.py b/pip/_internal/utils/graalpy.py
104104
new file mode 100644
105-
index 0000000..6561986
105+
index 0000000..b456846
106106
--- /dev/null
107107
+++ b/pip/_internal/utils/graalpy.py
108-
@@ -0,0 +1,219 @@
108+
@@ -0,0 +1,214 @@
109109
+# ATTENTION: GraalPy uses existence of this module to verify that it is
110110
+# running a patched pip in pip_hook.py
111111
+import os
@@ -149,14 +149,9 @@ index 0000000..6561986
149149
+ rule['patch'] = package_dir / rule['patch']
150150
+ self._repository[normalized_name] = metadata
151151
+
152-
+ def rule_applicable(self, rule):
153-
+ if not __graalpython__.use_system_toolchain and rule.get('ignore-rule-on-llvm'):
154-
+ return False
155-
+ return True
156-
+
157152
+ def get_rules(self, name):
158153
+ if metadata := self._repository.get(normalize_name(name)):
159-
+ return [rule for rule in metadata['rules'] if self.rule_applicable(rule)]
154+
+ return metadata['rules']
160155
+
161156
+ def get_add_sources(self, name):
162157
+ if metadata := self._repository.get(normalize_name(name)):

mx.graalpython/verify_patches.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
}
6161

6262
SECTIONS = frozenset({'rules', 'add-sources'})
63-
RULE_KEYS = frozenset({'version', 'patch', 'license', 'subdir', 'dist-type', 'install-priority', 'ignore-rule-on-llvm'})
63+
RULE_KEYS = frozenset({'version', 'patch', 'license', 'subdir', 'dist-type', 'install-priority'})
6464

6565

6666
def validate_metadata(package_dir, metadata):
@@ -93,8 +93,6 @@ def validate_metadata(package_dir, metadata):
9393
if version := rule.get('version'):
9494
# Just try that it doesn't raise
9595
SpecifierSet(version)
96-
if ignore_on_llvm := rule.get('ignore-rule-on-llvm'):
97-
assert isinstance(ignore_on_llvm, bool)
9896
for file in package_dir.iterdir():
9997
assert file.name == 'metadata.toml' or file in patches, f"Dangling file in patch directory: {file}"
10098
if add_sources := metadata.get('add-sources'):

0 commit comments

Comments
 (0)