guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

python importers as an alternative to propagated-inputs


From: Justin Veilleux
Subject: python importers as an alternative to propagated-inputs
Date: Mon, 08 Jan 2024 00:55:25 -0500

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 via email to

[Prev in Thread] Current Thread [Next in Thread]