[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
proper Python inputs (was: gnu: Add python-pytest-pep8.)
From: |
Hartmut Goebel |
Subject: |
proper Python inputs (was: gnu: Add python-pytest-pep8.) |
Date: |
Mon, 25 Apr 2016 22:07:56 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.7.2 |
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
"address@hidden", while package bbb as normal input "address@hidden" and
package ccc
as propagated input "address@hidden", we will end up with this in site-packages:
- aaa.pth adding path to address@hidden
- bbb.pth adding path to address@hidden
- 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]
<https://python-packaging-user-guide.readthedocs.org/en/latest/distributing/?highlight=install_requires#install-requires>
[2] Not exactly, it depends on the lexical order of the filenames, but
this is implementation-dependent and AFAIK not documented.
--
Regards
Hartmut Goebel
| Hartmut Goebel | address@hidden |
| www.crazy-compilers.com | compilers which you thought are impossible |
- Re: [PATCH v2 01/10] gnu: Add python2-pytest-cache., (continued)
- [PATCH v2 02/10] gnu: Add python-bz2file., Ben Woodcroft, 2016/04/24
- [PATCH v2 03/10] gnu: Add python-pytest-pep8., Ben Woodcroft, 2016/04/24
- Re: [PATCH v2 03/10] gnu: Add python-pytest-pep8., Efraim Flashner, 2016/04/24
- Re: [PATCH v2 03/10] gnu: Add python-pytest-pep8., Ben Woodcroft, 2016/04/24
- Re: [PATCH v2 03/10] gnu: Add python-pytest-pep8., Ben Woodcroft, 2016/04/24
- Re: [PATCH v2 03/10] gnu: Add python-pytest-pep8., Ricardo Wurmus, 2016/04/25
- Re: [PATCH v2 03/10] gnu: Add python-pytest-pep8., Ben Woodcroft, 2016/04/25
- Re: [PATCH v2 03/10] gnu: Add python-pytest-pep8., Leo Famulari, 2016/04/25
- proper Python inputs (was: gnu: Add python-pytest-pep8.),
Hartmut Goebel <=
- Re: proper Python inputs (was: gnu: Add python-pytest-pep8.), Ricardo Wurmus, 2016/04/26
[PATCH v2 04/10] gnu: Add python-pytest-flakes., Ben Woodcroft, 2016/04/24
[PATCH v2 05/10] gnu: Add python-future., Ben Woodcroft, 2016/04/24
[PATCH v2 06/10] gnu: Add python-cachecontrol., Ben Woodcroft, 2016/04/24
[PATCH v2 07/10] gnu: python-tornado: Use 'python2-variant'., Ben Woodcroft, 2016/04/24
[PATCH v2 08/10] gnu: python-ipython: Use 'python2-variant'., Ben Woodcroft, 2016/04/24