Github messages for voidlinux
 help / color / mirror / Atom feed
From: ahesford <ahesford@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR REVIEW] [RFC] create build_helper for python3 cross-building
Date: Thu, 25 Aug 2022 21:46:05 +0200	[thread overview]
Message-ID: <20220825194605.RVti9D7l7-Zbv1x6UIgJffzyedYGLx1jj1NvbaWryKk@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-38911@inbox.vuxu.org>

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

New review comment by ahesford on void-packages repository

https://github.com/void-linux/void-packages/pull/38911#discussion_r955356365

Comment:
```suggestion
	for f in ${XBPS_CROSS_BASE}/${py3_lib}/_sysconfigdata_*; do
		[ -f "$f" ] || continue
		f=${f##*/}
		_PYTHON_SYSCONFIGDATA_NAME=${f%.py}
	done
	[ -n "$_PYTHON_SYSCONFIGDATA_NAME" ] && export _PYTHON_SYSCONFIGDATA_NAME
```
This loop has always kind of bugged me. I've always wondered whether we should break after the first match or continue looping to pick the last match. (In practice, there is probably only one, so it shouldn't matter, but still...)

Without taking a position on that matter, let's at least confirm the file exists to avoid picking up a null match and make sure we picked something before exporting it.

  reply	other threads:[~2022-08-25 19:46 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-25 19:30 [PR PATCH] " classabbyamp
2022-08-25 19:46 ` ahesford [this message]
2022-08-25 20:14 ` [PR PATCH] [Updated] " classabbyamp
2022-08-25 20:52 ` classabbyamp
2022-08-26  5:37 ` classabbyamp
2022-08-26  7:50 ` [PR REVIEW] " classabbyamp
2022-08-29  5:32 ` classabbyamp
2022-08-29 11:10 ` ahesford
2022-08-30  3:25 ` [PR PATCH] [Merged]: " classabbyamp

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=20220825194605.RVti9D7l7-Zbv1x6UIgJffzyedYGLx1jj1NvbaWryKk@z \
    --to=ahesford@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).