Skip to content

Commit 8446c88

Browse files
committed
regex: Add windows patch.
1 parent 69ee9f0 commit 8446c88

File tree

3 files changed

+59
-0
lines changed

3 files changed

+59
-0
lines changed

packages/np311-windows/regex/build.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import __np__
2+
import glob
3+
import shutil
4+
import sys
5+
import os
6+
import setuptools.build_meta
7+
8+
9+
def run(wheel_directory):
10+
__np__.setup_compiler_env()
11+
12+
__np__.run_build_tool_exe("patch", "patch.exe", "-p1", "-ui",
13+
os.path.join(os.path.dirname(__file__), "regex-static-patch.patch"))
14+
15+
__np__.run_with_output(sys.executable, "-m", "pip", "wheel", ".", "--verbose")
16+
17+
wheel_location = glob.glob("regex-*.whl")[0]
18+
wheel_name = os.path.basename(wheel_location)
19+
shutil.copy(wheel_location, os.path.join(wheel_directory, wheel_name))
20+
return os.path.join(wheel_directory, wheel_name)
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"scripts": [
3+
{
4+
"metadata": {
5+
"Version": "*"
6+
},
7+
"build_tools": [
8+
"patch"
9+
],
10+
"dependencies": [],
11+
"files": [
12+
"build.py",
13+
"regex-static-patch.patch"
14+
],
15+
"requires": [
16+
"setuptools"
17+
],
18+
"build_script": "build.py"
19+
}
20+
]
21+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
Subject: [PATCH] a
2+
---
3+
Index: regex_3/_regex_unicode.h
4+
IDEA additional info:
5+
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
6+
<+>UTF-8
7+
===================================================================
8+
diff --git a/regex_3/_regex_unicode.h b/regex_3/_regex_unicode.h
9+
--- a/regex_3/_regex_unicode.h (revision 8ced3047298b1824c1c741183013cd6c1ff3fd07)
10+
+++ b/regex_3/_regex_unicode.h (date 1743642412321)
11+
@@ -5,7 +5,6 @@
12+
typedef unsigned int RE_UINT32;
13+
typedef signed int RE_INT32;
14+
15+
-typedef unsigned char BOOL;
16+
#if !defined(FALSE) || !defined(TRUE)
17+
#define FALSE 0
18+
#define TRUE 1

0 commit comments

Comments
 (0)