aports/community/py3-rencode/change-default-compile-args.patch
mio 96fc575d74 community/py3-rencode: upgrade to 1.0.8, build with gpep517
https://github.com/aresch/rencode/releases/tag/v1.0.8
https://github.com/aresch/rencode/releases/tag/v1.0.7

1.0.7 introduced a new build file for the cython extension and
`pyproject.toml` which replaced `setup.py`. Switch to build with gpep517
accordingly.

Upgrade resolves cython build error.

```
Error compiling Cython file:
------------------------------------------------------------
...
cdef object MAX_SIGNED_LONGLONG = int(2**63)
cdef object MIN_SIGNED_LONGLONG = -MAX_SIGNED_LONGLONG

cdef encode(char **buf, unsigned int *pos, data):
    t = type(data)
    if t == int or t == long:
                        ^
------------------------------------------------------------

rencode/rencode.pyx:278:24: undeclared name not builtin: long
Compiling rencode/rencode.pyx because it changed.
[1/1] Cythonizing rencode/rencode.pyx
Traceback (most recent call last):
  File "/home/buildozer/aports/community/py3-rencode/src/rencode-1.0.6/setup.py", line 53, in <module>
    ext_modules = cythonize(ext_modules)
                  ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/Cython/Build/Dependencies.py", line 1150, in cythonize
    cythonize_one(*args)
  File "/usr/lib/python3.12/site-packages/Cython/Build/Dependencies.py", line 1294, in cythonize_one
    raise CompileError(None, pyx_file)
Cython.Compiler.Errors.CompileError: rencode/rencode.pyx
```
2025-11-06 16:03:26 +00:00

26 lines
749 B
Diff

Patch-Source: https://github.com/aresch/rencode/commit/e7ec8ea718e73a8fee7dbc007c262e1584f7f94b
Backported for 1.0.8.
---
From e7ec8ea718e73a8fee7dbc007c262e1584f7f94b Mon Sep 17 00:00:00 2001
From: Andrew Resch <andrewresch@gmail.com>
Date: Sun, 22 Jun 2025 09:50:26 -0700
Subject: [PATCH] Change default COMPILE_ARGS to just '-O3'
---
build.py | 3 ---
1 file changed, 3 deletions(-)
diff --git a/build.py b/build.py
index 64dc979..be03ada 100644
--- a/build.py
+++ b/build.py
@@ -11,7 +11,7 @@
from setuptools.command.build_ext import build_ext
-COMPILE_ARGS = ["-march=native", "-O3", "-msse", "-msse2", "-mfma", "-mfpmath=sse"]
+COMPILE_ARGS = ["-O3"]
LINK_ARGS: list[str] = []
INCLUDE_DIRS: list[str] = []
LIBRARIES: list[str] = []