From mboxrd@z Thu Jan 1 00:00:00 1970 From: Danny Milosavljevic Subject: bug#24557: python importer: extend requirements import Date: Thu, 29 Sep 2016 13:25:32 +0200 Message-ID: <20160929132532.3792087c@scratchpost.org> References: <87wphwj835.fsf@we.make.ritual.n0.is> 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]:35621) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bpZTa-0003ZA-Ha for bug-guix@gnu.org; Thu, 29 Sep 2016 07:26:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bpZTW-0003U3-S0 for bug-guix@gnu.org; Thu, 29 Sep 2016 07:26:05 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:60604) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bpZTW-0003Tx-OK for bug-guix@gnu.org; Thu, 29 Sep 2016 07:26:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bpZTW-0006S2-Gb for bug-guix@gnu.org; Thu, 29 Sep 2016 07:26:02 -0400 Sender: "Debbugs-submit" Resent-Message-ID: In-Reply-To: <87wphwj835.fsf@we.make.ritual.n0.is> List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: "bug-Guix" To: ng0 Cc: 24557@debbugs.gnu.org On Wed, 28 Sep 2016 16:35:26 +0000 ng0 wrote: > One example: >=20 > ng0@shadowwalker ~$ guix import pypi hyperkitty >=20 > Starting download of /tmp/guix-file.yrqmcv > >From https://pypi.python.org/packages/47/2d/cc2adf4bc0ed7bb4189b3146dde9= 21c9a6ecc33f0f87c96c744d89bab154/HyperKitty-1.0.3.tar.gz... =20 > =E2=80=A61.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") >=20 >=20 > When you look at the contained setup.py of hyperkitty, it has this > defined in setup.py. >=20 > # Requirements REQUIRES =3D [ > etc etc >=20 > I've seen this in some variations. >=20 > 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=20 if (!) the project uses setuptools. (Unfortunately there seems to be no command line option to directly read th= e keyword argument "install_requires" by setup.py - although there are comm= and line options for all the other keyword arguments - weird... That's why = it's necessary to make it write them egg_info files)