unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Lars-Dominik Braun <lars@6xq.net>
To: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Cc: 46848@debbugs.gnu.org
Subject: [bug#46848] [PATCHES] [core-updates] PEP 517 python-build-system
Date: Sun, 23 Jan 2022 11:21:17 +0100	[thread overview]
Message-ID: <Ye0sHWa6/LM4uHuT@noor.fritz.box> (raw)
In-Reply-To: <87ee4z6mv5.fsf@gmail.com>

Hi Maxim,

> Here's a review of patches 1 to 6.

thanks for the review. Unfortunately this is not the most recent
proposal and I have no way to retract the previous patches. I pushed v3
to the wip-python-pep517 branch, because of the sheer number of patches
and so the CI could build it (since it requires a rebuild of the entire
rust bootstrap chain).

> > +        ;; Prefer pytest
> > +        ;; XXX: support nose
> 
> You can remove this; nose is stale/deprecated.

So it’s preferred to replace 'check in cases where python-nose is
still in use?

> 
> > +        (cond
> > +          (pytest
> > +            (begin
> > +              (format #t "using pytest~%")
> > +              (invoke pytest "-vv"))) ; XXX: support skipping tests based on name/extra arguments?
> 
> We could have a #:test-command argument to specify an arbitrary command
> as a list of strings, such as used by the emacs-build-system; that'd
> allow us to avoid overriding the phase just to add a '-k "not
> this-test"' or similar.

I added #:test-flags in my v3 proposal.

> > +          ;; But fall back to setup.py, which should work for most
> > +          ;; packages. XXX: would be nice not to depend on setup.py here? fails
> > +          ;; more often than not to find any tests at all. Maybe we can run
> > +          ;; `python -m unittest`?
> > +          (have-setup-py
> > +            (begin
> > +              (format #t "using setup.py~%")
> > +                (invoke "python" "setup.py" "test" "-v")))
> 
> As Marius noted, falling back to 'python setup.py test' is not
> desirable; it's scheduled to be removed already.

Sure, but using `python -m unittest` instead requires some investigation.

> > +    (define (move-script source destination)
> > +      "Move executable script file from .data/scripts to out/bin and replace
> > +temporary hashbang"
> > +	  (move-data source destination)
> > +      ;; ZIP does not save/restore permissions, make executable
> > +      ;; XXX: might not be a file, but directory with subdirectories
> > +      (chmod destination #o755)
> > +      (substitute* destination (("#!python") python-hashbang)))
> 
> It seems the directory case should be handled?  Otherwise the
> substitute* call would error out upon encountering it.

I have not seen anyone using subdirectories in bin/ yet. Is that
supported anywhere?

> So, IIUC, this complicated install phase is because we no longer take
> 'pip' for granted and is only later available, built from this very
> build system, right?  Otherwise installing a wheel with pip would be
> trivial (c.f. python-isort).

If we want to bootstrap these two packages easily (and possibly start
unvendoring their vendored dependencies later), they cannot be part of
this build system and thus we need to implement building/installing
ourselves. I tried using pypa-build in an earlier version, but the
bootstrap chain is unmaintainable.

There also is a project called installer[1], but it does not have a
CLI yet.

Cheers,
Lars

[1] https://github.com/pradyunsg/installer





      reply	other threads:[~2022-01-23 10:22 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
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 [this message]

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

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Ye0sHWa6/LM4uHuT@noor.fritz.box \
    --to=lars@6xq.net \
    --cc=46848@debbugs.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 public inbox

	https://git.savannah.gnu.org/cgit/guix.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).