unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
From: Efraim Flashner <efraim@flashner.co.il>
To: zimoun <zimon.toutoune@gmail.com>
Cc: help-guix <help-guix@gnu.org>
Subject: Re: failing to package attrs-strict for swh.model
Date: Thu, 25 Jun 2020 16:04:07 +0300	[thread overview]
Message-ID: <20200625130407.GC21908@E5400> (raw)
In-Reply-To: <86imffb8s6.fsf@gmail.com>

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

On Thu, Jun 25, 2020 at 02:59:53PM +0200, zimoun wrote:
> 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
> 

I believe according to the python output from previous building packages
abc_registry has been deprecated since 3.3. I would just skip the tests
for now and see if upstream has an answer for building with python-3.8.

-- 
Efraim Flashner   <efraim@flashner.co.il>   אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2020-06-25 13:12 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
2020-06-25 13:04     ` Efraim Flashner [this message]
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=20200625130407.GC21908@E5400 \
    --to=efraim@flashner.co.il \
    --cc=help-guix@gnu.org \
    --cc=zimon.toutoune@gmail.com \
    /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).