From: Lars-Dominik Braun <lars@6xq.net>
To: Marius Bakke <marius@gnu.org>
Cc: 46848@debbugs.gnu.org, Maxim Cournoyer <maxim.cournoyer@gmail.com>
Subject: [bug#46848] [PATCHES] [core-updates] PEP 517 python-build-system
Date: Thu, 20 Jan 2022 19:43:24 +0100 [thread overview]
Message-ID: <YemtTA5nsPjVXu5L@noor.fritz.box> (raw)
In-Reply-To: <877daubeju.fsf@gnu.org>
Hi Marius,
> Can you elaborate on the name clash issue?
the problem seems to be that most packages do not put the source code
into a subdirectory in the sdist. I.e. package foobar will have a foobar/
directory, instead of src/foobar. Thus Python tries to load the module
foobar.barbaz from that directory, instead of the store. Thus it’ll
also look there for C extensions and fail. I don’t know why it does
that, even when *not* using `python -m` – according to the documentation
it should not. If anyone has any pointers I’d like to have a look again.
> Unfortunately we need Python 2 for some time still. It is used to
> bootstrap old versions of GHC, Node, and probably other things.
But as far as I see these specific examples do not use
python-build-system. Only if some package using `#:python python-2` is
required during bootstrapping, then we’d need a way to support Python
2, right?
> Do you think it is feasible to provide this as a new build system, say
> pep517-build-system, during a transitional period? Then we can a) start
> using it right away for the increasing amount of packages that lack a
> setup.py; and b) flesh out most bugs before eventually merging it back
> (possibly piecemeal) into python-build-system.
Actually, I think that’s a good idea. I tried, but I cannot fix all
packages broken by this change on my own, so smoothing the transition
could help and – as you said – we could catch bugs early on.
I could prepare a patch, if there is interest in this path.
> * Zipping a wheel just to unpack it afterwards is weird, but there seems
> to be no way around it.
Indeed, that’s how PEP 517 works, which always builds a wheel
(i.e. ZIP file).
> * I also think trying "python setup.py test" is unnecessary.
It still works quite often, although its usefulness will decrease in
the future I guess. Another problem I see is that this command will not
fail if there are no tests.
> * It would be nice to support the "no tests" case without having to add
> explicit #:tests? everywhere. Perhaps along the lines of...
My idea was to force packagers to make and explain this decision
explicitly. If you don’t run tests, you have to add `#:tests? #f`
and leave a comment why they are disabled. I do see this could become
a hassle with packages that simply don’t have any tests. But my hope
is that it increases package quality.
> (_ (apply invoke `("python" "-m" "unittest" ,@test-flags))))))
If I remember correctly I tried this and it did not work for some
reason. I’ll have a look again.
Cheers,
Lars
next prev parent reply other threads:[~2022-01-20 22:43 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-01 13:43 [bug#46848] [PATCHES] [core-updates] PEP 517 python-build-system Lars-Dominik Braun
2021-05-15 9:31 ` Lars-Dominik Braun
2021-12-13 20:10 ` Lars-Dominik Braun
2022-01-05 14:51 ` Lars-Dominik Braun
2022-01-20 15:41 ` Marius Bakke
2022-01-20 18:43 ` Lars-Dominik Braun [this message]
2022-01-20 20:43 ` Marius Bakke
2023-01-11 15:41 ` Maxim Cournoyer
2023-02-10 10:13 ` bug#46848: " Lars-Dominik Braun
2022-02-26 14:10 ` [bug#46848] " Maxim Cournoyer
2022-02-28 19:25 ` Lars-Dominik Braun
2022-02-28 22:32 ` Maxim Cournoyer
2022-04-24 9:13 ` Lars-Dominik Braun
2022-04-24 9:22 ` Lars-Dominik Braun
2022-01-23 5:29 ` Maxim Cournoyer
2022-01-23 10:21 ` Lars-Dominik Braun
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=YemtTA5nsPjVXu5L@noor.fritz.box \
--to=lars@6xq.net \
--cc=46848@debbugs.gnu.org \
--cc=marius@gnu.org \
--cc=maxim.cournoyer@gmail.com \
/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.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.