From mboxrd@z Thu Jan 1 00:00:00 1970 From: Hartmut Goebel Subject: proper Python inputs (was: gnu: Add python-pytest-pep8.) Date: Mon, 25 Apr 2016 22:07:56 +0200 Message-ID: <571E791C.40802@crazy-compilers.com> References: <1461244921-7412-1-git-send-email-donttrustben@gmail.com> <1461503184-8841-1-git-send-email-donttrustben@gmail.com> <1461503184-8841-4-git-send-email-donttrustben@gmail.com> <20160424170405.GA12480@debian-netbook> <571D5AA1.9090605@gmail.com> <571E0F66.2070703@gmail.com> <20160425181903.GE8957@jasmine> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:47297) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aumnh-00042W-GY for guix-devel@gnu.org; Mon, 25 Apr 2016 16:08:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aumne-000748-BC for guix-devel@gnu.org; Mon, 25 Apr 2016 16:08:09 -0400 Received: from mail-out.m-online.net ([2001:a60:0:28:0:1:25:1]:57305) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aumne-00073I-1D for guix-devel@gnu.org; Mon, 25 Apr 2016 16:08:06 -0400 Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 3qty2T2nXnz3hjkw for ; Mon, 25 Apr 2016 22:08:01 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.68]) by mail.m-online.net (Postfix) with ESMTP id 3qty2T1n48zvhNl for ; Mon, 25 Apr 2016 22:08:01 +0200 (CEST) Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.68]) (amavisd-new, port 10024) with ESMTP id x8wvy9XpgaWs for ; Mon, 25 Apr 2016 22:07:58 +0200 (CEST) Received: from hermia.goebel-consult.de (ppp-188-174-147-87.dynamic.mnet-online.de [188.174.147.87]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPS for ; Mon, 25 Apr 2016 22:07:58 +0200 (CEST) Received: from thisbe.goebel-consult.de (hermia.goebel-consult.de [192.168.110.7]) by hermia.goebel-consult.de (Postfix) with ESMTP id EF3D760228 for ; Mon, 25 Apr 2016 22:07:56 +0200 (CEST) In-Reply-To: <20160425181903.GE8957@jasmine> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: guix-devel@gnu.org 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.=20 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? IMHO we should clarify his behavior and then bring all existing Python packages in line and document it in the manual. [1] [2] Not exactly, it depends on the lexical order of the filenames, but this is implementation-dependent and AFAIK not documented. --=20 Regards Hartmut Goebel | Hartmut Goebel | h.goebel@crazy-compilers.com | | www.crazy-compilers.com | compilers which you thought are impossible |