unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
From: zimoun <zimon.toutoune@gmail.com>
To: Marius Bakke <marius@gnu.org>, help-guix <help-guix@gnu.org>
Subject: Re: failing to package attrs-strict for swh.model
Date: Thu, 25 Jun 2020 14:59:53 +0200	[thread overview]
Message-ID: <86imffb8s6.fsf@gmail.com> (raw)
In-Reply-To: <87imfg6x8x.fsf@gnu.org>

Hi Marius,

Thank you for the help.

On Wed, 24 Jun 2020 at 22:10, Marius Bakke <marius@gnu.org> wrote:

> I notice the file name in this command is "attrs_strict".  Probably the
> importer picked the wrong file name and you need to change it to
> (pypi-uri "attrs_strict" version).

Thanks!  Stupid mistake I did. :-)

> Can you paste the full package definition?

Well, I have tried with and without the 'arguments'.

--8<---------------cut here---------------start------------->8---
(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)
       ("python-pluggy" ,python-pluggy)))
    (propagated-inputs
      `(("python-attrs" ,python-attrs)
        ("python-typing" ,python-typing)))
    (arguments
     `(#:phases (modify-phases %standard-phases
                  (replace 'check
                    (lambda _
                      (invoke "pytest")
                      #t)))))
    (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)))
--8<---------------cut here---------------end--------------->8---

Then the Traceback is:

--8<---------------cut here---------------start------------->8---
starting phase `check'
Traceback (most recent call last):
  File "/gnu/store/3bk454z353a42l1l4yaxa6lrl3dh24mv-python-pytest-5.3.5/bin/.pytest-real", line 11, in <module>
    load_entry_point('pytest==5.3.5', 'console_scripts', 'pytest')()
  File "/gnu/store/q9rm8h9imazsq2c4qiv2yjpvlvliywqb-python-3.8.2/lib/python3.8/site-packages/pkg_resources/__init__.py", line 489, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/gnu/store/q9rm8h9imazsq2c4qiv2yjpvlvliywqb-python-3.8.2/lib/python3.8/site-packages/pkg_resources/__init__.py", line 2852, in load_entry_point
    return ep.load()
  File "/gnu/store/q9rm8h9imazsq2c4qiv2yjpvlvliywqb-python-3.8.2/lib/python3.8/site-packages/pkg_resources/__init__.py", line 2443, in load
    return self.resolve()
  File "/gnu/store/q9rm8h9imazsq2c4qiv2yjpvlvliywqb-python-3.8.2/lib/python3.8/site-packages/pkg_resources/__init__.py", line 2449, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/gnu/store/3bk454z353a42l1l4yaxa6lrl3dh24mv-python-pytest-5.3.5/lib/python3.8/site-packages/pytest/__init__.py", line 6, in <module>
    from _pytest.assertion import register_assert_rewrite
  File "/gnu/store/3bk454z353a42l1l4yaxa6lrl3dh24mv-python-pytest-5.3.5/lib/python3.8/site-packages/_pytest/assertion/__init__.py", line 5, in <module>
    from typing import Optional
  File "/gnu/store/lnbh9ks047sw41b6dc3zk6z1qy4b8cv0-python-typing-3.7.4.1/lib/python3.8/site-packages/typing.py", line 1357, in <module>
    class Callable(extra=collections_abc.Callable, metaclass=CallableMeta):
  File "/gnu/store/lnbh9ks047sw41b6dc3zk6z1qy4b8cv0-python-typing-3.7.4.1/lib/python3.8/site-packages/typing.py", line 1005, in __new__
    self._abc_registry = extra._abc_registry
AttributeError: type object 'Callable' has no attribute '_abc_registry'
command "pytest" failed with status 1
--8<---------------cut here---------------end--------------->8---

And without the 'replace' i.e., "python setup.py test", the Traceback
is:

--8<---------------cut here---------------start------------->8---
starting phase `check'
running "python setup.py" with command "test" and parameters ()
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "setup.py", line 14, in <module>
    setup(long_description=long_description)
  File "/gnu/store/q9rm8h9imazsq2c4qiv2yjpvlvliywqb-python-3.8.2/lib/python3.8/site-packages/setuptools/__init__.py", line 145, in setup
    return distutils.core.setup(**attrs)
  File "/gnu/store/q9rm8h9imazsq2c4qiv2yjpvlvliywqb-python-3.8.2/lib/python3.8/distutils/core.py", line 134, in setup
[...]
    import typing
  File "/gnu/store/lnbh9ks047sw41b6dc3zk6z1qy4b8cv0-python-typing-3.7.4.1/lib/python3.8/site-packages/typing.py", line 1357, in <module>
    class Callable(extra=collections_abc.Callable, metaclass=CallableMeta):
  File "/gnu/store/lnbh9ks047sw41b6dc3zk6z1qy4b8cv0-python-typing-3.7.4.1/lib/python3.8/site-packages/typing.py", line 1005, in __new__
    self._abc_registry = extra._abc_registry
AttributeError: type object 'Callable' has no attribute '_abc_registry'
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'))" "test" failed with status 1
--8<---------------cut here---------------end--------------->8---


Well, what I want at the end is the PyPI package "swh.model".


Thanks,
simon


  reply	other threads:[~2020-06-25 13:00 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-23 20:54 failing to package attrs-strict for swh.model zimoun
2020-06-24 20:10 ` Marius Bakke
2020-06-25 12:59   ` zimoun [this message]
2020-06-25 13:04     ` Efraim Flashner
2020-06-25 13:29       ` zimoun
2020-06-25 14:42     ` Marius Bakke
2020-06-25 15:07       ` 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=86imffb8s6.fsf@gmail.com \
    --to=zimon.toutoune@gmail.com \
    --cc=help-guix@gnu.org \
    --cc=marius@gnu.org \
    /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.
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).