all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Tanguy LE CARROUR <tanguy@bioneland.org>
To: 69997@debbugs.gnu.org, "Ludovic Courtès" <ludovic.courtes@inria.fr>
Cc: Munyoki Kilyungi <me@bonfacemunyoki.com>,
	Sharlatan Hellseher <sharlatanus@gmail.com>,
	Lars-Dominik Braun <lars@6xq.net>, jgart <jgart@dismail.de>,
	Marius Bakke <marius@gnu.org>
Subject: bug#69997: Should ‘guix import pypi’ get dependencies from pyproject files?
Date: Tue, 26 Mar 2024 08:54:17 +0100	[thread overview]
Message-ID: <171143965734.4362.8405481724513962855@bioneland.org> (raw)
In-Reply-To: <877chqtvsk.fsf@inria.fr>

Hi Ludo’,


Quoting Ludovic Courtès (2024-03-25 12:06:51)
> Should ‘guix import pypi’ attempt to get dependency information from
> ‘pyproject.toml’, in addition to ‘requirements.txt’ and wheel ‘METADATA’
> as it already does?
> 
> It might be more complicated than we’d like: in some cases, that file
> seems to be used as a “trampoline” to Poetry.  For instance, in
> python-pypugjs, the ‘requires’ bit delegates everything to Poetry:

Short answer: no! 😁

I’m pretty sure you know everything that I’m about to write, but better
say it out loud…

For a "standard modern" project managed with Poetry, the Python source
package contains `PKG-INFO` and `pyproject.toml ` that both contain
the run time dependencies. The wheel package only contains `METADATA` that
lists the dependencies. The source only contains a `pyproject.toml`.
To make the installed package as small as possible, tests files and
uncompiled assets are not (should not be) included.
From a Guix stand point, it’s better to build from source to be able to
run the test suite.

For the `python-pypugjs` you used as an example, we build from source,
so I guess the question does not arise. If we were to use the packages
available on PyPI, what I said above is *NOT* confirmed 😱:
- wheel (`.whl`) only contains `METADATA` with the dependencies; **BUT**
- source (`.tar.gz`) contains `PKG-INFO` (without dependency information),
  `pyproject.toml` (with dep’) and `setup.py` (also with dep’).

… "fun" fact, the information in `pyproject.toml` are **NOT** the same as
the one in `setup.py`!? 🤯 `pyproject.toml` says that `nose` is a run time
dependency (which it is not), but `setup.py` properly lists it in `tests_require`.

So, my answer would be: do not import from PyPI! Yes, I know, it’s radical! 😅
But if you have to, rely on the wheel’s `METADATA` file.

I hope this make sense. … I’m not really sure any more! 😅

Regards,

-- 
Tanguy




  parent reply	other threads:[~2024-03-26 13:46 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-25 11:06 bug#69997: Should ‘guix import pypi’ get dependencies from pyproject files? Ludovic Courtès
2024-03-25 19:28 ` Sharlatan Hellseher
2024-03-26  7:54 ` Tanguy LE CARROUR [this message]
2024-03-26 16:04   ` Ludovic Courtès
2024-03-26 16:55     ` Tanguy LE CARROUR
2024-03-26 17:14       ` Tanguy LE CARROUR
2024-03-28 18:09       ` Ludovic Courtès
2024-03-29  7:46         ` Tanguy LE CARROUR
2024-03-29  9:06           ` Ludovic Courtès
2024-03-29 10:11             ` Tanguy LE CARROUR
2024-03-27  6:49 ` 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=171143965734.4362.8405481724513962855@bioneland.org \
    --to=tanguy@bioneland.org \
    --cc=69997@debbugs.gnu.org \
    --cc=jgart@dismail.de \
    --cc=lars@6xq.net \
    --cc=ludovic.courtes@inria.fr \
    --cc=marius@gnu.org \
    --cc=me@bonfacemunyoki.com \
    --cc=sharlatanus@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.