python importer: extend requirements import

  • Done
  • quality assurance status badge
Details
3 participants
  • Danny Milosavljevic
  • T460s laptop
  • ng0
Owner
unassigned
Submitted by
ng0
Severity
normal
Merged with
N
(address . bug-guix@gnu.org)
87wphwj835.fsf@we.make.ritual.n0.is
One example:

ng0@shadowwalker ~$ guix import pypi hyperkitty

Starting download of /tmp/guix-file.yrqmcv
…1.0.3.tar.gz 1.5MiB 1.1MiB/s 00:01 [####################] 100.0%
tar: HyperKitty-1.0.3/requirements.txt: Not found in archive
tar: Exiting with failure status due to previous errors
guix import: warning: 'tar xf' failed with exit code 512
(package
(name "python-hyperkitty")
(version "1.0.3")


When you look at the contained setup.py of hyperkitty, it has this
defined in setup.py.

# Requirements REQUIRES = [
etc etc

I've seen this in some variations.

The python importer should be extended to include these not very unusual
cases.
--
ng0
D
D
Danny Milosavljevic wrote on 29 Sep 2016 13:25
(name . ng0)(address . ngillmann@runbox.com)(address . 24557@debbugs.gnu.org)
20160929132532.3792087c@scratchpost.org
On Wed, 28 Sep 2016 16:35:26 +0000
ng0 <ngillmann@runbox.com> wrote:

Toggle quote (26 lines)
> One example:
>
> ng0@shadowwalker ~$ guix import pypi hyperkitty
>
> Starting download of /tmp/guix-file.yrqmcv
> >From https://pypi.python.org/packages/47/2d/cc2adf4bc0ed7bb4189b3146dde921c9a6ecc33f0f87c96c744d89bab154/HyperKitty-1.0.3.tar.gz...
> …1.0.3.tar.gz 1.5MiB 1.1MiB/s 00:01 [####################] 100.0%
> tar: HyperKitty-1.0.3/requirements.txt: Not found in archive
> tar: Exiting with failure status due to previous errors
> guix import: warning: 'tar xf' failed with exit code 512
> (package
> (name "python-hyperkitty")
> (version "1.0.3")
>
>
> When you look at the contained setup.py of hyperkitty, it has this
> defined in setup.py.
>
> # Requirements REQUIRES = [
> etc etc
>
> I've seen this in some variations.
>
> The python importer should be extended to include these not very unusual
> cases.

This could be done by making the Python importer do something like

hk/HyperKitty-1.0.3 $ python3 setup.py egg_info
hk/HyperKitty-1.0.3 $ cat HyperKitty.egg-info/requires.txt

if (!) the project uses setuptools.

(Unfortunately there seems to be no command line option to directly read the keyword argument "install_requires" by setup.py - although there are command line options for all the other keyword arguments - weird... That's why it's necessary to make it write them egg_info files)
T
T
T460s laptop wrote on 30 Mar 2019 03:15
control message for bug #24450
(address . control@debbugs.gnu.org)
875zs15cq0.fsf@kwak.i-did-not-set--mail-host-address--so-tickle-me
forcemerge 24450 24557
M
M
Maxim Cournoyer wrote on 31 Mar 2019 16:41
(address . control@debbugs.gnu.org)
87ef6n2jiz.fsf@gmail.com
tags 24450 patch
?