From: Leo Prikler <leo.prikler@student.tugraz.at>
To: "Ludovic Courtès" <ludovic.courtes@inria.fr>, 49168@debbugs.gnu.org
Subject: bug#49168: ‘guix import pypi’ misses package dependencies
Date: Tue, 22 Jun 2021 10:34:26 +0200 [thread overview]
Message-ID: <992e746ed43c5ae7def7b35996ed44743fef85bf.camel@student.tugraz.at> (raw)
In-Reply-To: <877dim5psf.fsf@inria.fr>
Am Dienstag, den 22.06.2021, 09:20 +0200 schrieb Ludovic Courtès:
> Hi!
>
> ‘guix import pypi -r django-import-export’ does not include all the
> inputs:
>
> --8<---------------cut here---------------start------------->8---
> $ guix build -L /tmp/mods python-django-import-export
>
> [...]
>
> starting phase `build'
> running "python setup.py" with command "build" and parameters ()
> Download error on https://pypi.org/simple/setuptools_scm/: [Errno -2]
> Name or service not known -- Some packages may not be found!
> Download error on https://pypi.org/simple/setuptools-scm/: [Errno -2]
> Name or service not known -- Some packages may not be found!
> Couldn't find index page for 'setuptools_scm' (maybe misspelled?)
> Download error on https://pypi.org/simple/: [Errno -2] Name or
> service not known -- Some packages may not be found!
> No local packages or working download links found for setuptools_scm
> Traceback (most recent call last):
> File "<string>", line 1, in <module>
> File "setup.py", line 5, in <module>
> setup(
> File "/gnu/store/9w9jvy3bgjg4qaqmrij01nbppiccqr7c-python-
> 3.8.2/lib/python3.8/site-packages/setuptools/__init__.py", line 144,
> in setup
> _install_setup_requires(attrs)
> File "/gnu/store/9w9jvy3bgjg4qaqmrij01nbppiccqr7c-python-
> 3.8.2/lib/python3.8/site-packages/setuptools/__init__.py", line 139,
> in _install_setup_requires
> dist.fetch_build_eggs(dist.setup_requires)
> File "/gnu/store/9w9jvy3bgjg4qaqmrij01nbppiccqr7c-python-
> 3.8.2/lib/python3.8/site-packages/setuptools/dist.py", line 716, in
> fetch_build_eggs
> resolved_dists = pkg_resources.working_set.resolve(
> File "/gnu/store/9w9jvy3bgjg4qaqmrij01nbppiccqr7c-python-
> 3.8.2/lib/python3.8/site-packages/pkg_resources/__init__.py", line
> 780, in resolve
> dist = best[req.key] = env.best_match(
> File "/gnu/store/9w9jvy3bgjg4qaqmrij01nbppiccqr7c-python-
> 3.8.2/lib/python3.8/site-packages/pkg_resources/__init__.py", line
> 1065, in best_match
> return self.obtain(req, installer)
> File "/gnu/store/9w9jvy3bgjg4qaqmrij01nbppiccqr7c-python-
> 3.8.2/lib/python3.8/site-packages/pkg_resources/__init__.py", line
> 1077, in obtain
> return installer(requirement)
> File "/gnu/store/9w9jvy3bgjg4qaqmrij01nbppiccqr7c-python-
> 3.8.2/lib/python3.8/site-packages/setuptools/dist.py", line 786, in
> fetch_build_egg
> return cmd.easy_install(req)
> File "/gnu/store/9w9jvy3bgjg4qaqmrij01nbppiccqr7c-python-
> 3.8.2/lib/python3.8/site-
> packages/setuptools/command/easy_install.py", line 673, in
> easy_install
> raise DistutilsError(msg)
> distutils.errors.DistutilsError: Could not find suitable distribution
> for Requirement.parse('setuptools_scm')
> command "python" "-c" "import setuptools,
> tokenize;__file__='setup.py';f=getattr(tokenize, 'open',
> open)(__file__);code=f.read().replace('\\r\\n',
> '\\n');f.close();exec(compile(code, __file__, 'exec'))" "build"
> failed with status 1
> builder for `/gnu/store/74ph75dfy1i9hrx9n327j32ma2zv4hhd-python-
> tablib-3.0.0.drv' failed with exit code 1
> build of /gnu/store/74ph75dfy1i9hrx9n327j32ma2zv4hhd-python-tablib-
> 3.0.0.drv failed
> View build log at
> '/var/log/guix/drvs/74/ph75dfy1i9hrx9n327j32ma2zv4hhd-python-tablib-
> 3.0.0.drv.bz2'.
> cannot build derivation `/gnu/store/6xk0jk0qnjsazqgjihmpafsx3wfmxjf0-
> python-django-import-export-2.5.0.drv': 1 dependencies couldn't be
> built
> guix build: error: build of
> `/gnu/store/6xk0jk0qnjsazqgjihmpafsx3wfmxjf0-python-django-import-
> export-2.5.0.drv' failed
> $ cat /tmp/mods/django.scm
> (define-module (django)
> #:use-module (guix)
> #:use-module (guix build-system python)
> #:use-module (gnu packages python)
> #:use-module (gnu packages python-xyz)
> #:use-module (gnu packages django)
> #:use-module ((guix licenses) #:prefix license:))
>
> (define-public python-tablib
> (package
> (name "python-tablib")
> (version "3.0.0")
> (source
> (origin
> (method url-fetch)
> (uri (pypi-uri "tablib" version))
> (sha256
> (base32
> "03f1z6jq6rf67gwhbm9ma4rydm8h447a5nh5lcs5l8jg8l4aqg7q")))
> )
> (build-system python-build-system)
> (home-page "https://tablib.readthedocs.io")
> (synopsis
> "Format agnostic tabular data library (XLS, JSON, YAML, CSV)")
> (description
> "Format agnostic tabular data library (XLS, JSON, YAML, CSV)")
> (license license:expat)))
>
> (define-public python-django-import-export
> (package
> (name "python-django-import-export")
> (version "2.5.0")
> (source
> (origin
> (method url-fetch)
> (uri (pypi-uri "django-import-export" version))
> (sha256
> (base32
> "0j0gsj18bkkmbn262qj2syla80vncvqn49bllwxvcgw0zhxh1763")))
> )
> (build-system python-build-system)
> (propagated-inputs
> `(("python-diff-match-patch"
> ,python-diff-match-patch)
> ("python-django" ,python-django)
> ("python-tablib" ,python-tablib)))
> (home-page
> "https://github.com/django-import-export/django-import-export")
> (synopsis
> "Django application and library for importing and exporting
> data with included admin integration.")
> (description
> "Django application and library for importing and exporting
> data with included admin integration.")
> (license license:bsd-3)))
>
> --8<---------------cut here---------------end--------------->8---
>
> Here, some of tablib’s dependencies are missing; the same problem
> seems
> to happen with python-django-import-export itself.
>
> Are we failing to parse some of the PyPI metadata?
I don't think so, rather it appears as though the requires.txt is
somehow malformed or ill-suited for importing. It basically marks all
inputs as optional.
Perhaps we could instruct the importer to emit comments for optional
inputs like so
;; Optional inputs by section
;; -- [SECTION]
;; ("python-some-package" ,python-some-package)
;; ("python-some-other-package" ,python-some-other-package)
Maybe add a command line switch to toggle these comments or a way of
assuming some section, e.g. [cli] to be the thing we want to build for
a package.
Regards,
Leo
next prev parent reply other threads:[~2021-06-22 8:35 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-22 7:20 bug#49168: ‘guix import pypi’ misses package dependencies Ludovic Courtès
2021-06-22 8:34 ` Leo Prikler [this message]
2021-06-22 12:33 ` Ludovic Courtès
2021-06-22 12:37 ` Leo Prikler
2021-06-22 19:01 ` Maxim Cournoyer
2021-06-23 13:20 ` Ludovic Courtès
2021-06-23 14:17 ` Leo Prikler
2021-06-24 9:57 ` Ludovic Courtès
2021-06-24 19:04 ` Maxim Cournoyer
2021-06-25 14:51 ` Ludovic Courtès
2021-06-25 15:25 ` Leo Prikler
2021-06-25 16:39 ` Maxim Cournoyer
2021-06-28 9:39 ` Ludovic Courtès
2022-03-08 9:28 ` zimoun
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
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=992e746ed43c5ae7def7b35996ed44743fef85bf.camel@student.tugraz.at \
--to=leo.prikler@student.tugraz.at \
--cc=49168@debbugs.gnu.org \
--cc=ludovic.courtes@inria.fr \
/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 public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).