Github messages for voidlinux
 help / color / mirror / Atom feed
From: sgn <sgn@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] kore: fix build for Python 3.11 (not ready yet)
Date: Thu, 22 Sep 2022 12:20:22 +0200	[thread overview]
Message-ID: <20220922102022.mHU3GkesOp7rtBmthCFuZUGiVP_4wLW2_bMG5E7quV0@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-39413@inbox.vuxu.org>

[-- Attachment #1: Type: text/plain, Size: 1264 bytes --]

There is an updated 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: 2734 bytes --]

From 1ce54dc6cbeb986dcaba9517f81721ab856bac9e 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 | 35 ++++++++++++++++++++++++++
 srcpkgs/kore/template                  | 12 +++------
 2 files changed, 39 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..8dce13b7bd4d
--- /dev/null
+++ b/srcpkgs/kore/patches/python-3.11.patch
@@ -0,0 +1,35 @@
+diff --git a/src/python.c b/src/python.c
+index ab0f3c6..526d443 100644
+--- a/src/python.c
++++ b/src/python.c
+@@ -1192,8 +1192,14 @@ python_coro_trace(const char *label, struct python_coro *coro)
+ 
+ 	gen = (PyGenObject *)coro->obj;
+ 
+-	if (gen->gi_frame != NULL && gen->gi_frame->f_code != NULL) {
+-		code = gen->gi_frame->f_code;
++#if PY_VERSION_HEX <= 0x030B0000
++	code = NULL;
++	if (gen->gi_frame != NULL)
++		code = gen->gi_frame->f_code
++#else
++	code = gen->gi_code;
++#endif
++	if (code != NULL) {
+ 		func = PyUnicode_AsUTF8AndSize(code->co_name, NULL);
+ 		file = PyUnicode_AsUTF8AndSize(code->co_filename, NULL);
+ 
+@@ -1206,8 +1206,13 @@ python_coro_trace(const char *label, struct python_coro *coro)
+ 		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..ab8893bf8a09 100644
--- a/srcpkgs/kore/template
+++ b/srcpkgs/kore/template
@@ -6,9 +6,10 @@ revision=1
 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"
-makedepends="openssl-devel libcurl-devel postgresql-libs-devel yajl-devel"
+make_build_args="CURL=1 TASKS=1 PGSQL=1 JSONRPC=1 ACME=1 PYTHON=1"
+hostmakedepends="postgresql-libs-devel python3"
+makedepends="openssl-devel libcurl-devel postgresql-libs-devel yajl-devel
+ python3-devel"
 short_desc="Easy to use web platform for writing scalable web APIs in C"
 maintainer="Helmut Pozimski <helmut@pozimski.eu>"
 license="ISC"
@@ -23,11 +24,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
 }

  parent reply	other threads:[~2022-09-22 10:20 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-22  1:06 [PR PATCH] " sgn
2022-09-22  1:08 ` [PR PATCH] [Updated] " sgn
2022-09-22  8:24 ` sgn
2022-09-22 10:20 ` sgn [this message]
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=20220922102022.mHU3GkesOp7rtBmthCFuZUGiVP_4wLW2_bMG5E7quV0@z \
    --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).