commit b8b00cf

hovercats  ·  2024-05-02 15:44:21 +0000 UTC
parent a2ee90a
python-installer: make patch more consistent
4 files changed,  +14, -3
+1, -1
1@@ -4,7 +4,7 @@ sitedir="$(python3 -c 'import site;print(site.getsitepackages()[0])')"
2 
3 unzip -d build "installer-$2-py3-none-any.whl"
4 
5-(cd build; patch -p1 < default-bytecode-levels.patch)
6+(cd build; patch -p1 < 0001-change-default-opt-level-to-0.patch)
7 
8 mkdir -p "$1/$sitedir"
9 cp -pR build/installer* "$1/$sitedir"
+1, -1
1@@ -1,2 +1,2 @@
2 72790531eb73009974eca65759a7088ed1398cd009b85e5a243d1ea22102179bbc
3-8d93b38e8b441cfac476787bd834230c9dfb59f23ab6a4927ea127e07ad0a2543a
4+12971633a15e3d58102979f0a74a816dbad9ecd758d9e3a2cbc441183e08ad05bc
R repo/python-installer/patches/default-bytecode-levels.patch => repo/python-installer/patches/0001-change-default-opt-level-to-0.patch
+11, -0
 1@@ -1,6 +1,14 @@
 2+From c2e5ba5e5b0a2bfba13272b96ddf9d2522f178ed Mon Sep 17 00:00:00 2001
 3+From: ptrcnull <git@ptrcnull.me>
 4+Date: Fri, 17 Nov 2023 19:19:19 +0100
 5+Subject: [PATCH] change default opt level to 0
 6+
 7 the previous default of 0, 1 causes opt-1 bytecode to also be generated,
 8 which is not used without passing `-O` to `python3` anyway, and doubles
 9 the size of the resulting package
10+---
11+ installer/__main__.py | 4 ++--
12+ 1 file changed, 2 insertions(+), 2 deletions(-)
13 
14 diff --git a/installer/__main__.py b/installer/__main__.py
15 index 51014b9..2a389e8 100644
16@@ -24,3 +32,6 @@ index 51014b9..2a389e8 100644
17  
18      with WheelFile.open(args.wheel) as source:
19          destination = SchemeDictionaryDestination(
20+-- 
21+2.44.0
22+
+1, -1
1@@ -1,2 +1,2 @@
2 https://files.pythonhosted.org/packages/py3/i/installer/installer-0.7.0-py3-none-any.whl
3-patches/default-bytecode-levels.patch build
4+patches/0001-change-default-opt-level-to-0.patch