all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Marius Bakke <marius@gnu.org>
To: Zelphir Kaltstahl <zelphirkaltstahl@posteo.de>,
	help-guix <help-guix@gnu.org>
Subject: Re: Profiles for Python projects
Date: Fri, 19 Jun 2020 00:22:09 +0200	[thread overview]
Message-ID: <875zbodnfy.fsf@gnu.org> (raw)
In-Reply-To: <c1bca050-f209-0297-5b00-d736b2794a60@posteo.de>

[-- Attachment #1: Type: text/plain, Size: 1016 bytes --]

Hi Zelphir,

Zelphir Kaltstahl <zelphirkaltstahl@posteo.de> writes:

> I create a profile with that and it works fine:
>
> guix package --manifest="manifest.scm" --profile="${GUIX_EXTRA_PROFILES}"/my-env/my-env
>
> Then I do the sourcing:
>
> GUIX_PROFILE="${GUIX_EXTRA_PROFILES}/my-env/my-env"; source "${GUIX_PROFILE}/etc/profile"

[...]

> I also get a path in the profile I created. So far all seems to just
> work. However, then I hit a snag when trying to run the tests of the
> project:
>
> LOG_LEVEL="DEBUG" PYTHONPATH="$(pwd)/my_project" python3 -m pytest -m "my_test_marker" -s -vvv
>
> I now get the error:
>
> No module named pytest

This is because you are overriding PYTHONPATH.  If you run it as ...

  LOG_LEVEL="DEBUG" PYTHONPATH="$(pwd)/my_project:$PYTHONPATH" python3 -m pytest -m "my_test_marker" -s -vvv

... you might have better luck.  Guix relies on PYTHONPATH to make
Python modules available because there is no single site-packages
directory like in some other distributions.

HTH!
Marius

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

  reply	other threads:[~2020-06-18 22:22 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-18 16:53 Profiles for Python projects Zelphir Kaltstahl
2020-06-18 22:22 ` Marius Bakke [this message]
2020-06-19  9:04   ` Zelphir Kaltstahl

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=875zbodnfy.fsf@gnu.org \
    --to=marius@gnu.org \
    --cc=help-guix@gnu.org \
    --cc=zelphirkaltstahl@posteo.de \
    /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.