all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Hartmut Goebel <h.goebel@crazy-compilers.com>
To: guix-devel@gnu.org
Subject: Language library packages should require language package
Date: Sun, 24 Apr 2016 14:24:52 +0200	[thread overview]
Message-ID: <571CBB14.8090200@crazy-compilers.com> (raw)

Hi,

playing around with guix environment, I stepped over some weirdness The
weirdest of is (e.g.):

guix environment  --ad-hoc python-requests

will give you . . . . nothing.

Since python-requests does not have python as input, the package is
installed somewhere out of reach. This is even true when using a python
virtualenv prior to entering the guix environment (see below for details).

I assume, this is the same for perl and other languages.

So I propose to add python, perl, ... as an import for the "library"
packages of this language. This would be in the same line as .rpm and
.deb packages work.


Now the weirdness analysis:

$ cat echo_paths.sh
echo PATH=$PATH
echo PYTHONPATH=$PYTHONPATH
type python

Now let's set up "--ad-hoc python-requests" (but no python):

$ guix environment --pure --ad-hoc python-requests -- ./echo_paths.sh
PATH=/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin:.
PYTHONPATH=
python is /usr/bin/python

Wow, the system python is used, but where is python-requests? Maybe not
installed, since it already is in the system installation. Let's try a
virtual environment:

$ pyvenv /tmp/foo
$ source /tmp/foo/bin/activate
(foo)$ type python
python ist /tmp/foo/bin/python

(foo)$ guix environment --pure --ad-hoc python-requests -- ./echo_paths.sh
PATH=/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin:.
PYTHONPATH=
python is /usr/bin/python

Huh? What? The virtual env was ignored (or dropped). Why this? Looks
like --pure resets the environment to something is thinks is correct,
even if if ist not adding anything to the environments.

Let's try without --pure:

(foo)$ guix environment  --ad-hoc python-requests -- ./echo_paths.sh
PATH=/tmp/foo/bin:/usr/local/bin:/usr/bin:/usr/local/games:/usr/games:/usr/lib64/qt4/bin:/usr/lib64/qt5/bin:/home/hartmut/bin:/home/hartmut/.local/bin
PYTHONPATH=/home/hartmut/lib/python
python is /tmp/foo/bin/python

Okay, this time I get the python within the virtual env. But still:
where is python-requests?

(foo)$ guix environment  --ad-hoc python-requests -- ls
/tmp/foo/lib/python3.4/site-packages/
easy_install.py  pip                  pkg_resources.py  setuptools
_markerlib       pip-6.1.1.dist-info  __pycache__      
setuptools-3.6.dist-info

It is not installed in the virtual environment either. Where is it?

-- 
Regards
Hartmut Goebel

| Hartmut Goebel          | h.goebel@crazy-compilers.com               |
| www.crazy-compilers.com | compilers which you thought are impossible |

             reply	other threads:[~2016-04-24 12:24 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-24 12:24 Hartmut Goebel [this message]
2016-04-24 13:09 ` Language library packages should require language package Thompson, David
2016-04-24 13:58   ` Hartmut Goebel
2016-04-24 22:07     ` Ludovic Courtès
2016-04-24 13:17 ` Thompson, David

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=571CBB14.8090200@crazy-compilers.com \
    --to=h.goebel@crazy-compilers.com \
    --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.