unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
* fail install python-swh-model
@ 2020-06-25 15:41 zimoun
  0 siblings, 0 replies; only message in thread
From: zimoun @ 2020-06-25 15:41 UTC (permalink / raw)
  To: help-guix

[-- Attachment #1: Type: text/plain, Size: 1743 bytes --]

Dear,

I am trying to package swh.model, as reported previously. :-)
Well, I simply run:

  guix import pypi -r swh.model

and then using the wise advises of Marius, everything almost works.

However,

  ./pre-inst-env guix install python-swh-model -p /tmp/swh
  GUIX_PROFILE="/tmp/swh"
  . "$GUIX_PROFILE/etc/profile"

  swh-identify foo

returns this error:

--8<---------------cut here---------------start------------->8---
Traceback (most recent call last):
  File "/gnu/store/09a5iq080g9b641jyl363dr5jkkvnhcn-python-3.8.2/lib/python3.8/site-packages/pkg_resources/__init__.py", line 583, in _build_master
    ws.require(__requires__)
  File "/gnu/store/09a5iq080g9b641jyl363dr5jkkvnhcn-python-3.8.2/lib/python3.8/site-packages/pkg_resources/__init__.py", line 900, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/gnu/store/09a5iq080g9b641jyl363dr5jkkvnhcn-python-3.8.2/lib/python3.8/site-packages/pkg_resources/__init__.py", line 791, in resolve
    raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.ContextualVersionConflict: (attrs-strict 0.0.0 (/gnu/store/6ia5l999ch60kxqa14yf8v3s9hdv2vfs-python-attrs-strict-0.1.0/lib/python3.8/site-packages), Requirement.parse('attrs_strict>=0.0.7'), {'swh.model'})
--8<---------------cut here---------------end--------------->8---

Well, because there is:

--8<---------------cut here---------------start------------->8---
+    (propagated-inputs
+     `(("python-attrs" ,python-attrs)
+       ("python-attrs-strict" ,python-attrs-strict)
--8<---------------cut here---------------end--------------->8---

in the definition of "python-swh-model", I should miss something to
correctly propagate it.  What could it be?


All the best,
simon



[-- Attachment #2: draft --]
[-- Type: text/x-diff, Size: 3215 bytes --]

From ef93de4b552be6e8174ff4d6853372a452fdce83 Mon Sep 17 00:00:00 2001
From: zimoun <zimon.toutoune@gmail.com>
Date: Thu, 25 Jun 2020 17:34:37 +0200
Subject: [PATCH] DRAFT:

---
 gnu/packages/python-xyz.scm | 65 +++++++++++++++++++++++++++++++++++++
 1 file changed, 65 insertions(+)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 10cf27dbd7..32fe1ea58a 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -81,6 +81,7 @@
 ;;; Copyright © 2020 Josh Holland <josh@inv.alid.pw>
 ;;; Copyright © 2020 Yuval Kogman <nothingmuch@woobling.org>
 ;;; Copyright © 2020 Michael Rohleder <mike@rohleder.de>
+;;; Copyright © 2020 Simon Tournier <zimon.toutoune@gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -20139,3 +20140,67 @@ For the most part it's transliterated from C, the major differences are:
 @end itemize
 ")
     (license license:gpl3+)))
+
+(define-public python-attrs-strict
+  (package
+    (name "python-attrs-strict")
+    (version "0.1.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "attrs_strict" version))
+       (sha256
+        (base32
+         "0nldyv053xiv9aaysjszgisi9d9d87f5l2jf3rhl3xm9c9spar96"))))
+    (build-system python-build-system)
+    (native-inputs
+     `(("python-pytest" ,python-pytest)))
+    (propagated-inputs
+     `(("python-attrs" ,python-attrs)))
+    (home-page "https://github.com/bloomberg/attrs-strict")
+    (synopsis "Runtime validators for attrs")
+    (description
+     "Package that contains runtime validation for @code{attrs} data classes
+based on the types existing in the typing module.")
+    (license license:asl2.0)))
+
+(define-public python-swh-model
+  (package
+    (name "python-swh-model")
+    (version "0.3.4")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "swh.model" version))
+       (sha256
+        (base32
+         "15qgaiz3vx2r4ww3bb1x6pafg4nh275kxvyx0ppiby8r0qp27g6q"))))
+    (build-system python-build-system)
+    (propagated-inputs
+     `(("python-attrs" ,python-attrs)
+       ("python-attrs-strict" ,python-attrs-strict)
+       ("python-dateutil" ,python-dateutil)
+       ("python-hypothesis" ,python-hypothesis)
+       ("python-iso8601" ,python-iso8601)
+       ("python-pyblake2" ,python-pyblake2)
+       ("python-vcversioner" ,python-vcversioner)))
+    (native-inputs
+     `(("python-click" ,python-click)
+       ("python-dulwich" ,python-dulwich)
+       ("python-pytest" ,python-pytest)
+       ("python-pytz" ,python-pytz)))
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (replace 'check
+           (lambda _
+             (invoke "pytest"))))))
+    (home-page "https://forge.softwareheritage.org/diffusion/DMOD/")
+    (synopsis "Tools for Software Heritage data model")
+    (description
+     "This package implements the Data model of the Software Heritage project
+used to archive source code artifacts.
+
+The module defines the notion of Persistent Identifier (PID) and provides
+tools to compute them.")
+    (license license:gpl3)))
-- 
2.26.2


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2020-06-25 16:09 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-25 15:41 fail install python-swh-model zimoun

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).