all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>
To: Hartmut Goebel <h.goebel@crazy-compilers.com>
Cc: guix-devel@gnu.org
Subject: Re: proper Python inputs (was: gnu: Add python-pytest-pep8.)
Date: Tue, 26 Apr 2016 16:19:16 +0200	[thread overview]
Message-ID: <idj60v48nbv.fsf@bimsb-sys02.mdc-berlin.net> (raw)
In-Reply-To: <571E791C.40802@crazy-compilers.com>


Hartmut Goebel <h.goebel@crazy-compilers.com> writes:

> Am 25.04.2016 um 20:19 schrieb Leo Famulari:
>> This seems like an unusual case, since the package in question appears
>> to be a build-time tool. So, it would make sense to have things like
>> python-pytest available during python-pytest-pep8's run-time.
>
>> If we have a use case for python-pytest-pep8, it could be worthwhile
>> to see if it will work without propagating these anyways; I've noticed
>> some Python packages have a way to link to non-propagated-inputs. 
>
> Reading this makes me *totally* confused about how to package Python for
> Guix. I think, we should enhance the Guix Python Packaging guide to
> clarify thinks for all.
>
> 1. Fact: If some Python package lists another package in
> "install_requires", then this other Python package is required to run.
> In a non Guix-environment, pip would install these other package, too.
>
> 2. Until 5 minutes ago I thought, that adding these other packages as
> "normal" inputs is enough. But then I found that quite a bunch of
> packages are using "propagated-inputs". So I tried to find out, what the
> difference is:
>
>   - "normal" inputs get added to PYTHONPATH via the .pth mechanism.
>
>      Example: guix package -i python-execnet puts only
> "execnet-1.4.1-py3.4.egg" into site-packages, plus
> "python-execnet-1.4.1.pth", which adds the required package via a link
> to "/gnu/store/....python-apipkg-1.4/..."
>
>  - "Propagated" inputs are all linked into site-packages
>
>     Example: guix package -i python-zope-interface puts zope-interface
> and zope-event into site-packages.
>
>  So this is not much of a difference: In both cases all required inputs
> will be available in PYTHONPATH at run-time and can be imported.
>
> 3. But anyhow: Trouble is ahead: If some package aaa has a normal input
> "zzz@1.2", while package bbb as normal input "zzz@1.1" and package ccc
> as propagated input "zzz@1.3", we will end up with this in site-packages:
>
>    - aaa.pth adding path to zzz@1.2
>    - bbb.pth adding path to zzz@1.1
>    - zzz-1.3.egg
>
>   Which package "zzz" gets imported is somewhat arbitrary [2].
>
> Is this intended? Did I miss something?

It’s not so easy as “pth” files aren’t necessarily evaluated.  Usually
we propagate inputs that need to be available at runtime.

This often causes problems here at work when people installed
“python2-numpy” a couple of months ago and then install “miso” which
propagates “python2-numpy”.  There are then at least two variants of
numpy in the profile leading to many collisions.

We’ve previously discussed alternatives to propagation:

    http://lists.gnu.org/archive/html/guix-devel/2016-02/msg00810.html

But so far there haven’t been any patch-ready solutions.  I’d really
like to fix this, though, as it’s uncomfortable to have to tell users to
either use manifests (thereby upgrading all of their applications in
their profile before installing something new) or to use separate
profiles for Python stuff.

~~ Ricardo

  reply	other threads:[~2016-04-26 14:19 UTC|newest]

Thread overview: 53+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-21 13:21 [PATCH] Add python-scikit-bio Ben Woodcroft
2016-04-21 13:21 ` [PATCH 01/10] gnu: Add python2-pytest-cache Ben Woodcroft
2016-04-21 13:21 ` [PATCH 02/10] gnu: Add python-bz2file Ben Woodcroft
2016-04-21 15:43   ` Efraim Flashner
2016-04-21 18:24   ` Hartmut Goebel
2016-04-24 13:17     ` Ben Woodcroft
2016-04-21 13:21 ` [PATCH 03/10] gnu: Add python-pytest-pep8 Ben Woodcroft
2016-04-21 18:26   ` Hartmut Goebel
2016-04-24 13:21     ` Ben Woodcroft
2016-04-21 13:21 ` [PATCH 04/10] gnu: Add python-pytest-flakes Ben Woodcroft
2016-04-21 18:26   ` Hartmut Goebel
2016-04-21 13:21 ` [PATCH 05/10] gnu: Add python-future Ben Woodcroft
2016-04-21 13:21 ` [PATCH 06/10] gnu: Add python-cachecontrol Ben Woodcroft
2016-04-21 13:21 ` [PATCH 07/10] gnu: python-tornado: Use 'python2-variant' Ben Woodcroft
2016-04-21 13:21 ` [PATCH 08/10] gnu: python-ipython: " Ben Woodcroft
2016-04-21 15:14   ` Ricardo Wurmus
2016-04-24 13:11     ` Ben Woodcroft
2016-04-24 13:12     ` Ben Woodcroft
2016-04-21 13:22 ` [PATCH 09/10] gnu: Add python-natsort Ben Woodcroft
2016-04-21 15:09   ` Ricardo Wurmus
2016-04-21 13:22 ` [PATCH 10/10] gnu: Add python-scikit-bio Ben Woodcroft
2016-04-21 15:04   ` Ricardo Wurmus
2016-04-21 15:07   ` Ricardo Wurmus
2016-04-21 15:09   ` Ricardo Wurmus
2016-04-24 13:01 ` [PATCH 2/2] " Ben Woodcroft
2016-04-24 13:06 ` [PATCH v2] " Ben Woodcroft
2016-04-24 13:06   ` [PATCH v2 01/10] gnu: Add python2-pytest-cache Ben Woodcroft
2016-04-25 18:22     ` Leo Famulari
2016-04-24 13:06   ` [PATCH v2 02/10] gnu: Add python-bz2file Ben Woodcroft
2016-04-25 18:27     ` Leo Famulari
2016-04-24 13:06   ` [PATCH v2 03/10] gnu: Add python-pytest-pep8 Ben Woodcroft
2016-04-24 17:04     ` Efraim Flashner
2016-04-24 23:42       ` Ben Woodcroft
2016-04-24 23:45       ` Ben Woodcroft
2016-04-25  8:43         ` Ricardo Wurmus
2016-04-25 12:36           ` Ben Woodcroft
2016-04-25 18:19             ` Leo Famulari
2016-04-25 20:07               ` proper Python inputs (was: gnu: Add python-pytest-pep8.) Hartmut Goebel
2016-04-26 14:19                 ` Ricardo Wurmus [this message]
2016-04-24 13:06   ` [PATCH v2 04/10] gnu: Add python-pytest-flakes Ben Woodcroft
2016-04-25 18:34     ` Leo Famulari
2016-04-24 13:06   ` [PATCH v2 05/10] gnu: Add python-future Ben Woodcroft
2016-04-25 18:30     ` Leo Famulari
2016-04-24 13:06   ` [PATCH v2 06/10] gnu: Add python-cachecontrol Ben Woodcroft
2016-04-25 18:35     ` Leo Famulari
2016-04-24 13:06   ` [PATCH v2 07/10] gnu: python-tornado: Use 'python2-variant' Ben Woodcroft
2016-04-25 18:36     ` Leo Famulari
2016-04-24 13:06   ` [PATCH v2 08/10] gnu: python-ipython: " Ben Woodcroft
2016-04-25 18:48     ` Leo Famulari
2016-04-24 13:06   ` [PATCH v2 09/10] gnu: Add python-natsort Ben Woodcroft
2016-04-25 18:41     ` Leo Famulari
2016-04-24 13:06   ` [PATCH v2 10/10] gnu: Add python-scikit-bio Ben Woodcroft
2016-04-25 18:47     ` Leo Famulari

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=idj60v48nbv.fsf@bimsb-sys02.mdc-berlin.net \
    --to=ricardo.wurmus@mdc-berlin.de \
    --cc=guix-devel@gnu.org \
    --cc=h.goebel@crazy-compilers.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.
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.