help-guix
[Top][All Lists]
Advanced

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

Re: Setting up a python environment


From: Roy Lemmon
Subject: Re: Setting up a python environment
Date: Mon, 11 May 2020 16:01:39 +0100

Hi Simon,

That is very helpful indeed thanks. I will work through that.

Cheers
Roy.

On Mon, 11 May 2020, 15:51 zimoun, <address@hidden> wrote:

> Hi Roy,
>
> On Mon, 11 May 2020 at 14:49, Roy Lemmon <address@hidden> wrote:
>
> > I would like to ask about the general philosophy of setting up a python
> > environment under guix.
>
> Well, let me describe my workflow -- and I do not know if it the correct
> one.
>
> I use 'manifest', 'profile' and "guix environment".  For each project
> I am working on, I have dedicated folder containing the code, doc and
> other files useful for the very project.  In this folder, I add a
> manifest file [1] tracking the tools that the project needs.  From
> this manifest, I instantiate a profile in the project folder.  And I
> track the channel too to be able to reproduce elsewhere and elsetime.
> Time to time, I spawn an environment with the manifest to do some
> checks.  Well, basically, the CLI looks like:
>
>    cd /path/to/project
>    edit manifest.scm
>    guix package -m manifest.scm -p profile
>    guix describe -f channels > channels.scm
>    git add manifest.scm channels.scm
>    git commit -am
>
>    eval $(guix package --search-paths=prefix -p profile)
>    ipython
>
>    guix environment -m manifest --ad-hoc python-other-tools
>
>    guix time-machine -C channels.scm -- environment -m manifest.scm
>
>
> Last, when a package is missing, I use "guix import pypi -r name".  If
> the package is correctly packaged on the PyPI side, it is almost done.
> ;-)
> To be concrete, again in the project folder:
>
>    guix import pypi -r astropy > pkgs.scm
>    edit pkgs.scm # add define-module etc.
>    guix show -L . python-astropy
>    edit pkgs.scm # add missing import
>    guix show -L . python-astropy # works!
>
>    guix build -L . python-astropy
>
> Well, and then the "hard" packaging job starts. :-)
> Find attached 'pkgs.scm' still failing to build but maybe a starting point.
>
>
> Hope that helps,
> simon
>


reply via email to

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