all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Justin Veilleux <terramorpha@cock.li>
To: guix-devel@gnu.org
Subject: python importers as an alternative to propagated-inputs
Date: Mon, 08 Jan 2024 00:55:25 -0500	[thread overview]
Message-ID: <87mstgz7w2.fsf@cock.li> (raw)


Hi everyone. I was thinking about the propagated-inputs field in package
definitions. As I understand it, it is useful as a way to replace RPATHs
in packages that aren't compiled or don't support them.

I was reading the documentation on
https://docs.python.org/3/reference/import.html. It looks like we can
define custom objects to do module resolution, possibly bypassing
PYTHON_PATH lookup. I think it would be possible to write a very simple
importer object that looks up module paths from an environment variable
that looks like this:

PYTHON_GUIX_MODULE_PATH=numpy=/gnu/store/...,pandas=/gnu/store/...

This would make propagated-inputs for python libraries and programs
unnecessary.

Does someone know if this has been tried before? What potential problems
would I encounter if I tried to implement this?


Cheers.


             reply	other threads:[~2024-01-08 13:04 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-08  5:55 Justin Veilleux [this message]
2024-01-08 15:39 ` python importers as an alternative to propagated-inputs Ricardo Wurmus

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=87mstgz7w2.fsf@cock.li \
    --to=terramorpha@cock.li \
    --cc=guix-devel@gnu.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.
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.