[email protected] (宋文武) writes: >> [...] > > I packaged python-hy, and it does find all depends without propagations. > In its output, the trick is done by ‘python-hy-0.11.1.pth’ and ‘site.py’. > > After read: > <https://docs.python.org/2/library/site.html> > <http://stackoverflow.com/questions/15208615/using-pth-files> > > I try: > $ mkdir -p /tmp/o > $ mkdir -p /tmp/a > $ echo /tmp/a > /tmp/o/x.pth > $ cat > /tmp/o/sitecustomize.py << EOF >> import os, site >> dir = os.path.dirname(os.path.abspath(__fil__)) >> site.addsitedir(dir) >> EOF > $ PYTHONPATH=/tmp/o python3 -c 'import sys; print(sys.path) > And ‘/tmp/a’ is at the end of the list. > > So, I think if we get all the pth files correct, no need to use > propagate-inputs :-) Oops, I’m naive. Be able to handle indirect inputs, pth files should be loaded recursively. And this was the way in nixpkgs [1], but deprecated now [2].
It’s safe to ignore me :-) [1] https://github.com/NixOS/nixpkgs/pull/258 [2] https://github.com/NixOS/nixpkgs/pull/11086
