unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
From: Roy Lemmon <roy@roylemmon.com>
To: zimoun <zimon.toutoune@gmail.com>
Cc: help-guix <help-guix@gnu.org>
Subject: Re: Setting up a python environment
Date: Mon, 11 May 2020 16:01:39 +0100	[thread overview]
Message-ID: <CAH5rZC4v8_nMA-oErzV2g0jHw_1nq7u34Rre9ay30O_kpCvyBw@mail.gmail.com> (raw)
In-Reply-To: <CAJ3okZ3aXM_a3LT68V6FstBwSuY2oo7WmEfgmNRSEgxNyLJvFw@mail.gmail.com>

Hi Simon,

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

Cheers
Roy.

On Mon, 11 May 2020, 15:51 zimoun, <zimon.toutoune@gmail.com> wrote:

> Hi Roy,
>
> On Mon, 11 May 2020 at 14:49, Roy Lemmon <roy@roylemmon.com> 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	other threads:[~2020-05-11 15:02 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-11 12:34 Setting up a python environment Roy Lemmon
2020-05-11 13:55 ` sirgazil
2020-05-11 14:09   ` Roy Lemmon
2020-05-11 14:31     ` Julien Lepiller
2020-05-11 14:45       ` Roy Lemmon
2020-05-11 14:51 ` zimoun
2020-05-11 15:01   ` Roy Lemmon [this message]

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

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAH5rZC4v8_nMA-oErzV2g0jHw_1nq7u34Rre9ay30O_kpCvyBw@mail.gmail.com \
    --to=roy@roylemmon.com \
    --cc=help-guix@gnu.org \
    --cc=zimon.toutoune@gmail.com \
    /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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).