From: sgn <sgn@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: [PR PATCH] kore: fix build for Python 3.11 (not ready yet)
Date: Thu, 22 Sep 2022 03:06:42 +0200 [thread overview]
Message-ID: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-39413@inbox.vuxu.org> (raw)
[-- Attachment #1: Type: text/plain, Size: 1259 bytes --]
There is a new pull request by sgn against master on the void-packages repository
https://github.com/sgn/void-packages kore-python-3.11
https://github.com/void-linux/void-packages/pull/39413
kore: fix build for Python 3.11 (not ready yet)
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **NO**
<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->
<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
- aarch64-musl
- armv7l
- armv6l-musl
-->
A patch file from https://github.com/void-linux/void-packages/pull/39413.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-kore-python-3.11-39413.patch --]
[-- Type: text/x-diff, Size: 2694 bytes --]
From 7c02d091329ae171486a37d38b18257dd131d32b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
<congdanhqx@gmail.com>
Date: Thu, 22 Sep 2022 07:55:02 +0700
Subject: [PATCH] kore: fix build for Python 3.11 (not ready yet)
---
srcpkgs/kore/patches/python-3.11.patch | 38 ++++++++++++++++++++++++++
srcpkgs/kore/template | 11 ++------
2 files changed, 41 insertions(+), 8 deletions(-)
create mode 100644 srcpkgs/kore/patches/python-3.11.patch
diff --git a/srcpkgs/kore/patches/python-3.11.patch b/srcpkgs/kore/patches/python-3.11.patch
new file mode 100644
index 000000000000..8fbd080a3f9e
--- /dev/null
+++ b/srcpkgs/kore/patches/python-3.11.patch
@@ -0,0 +1,38 @@
+--- a/src/python.c
++++ b/src/python.c
+@@ -55,6 +55,10 @@
+
+ #include <frameobject.h>
+
++#if PY_VERSION_HEX >= 0x030B0000
++#include <internal/pycore_frame.h>
++#endif
++
+ #if PY_VERSION_HEX < 0x030A0000
+ typedef enum {
+ PYGEN_RETURN = 0,
+@@ -1192,8 +1196,8 @@ python_coro_trace(const char *label, str
+
+ gen = (PyGenObject *)coro->obj;
+
+- if (gen->gi_frame != NULL && gen->gi_frame->f_code != NULL) {
+- code = gen->gi_frame->f_code;
++ code = gen->gi_code;
++ if (code != NULL) {
+ func = PyUnicode_AsUTF8AndSize(code->co_name, NULL);
+ file = PyUnicode_AsUTF8AndSize(code->co_filename, NULL);
+
+@@ -1206,8 +1210,13 @@ python_coro_trace(const char *label, str
+ fname = "unknown";
+ }
+
++#if PY_VERSION_HEX <= 0x030B0000
+ if (gen->gi_frame != NULL)
+ line = PyFrame_GetLineNumber(gen->gi_frame);
++#else
++ if (code != NULL)
++ line = PyCode_Addr2Line(code, 0);
++#endif
+ else
+ line = -1;
+
diff --git a/srcpkgs/kore/template b/srcpkgs/kore/template
index 715f92118e9d..635b52ba53c8 100644
--- a/srcpkgs/kore/template
+++ b/srcpkgs/kore/template
@@ -1,13 +1,13 @@
# Template file for 'kore'
pkgname=kore
version=4.2.3
-revision=1
+revision=2
# arch specific seccomp stuff
archs="x86_64* aarch64* ppc64*"
build_style=gnu-makefile
make_use_env=yes
-make_build_args="CURL=1 TASKS=1 PGSQL=1 JSONRPC=1 ACME=1"
-hostmakedepends="postgresql-libs-devel"
+make_build_args="CURL=1 TASKS=1 PGSQL=1 JSONRPC=1 ACME=1 PYTHON=1"
+hostmakedepends="postgresql-libs-devel python3-devel"
makedepends="openssl-devel libcurl-devel postgresql-libs-devel yajl-devel"
short_desc="Easy to use web platform for writing scalable web APIs in C"
maintainer="Helmut Pozimski <helmut@pozimski.eu>"
@@ -23,11 +23,6 @@ if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
makedepends+=" musl-legacy-compat"
fi
-if [ -z "$CROSS_BUILD" ]; then
- makedepends+=" python3-devel"
- make_build_args+=" PYTHON=1"
-fi
-
post_install() {
vlicense LICENSE
}
next reply other threads:[~2022-09-22 1:06 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-22 1:06 sgn [this message]
2022-09-22 1:08 ` [PR PATCH] [Updated] " sgn
2022-09-22 8:24 ` sgn
2022-09-22 10:20 ` sgn
2022-09-22 10:51 ` [PR REVIEW] " ahesford
2022-09-22 10:55 ` [PR PATCH] [Updated] " sgn
2022-09-22 11:02 ` sgn
2022-09-22 13:49 ` [PR REVIEW] " ahesford
2022-09-26 14:18 ` sgn
2022-09-26 14:18 ` [PR PATCH] [Closed]: " sgn
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-39413@inbox.vuxu.org \
--to=sgn@users.noreply.github.com \
--cc=ml@inbox.vuxu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).