From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v2 2/2] python3: Bump version to 3.6.0
Date: Wed, 22 Mar 2017 08:56:44 +0100 [thread overview]
Message-ID: <20170322085644.516eecfc@free-electrons.com> (raw)
In-Reply-To: <CAHQ1cqFB2UnahiSC_hL7Enu1L2jtNV7ZGQt7AKMLzCU9tyKwgw@mail.gmail.com>
Hello,
On Tue, 21 Mar 2017 17:49:06 -0700, Andrey Smirnov wrote:
> > To be honest, I find it really annoying that we have to do this to find
> > the name of the sysconfigdata package. I've thought about the following:
> >
> > - Have the Python build system output somewhere the name of the
> > sysconfigdata module that has been generated.
> >
>
> Sure, you can do that, but that would mean another custom patch
> against CPython's build system which is very likely to break and
> require manual intervention next time there's at least a major version
> update. After going through all of BR's patches in the process of
> rebasing on 3.6 and having to manually fix at least half of them I
> didn't want to make the problem worse, so that's why I didn't go that
> route.
OK, makes sense. It's always a matter of tradeoff anyway.
> I don't think this would work. CPython's build system does not use
> -dumpmachine output directly to come up with that suffix and instead
> relies on specially crafted dummy .c file and CPP:
>
> https://github.com/python/cpython/blob/master/configure.ac#L762
>
> So for example on my target -dumpmachine would result in
> "powerpc-e500v2-linux-gnuspe", where as suffix of sysconfigdata would
> be "powerpc-linux-gnuspe".
OK, in this case indeed your approach is the best option I'd say.
> > Why are all patches you have changed now re-assigned with your From?
> > You should preserve the authorship of the original author.
> >
>
> Because I manually applied those patches and committed them in my
> local CPython repo and didn't go out of my way to prevent "From" from
> being set to committer when I git format-patch'ed them, since the
> authorship/copyright information is preserved in "Signed-off-by"
> lines. Will change in v3.
Since all patches are Git formatted, you can (and should) apply them
with "git am" which will preserve all this information automatically.
> >> # Provided to other packages
> >> -PYTHON3_PATH = $(TARGET_DIR)/usr/lib/python$(PYTHON3_VERSION_MAJOR)/sysconfigdata/:$(TARGET_DIR)/usr/lib/python$(PYTHON3_VERSION_MAJOR)/site-packages/
> >> +PYTHON3_PATH = $(TARGET_DIR)/usr/lib/python$(PYTHON3_VERSION_MAJOR)/:$(TARGET_DIR)/usr/lib/python$(PYTHON3_VERSION_MAJOR)/site-packages/
> >
> > Why do we now need
> > $(TARGET_DIR)/usr/lib/python$(PYTHON3_VERSION_MAJOR)/ ?
>
> Because that's where _sysconfigdata_m_linux_*.pyc file is located.
OK. I thought "but isn't this in the default Python search path", but
in fact it's going to be in the default search path on the target, but
not when cross-compiling. So: OK.
Thanks for all those explanations!
Best regards,
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
next prev parent reply other threads:[~2017-03-22 7:56 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-14 23:42 [Buildroot] [PATCH v2 1/2] scripts/pycompile: Accomodate latest Python 3 codebase Andrey Smirnov
2017-03-14 23:42 ` [Buildroot] [PATCH v2 2/2] python3: Bump version to 3.6.0 Andrey Smirnov
2017-03-19 14:53 ` Thomas Petazzoni
2017-03-22 0:49 ` Andrey Smirnov
2017-03-22 7:56 ` Thomas Petazzoni [this message]
2017-03-19 14:53 ` [Buildroot] [PATCH v2 1/2] scripts/pycompile: Accomodate latest Python 3 codebase Thomas Petazzoni
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=20170322085644.516eecfc@free-electrons.com \
--to=thomas.petazzoni@free-electrons.com \
--cc=buildroot@busybox.net \
/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