[Top][All Lists]

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

Re: Profiles for Python projects

From: Zelphir Kaltstahl
Subject: Re: Profiles for Python projects
Date: Fri, 19 Jun 2020 11:04:00 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Icedove/68.8.0

Hi Marius!

That makes sense! I guess the GUIX Python packages are each in their own
location, so GUIX has to do this. I did not pay enough attention to the

… testing right now …

And it works! Thanks!


On 19.06.20 00:22, Marius Bakke wrote:
> Hi Zelphir,
> Zelphir Kaltstahl <> 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

reply via email to

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